three.MF.V3.Task
1from enum import Enum 2from google.protobuf import any_pb2 as _any_pb2 3 4 5class TaskState(Enum): 6 Empty = "None" # The task state is not defined. 7 Sent = "Sent" # The task has been sent by the client. 8 Received = "Received" # The task has been received by the server. 9 Started = "Started" # The task started by the server. 10 Completed = "Completed" # The task is completed by the server. 11 Cancelled = "Cancelled" # The task has been cancelled by the client. 12 Failed = "Failed" # The task has failed. A string describing the error is returned with the task. 13 Dropped = "Dropped" # The task has not been received by the server, or task IDs were sent out of sequence. 14 Disconnected = "Disconnected" # The client has been disconnected from the server before the task could finish. 15 16 17class Task: 18 """* 19 Generic task message for the Three Scanner. 20 21 The task message is the generic message used for requesting a task of the Three Scanner and receiving updates and results. 22 23 Example: Apply camera settings with the "SetCameras" task. 24 25 > Example request: 26 27 ```json 28 { 29 "Task":{ 30 "Index":1, 31 "Type":"SetCameras" 32 "Input":{ 33 "analogGain":256, 34 "digitalGain":128, 35 "exposure":18000 36 }, 37 } 38 } 39 ``` 40 41 > Example response: 42 43 ```json 44 { 45 "Task":{ 46 "Index":1, 47 "Type":"SetCameras" 48 "Input":{ 49 "analogGain":256, 50 "digitalGain":512, 51 "exposure":18000 52 }, 53 "Output":{ 54 "analogGain":{"default":512.0,"max":1024.0,"min":256.0,"value":256.0}, 55 "digitalGain":{"default":256,"max":65536,"min":256,"value":512}, 56 "exposure":{"default":27000,"max":90000,"min":9000,"value":18000}, 57 }, 58 "State":"Completed" 59 } 60 } 61 ``` 62 """ 63 def __init__(self, Index: int, Type: str, Input: _any_pb2 = None, Output: _any_pb2 = None, State: 'TaskState' = None, Error: str = None, Progress: _any_pb2 = None): 64 # A unique identifier generated by the client. This identifier associates all incoming and outgoing task messages with a specific task requested by the client. 65 self.Index = Index 66 # The string identifying the task type. See task definitions for the list of valid task strings. 67 self.Type = Type 68 # Optional input message. See each task definition for details. 69 self.Input = Input 70 # Optional output message. See each task definition for details. 71 self.Output = Output 72 # The current state of the task. 73 self.State = State 74 # A string describing the error if the task has failed. 75 self.Error = Error 76 # A Progress object for tasks that give updates on long running tasks 77 self.Progress = Progress
class
TaskState(enum.Enum):
6class TaskState(Enum): 7 Empty = "None" # The task state is not defined. 8 Sent = "Sent" # The task has been sent by the client. 9 Received = "Received" # The task has been received by the server. 10 Started = "Started" # The task started by the server. 11 Completed = "Completed" # The task is completed by the server. 12 Cancelled = "Cancelled" # The task has been cancelled by the client. 13 Failed = "Failed" # The task has failed. A string describing the error is returned with the task. 14 Dropped = "Dropped" # The task has not been received by the server, or task IDs were sent out of sequence. 15 Disconnected = "Disconnected" # The client has been disconnected from the server before the task could finish.
Empty =
<TaskState.Empty: 'None'>
Sent =
<TaskState.Sent: 'Sent'>
Received =
<TaskState.Received: 'Received'>
Started =
<TaskState.Started: 'Started'>
Completed =
<TaskState.Completed: 'Completed'>
Cancelled =
<TaskState.Cancelled: 'Cancelled'>
Failed =
<TaskState.Failed: 'Failed'>
Dropped =
<TaskState.Dropped: 'Dropped'>
Disconnected =
<TaskState.Disconnected: 'Disconnected'>
class
Task:
18class Task: 19 """* 20 Generic task message for the Three Scanner. 21 22 The task message is the generic message used for requesting a task of the Three Scanner and receiving updates and results. 23 24 Example: Apply camera settings with the "SetCameras" task. 25 26 > Example request: 27 28 ```json 29 { 30 "Task":{ 31 "Index":1, 32 "Type":"SetCameras" 33 "Input":{ 34 "analogGain":256, 35 "digitalGain":128, 36 "exposure":18000 37 }, 38 } 39 } 40 ``` 41 42 > Example response: 43 44 ```json 45 { 46 "Task":{ 47 "Index":1, 48 "Type":"SetCameras" 49 "Input":{ 50 "analogGain":256, 51 "digitalGain":512, 52 "exposure":18000 53 }, 54 "Output":{ 55 "analogGain":{"default":512.0,"max":1024.0,"min":256.0,"value":256.0}, 56 "digitalGain":{"default":256,"max":65536,"min":256,"value":512}, 57 "exposure":{"default":27000,"max":90000,"min":9000,"value":18000}, 58 }, 59 "State":"Completed" 60 } 61 } 62 ``` 63 """ 64 def __init__(self, Index: int, Type: str, Input: _any_pb2 = None, Output: _any_pb2 = None, State: 'TaskState' = None, Error: str = None, Progress: _any_pb2 = None): 65 # A unique identifier generated by the client. This identifier associates all incoming and outgoing task messages with a specific task requested by the client. 66 self.Index = Index 67 # The string identifying the task type. See task definitions for the list of valid task strings. 68 self.Type = Type 69 # Optional input message. See each task definition for details. 70 self.Input = Input 71 # Optional output message. See each task definition for details. 72 self.Output = Output 73 # The current state of the task. 74 self.State = State 75 # A string describing the error if the task has failed. 76 self.Error = Error 77 # A Progress object for tasks that give updates on long running tasks 78 self.Progress = Progress
* Generic task message for the Three Scanner.
The task message is the generic message used for requesting a task of the Three Scanner and receiving updates and results.
Example: Apply camera settings with the "SetCameras" task.
Example request:
{
"Task":{
"Index":1,
"Type":"SetCameras"
"Input":{
"analogGain":256,
"digitalGain":128,
"exposure":18000
},
}
}
Example response:
{
"Task":{
"Index":1,
"Type":"SetCameras"
"Input":{
"analogGain":256,
"digitalGain":512,
"exposure":18000
},
"Output":{
"analogGain":{"default":512.0,"max":1024.0,"min":256.0,"value":256.0},
"digitalGain":{"default":256,"max":65536,"min":256,"value":512},
"exposure":{"default":27000,"max":90000,"min":9000,"value":18000},
},
"State":"Completed"
}
}
Task( Index: int, Type: str, Input: <module 'google.protobuf.any_pb2' from '/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/site-packages/google/protobuf/any_pb2.py'> = None, Output: <module 'google.protobuf.any_pb2' from '/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/site-packages/google/protobuf/any_pb2.py'> = None, State: TaskState = None, Error: str = None, Progress: <module 'google.protobuf.any_pb2' from '/opt/hostedtoolcache/Python/3.13.1/x64/lib/python3.13/site-packages/google/protobuf/any_pb2.py'> = None)
64 def __init__(self, Index: int, Type: str, Input: _any_pb2 = None, Output: _any_pb2 = None, State: 'TaskState' = None, Error: str = None, Progress: _any_pb2 = None): 65 # A unique identifier generated by the client. This identifier associates all incoming and outgoing task messages with a specific task requested by the client. 66 self.Index = Index 67 # The string identifying the task type. See task definitions for the list of valid task strings. 68 self.Type = Type 69 # Optional input message. See each task definition for details. 70 self.Input = Input 71 # Optional output message. See each task definition for details. 72 self.Output = Output 73 # The current state of the task. 74 self.State = State 75 # A string describing the error if the task has failed. 76 self.Error = Error 77 # A Progress object for tasks that give updates on long running tasks 78 self.Progress = Progress