mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
87 lines
2.0 KiB
Plaintext
87 lines
2.0 KiB
Plaintext
namespace fair.mq.sdk.cmd;
|
|
|
|
enum FBResult:byte {
|
|
Ok,
|
|
Failure
|
|
}
|
|
|
|
enum FBState:byte {
|
|
Ok,
|
|
Error,
|
|
Idle,
|
|
InitializingDevice,
|
|
Initialized,
|
|
Binding,
|
|
Bound,
|
|
Connecting,
|
|
DeviceReady,
|
|
InitializingTask,
|
|
Ready,
|
|
Running,
|
|
ResettingTask,
|
|
ResettingDevice,
|
|
Exiting
|
|
}
|
|
|
|
enum FBTransition:byte {
|
|
Auto,
|
|
InitDevice,
|
|
CompleteInit,
|
|
Bind,
|
|
Connect,
|
|
InitTask,
|
|
Run,
|
|
Stop,
|
|
ResetTask,
|
|
ResetDevice,
|
|
End,
|
|
ErrorFound
|
|
}
|
|
|
|
table FBProperty {
|
|
key:string;
|
|
value:string;
|
|
}
|
|
|
|
enum FBCmd:byte {
|
|
check_state, // args: { }
|
|
change_state, // args: { transition }
|
|
dump_config, // args: { }
|
|
subscribe_to_state_change, // args: { }
|
|
unsubscribe_from_state_change, // args: { }
|
|
state_change_exiting_received, // args: { }
|
|
get_properties, // args: { request_id, property_query }
|
|
set_properties, // args: { request_id, properties }
|
|
|
|
current_state, // args: { device_id, current_state }
|
|
transition_status, // args: { device_id, task_id, Result, transition }
|
|
config, // args: { device_id, config_string }
|
|
state_change_subscription, // args: { device_id, task_id, Result }
|
|
state_change_unsubscription, // args: { device_id, task_id, Result }
|
|
state_change, // args: { device_id, task_id, last_state, current_state }
|
|
properties, // args: { device_id, request_id, Result, properties }
|
|
properties_set // args: { device_id, request_id, Result }
|
|
}
|
|
|
|
table FBCommand {
|
|
command_id:FBCmd;
|
|
device_id:string;
|
|
task_id:uint64;
|
|
request_id:uint64;
|
|
state:FBState;
|
|
transition:FBTransition;
|
|
result:FBResult;
|
|
config_string:string;
|
|
last_state:FBState;
|
|
current_state:FBState;
|
|
debug:string;
|
|
properties:[FBProperty];
|
|
property_query:string;
|
|
}
|
|
|
|
table FBCommands {
|
|
commands:[FBCommand];
|
|
}
|
|
|
|
root_type FBCommands;
|