diff --git a/python_not_for_dunedaq/druncschema/controller_pb2.py b/python_not_for_dunedaq/druncschema/controller_pb2.py index 158f268..5fe69cd 100644 --- a/python_not_for_dunedaq/druncschema/controller_pb2.py +++ b/python_not_for_dunedaq/druncschema/controller_pb2.py @@ -16,7 +16,7 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x64runcschema/controller.proto\x12\x13\x64unedaq.druncschema\x1a\"druncschema/request_response.proto\x1a\x19google/protobuf/any.proto\"\xe1\x01\n\nFSMCommand\x12\x14\n\x0c\x63ommand_name\x18\x01 \x01(\t\x12\x41\n\targuments\x18\x02 \x03(\x0b\x32..dunedaq.druncschema.FSMCommand.ArgumentsEntry\x12\x16\n\x0e\x63hildren_nodes\x18\x03 \x03(\t\x12\x11\n\x04\x64\x61ta\x18\x04 \x01(\tH\x00\x88\x01\x01\x1a\x46\n\x0e\x41rgumentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x42\x07\n\x05_data\"\x82\x01\n\x12\x46SMCommandResponse\x12\x32\n\x04\x66lag\x18\x01 \x01(\x0e\x32$.dunedaq.druncschema.FSMResponseFlag\x12\x14\n\x0c\x63ommand_name\x18\x02 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\"\xd8\x02\n\x08\x41rgument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x08presence\x18\x02 \x01(\x0e\x32&.dunedaq.druncschema.Argument.Presence\x12\x30\n\x04type\x18\x03 \x01(\x0e\x32\".dunedaq.druncschema.Argument.Type\x12\x30\n\rdefault_value\x18\x04 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x88\x01\x01\x12%\n\x07\x63hoices\x18\x05 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x0c\n\x04help\x18\x06 \x01(\t\"\'\n\x08Presence\x12\r\n\tMANDATORY\x10\x00\x12\x0c\n\x08OPTIONAL\x10\x01\"0\n\x04Type\x12\x07\n\x03INT\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x42\x10\n\x0e_default_value\"\x8d\x01\n\x15\x46SMCommandDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x03(\t\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x13\n\x0breturn_type\x18\x04 \x01(\t\x12\x30\n\targuments\x18\x05 \x03(\x0b\x32\x1d.dunedaq.druncschema.Argument\"\x94\x01\n\x16\x46SMCommandsDescription\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x07session\x18\x03 \x01(\tH\x00\x88\x01\x01\x12<\n\x08\x63ommands\x18\x04 \x03(\x0b\x32*.dunedaq.druncschema.FSMCommandDescriptionB\n\n\x08_session\"N\n\x06Status\x12\r\n\x05state\x18\x02 \x01(\t\x12\x11\n\tsub_state\x18\x03 \x01(\t\x12\x10\n\x08in_error\x18\x04 \x01(\x08\x12\x10\n\x08included\x18\x05 \x01(\x08*\x9a\x01\n\x0f\x46SMResponseFlag\x12\x1d\n\x19\x46SM_EXECUTED_SUCCESSFULLY\x10\x00\x12\x0e\n\nFSM_FAILED\x10\x01\x12\x1a\n\x16\x46SM_INVALID_TRANSITION\x10\x02\x12\x1d\n\x19\x46SM_NOT_EXECUTED_EXCLUDED\x10\x03\x12\x1d\n\x19\x46SM_NOT_EXECUTED_IN_ERROR\x10\x04\x32\xcf\x05\n\nController\x12I\n\x08\x64\x65scribe\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12G\n\x06status\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12M\n\x0c\x64\x65scribe_fsm\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12T\n\x13\x65xecute_fsm_command\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12H\n\x07include\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12H\n\x07\x65xclude\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12M\n\x0ctake_control\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12R\n\x11surrender_control\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12Q\n\x10who_is_in_charge\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1c\x64runcschema/controller.proto\x12\x13\x64unedaq.druncschema\x1a\"druncschema/request_response.proto\x1a\x19google/protobuf/any.proto\"\xe1\x01\n\nFSMCommand\x12\x14\n\x0c\x63ommand_name\x18\x01 \x01(\t\x12\x41\n\targuments\x18\x02 \x03(\x0b\x32..dunedaq.druncschema.FSMCommand.ArgumentsEntry\x12\x16\n\x0e\x63hildren_nodes\x18\x03 \x03(\t\x12\x11\n\x04\x64\x61ta\x18\x04 \x01(\tH\x00\x88\x01\x01\x1a\x46\n\x0e\x41rgumentsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12#\n\x05value\x18\x02 \x01(\x0b\x32\x14.google.protobuf.Any:\x02\x38\x01\x42\x07\n\x05_data\"\x82\x01\n\x12\x46SMCommandResponse\x12\x32\n\x04\x66lag\x18\x01 \x01(\x0e\x32$.dunedaq.druncschema.FSMResponseFlag\x12\x14\n\x0c\x63ommand_name\x18\x02 \x01(\t\x12\"\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\"\xd8\x02\n\x08\x41rgument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x08presence\x18\x02 \x01(\x0e\x32&.dunedaq.druncschema.Argument.Presence\x12\x30\n\x04type\x18\x03 \x01(\x0e\x32\".dunedaq.druncschema.Argument.Type\x12\x30\n\rdefault_value\x18\x04 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x88\x01\x01\x12%\n\x07\x63hoices\x18\x05 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x0c\n\x04help\x18\x06 \x01(\t\"\'\n\x08Presence\x12\r\n\tMANDATORY\x10\x00\x12\x0c\n\x08OPTIONAL\x10\x01\"0\n\x04Type\x12\x07\n\x03INT\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x42\x10\n\x0e_default_value\"\x8d\x01\n\x15\x46SMCommandDescription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tdata_type\x18\x02 \x03(\t\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x13\n\x0breturn_type\x18\x04 \x01(\t\x12\x30\n\targuments\x18\x05 \x03(\x0b\x32\x1d.dunedaq.druncschema.Argument\"\x94\x01\n\x16\x46SMCommandsDescription\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x14\n\x07session\x18\x03 \x01(\tH\x00\x88\x01\x01\x12<\n\x08\x63ommands\x18\x04 \x03(\x0b\x32*.dunedaq.druncschema.FSMCommandDescriptionB\n\n\x08_session\"\\\n\x06Status\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05state\x18\x02 \x01(\t\x12\x11\n\tsub_state\x18\x03 \x01(\t\x12\x10\n\x08in_error\x18\x04 \x01(\x08\x12\x10\n\x08included\x18\x05 \x01(\x08\"F\n\x0e\x43hildrenStatus\x12\x34\n\x0f\x63hildren_status\x18\x01 \x03(\x0b\x32\x1b.dunedaq.druncschema.Status*\x9a\x01\n\x0f\x46SMResponseFlag\x12\x1d\n\x19\x46SM_EXECUTED_SUCCESSFULLY\x10\x00\x12\x0e\n\nFSM_FAILED\x10\x01\x12\x1a\n\x16\x46SM_INVALID_TRANSITION\x10\x02\x12\x1d\n\x19\x46SM_NOT_EXECUTED_EXCLUDED\x10\x03\x12\x1d\n\x19\x46SM_NOT_EXECUTED_IN_ERROR\x10\x04\x32\xee\x06\n\nController\x12\x43\n\x02ls\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12I\n\x08\x64\x65scribe\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12T\n\x13get_children_status\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12K\n\nget_status\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12M\n\x0c\x64\x65scribe_fsm\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12T\n\x13\x65xecute_fsm_command\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12H\n\x07include\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12H\n\x07\x65xclude\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12M\n\x0ctake_control\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12R\n\x11surrender_control\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x12Q\n\x10who_is_in_charge\x12\x1c.dunedaq.druncschema.Request\x1a\x1d.dunedaq.druncschema.Response\"\x00\x62\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,8 +25,8 @@ DESCRIPTOR._options = None _globals['_FSMCOMMAND_ARGUMENTSENTRY']._options = None _globals['_FSMCOMMAND_ARGUMENTSENTRY']._serialized_options = b'8\001' - _globals['_FSMRESPONSEFLAG']._serialized_start=1200 - _globals['_FSMRESPONSEFLAG']._serialized_end=1354 + _globals['_FSMRESPONSEFLAG']._serialized_start=1286 + _globals['_FSMRESPONSEFLAG']._serialized_end=1440 _globals['_FSMCOMMAND']._serialized_start=117 _globals['_FSMCOMMAND']._serialized_end=342 _globals['_FSMCOMMAND_ARGUMENTSENTRY']._serialized_start=263 @@ -44,7 +44,9 @@ _globals['_FSMCOMMANDSDESCRIPTION']._serialized_start=969 _globals['_FSMCOMMANDSDESCRIPTION']._serialized_end=1117 _globals['_STATUS']._serialized_start=1119 - _globals['_STATUS']._serialized_end=1197 - _globals['_CONTROLLER']._serialized_start=1357 - _globals['_CONTROLLER']._serialized_end=2076 + _globals['_STATUS']._serialized_end=1211 + _globals['_CHILDRENSTATUS']._serialized_start=1213 + _globals['_CHILDRENSTATUS']._serialized_end=1283 + _globals['_CONTROLLER']._serialized_start=1443 + _globals['_CONTROLLER']._serialized_end=2321 # @@protoc_insertion_point(module_scope) diff --git a/python_not_for_dunedaq/druncschema/controller_pb2_grpc.py b/python_not_for_dunedaq/druncschema/controller_pb2_grpc.py index 3b59a58..2251b5f 100644 --- a/python_not_for_dunedaq/druncschema/controller_pb2_grpc.py +++ b/python_not_for_dunedaq/druncschema/controller_pb2_grpc.py @@ -14,13 +14,23 @@ def __init__(self, channel): Args: channel: A grpc.Channel. """ + self.ls = channel.unary_unary( + '/dunedaq.druncschema.Controller/ls', + request_serializer=druncschema_dot_request__response__pb2.Request.SerializeToString, + response_deserializer=druncschema_dot_request__response__pb2.Response.FromString, + ) self.describe = channel.unary_unary( '/dunedaq.druncschema.Controller/describe', request_serializer=druncschema_dot_request__response__pb2.Request.SerializeToString, response_deserializer=druncschema_dot_request__response__pb2.Response.FromString, ) - self.status = channel.unary_unary( - '/dunedaq.druncschema.Controller/status', + self.get_children_status = channel.unary_unary( + '/dunedaq.druncschema.Controller/get_children_status', + request_serializer=druncschema_dot_request__response__pb2.Request.SerializeToString, + response_deserializer=druncschema_dot_request__response__pb2.Response.FromString, + ) + self.get_status = channel.unary_unary( + '/dunedaq.druncschema.Controller/get_status', request_serializer=druncschema_dot_request__response__pb2.Request.SerializeToString, response_deserializer=druncschema_dot_request__response__pb2.Response.FromString, ) @@ -64,13 +74,25 @@ def __init__(self, channel): class ControllerServicer(object): """Missing associated documentation comment in .proto file.""" + def ls(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def describe(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') - def status(self, request, context): + def get_children_status(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def get_status(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -121,13 +143,23 @@ def who_is_in_charge(self, request, context): def add_ControllerServicer_to_server(servicer, server): rpc_method_handlers = { + 'ls': grpc.unary_unary_rpc_method_handler( + servicer.ls, + request_deserializer=druncschema_dot_request__response__pb2.Request.FromString, + response_serializer=druncschema_dot_request__response__pb2.Response.SerializeToString, + ), 'describe': grpc.unary_unary_rpc_method_handler( servicer.describe, request_deserializer=druncschema_dot_request__response__pb2.Request.FromString, response_serializer=druncschema_dot_request__response__pb2.Response.SerializeToString, ), - 'status': grpc.unary_unary_rpc_method_handler( - servicer.status, + 'get_children_status': grpc.unary_unary_rpc_method_handler( + servicer.get_children_status, + request_deserializer=druncschema_dot_request__response__pb2.Request.FromString, + response_serializer=druncschema_dot_request__response__pb2.Response.SerializeToString, + ), + 'get_status': grpc.unary_unary_rpc_method_handler( + servicer.get_status, request_deserializer=druncschema_dot_request__response__pb2.Request.FromString, response_serializer=druncschema_dot_request__response__pb2.Response.SerializeToString, ), @@ -176,6 +208,23 @@ def add_ControllerServicer_to_server(servicer, server): class Controller(object): """Missing associated documentation comment in .proto file.""" + @staticmethod + def ls(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dunedaq.druncschema.Controller/ls', + druncschema_dot_request__response__pb2.Request.SerializeToString, + druncschema_dot_request__response__pb2.Response.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def describe(request, target, @@ -194,7 +243,24 @@ def describe(request, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @staticmethod - def status(request, + def get_children_status(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/dunedaq.druncschema.Controller/get_children_status', + druncschema_dot_request__response__pb2.Request.SerializeToString, + druncschema_dot_request__response__pb2.Response.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def get_status(request, target, options=(), channel_credentials=None, @@ -204,7 +270,7 @@ def status(request, wait_for_ready=None, timeout=None, metadata=None): - return grpc.experimental.unary_unary(request, target, '/dunedaq.druncschema.Controller/status', + return grpc.experimental.unary_unary(request, target, '/dunedaq.druncschema.Controller/get_status', druncschema_dot_request__response__pb2.Request.SerializeToString, druncschema_dot_request__response__pb2.Response.FromString, options, channel_credentials, diff --git a/schema/druncschema/controller.proto b/schema/druncschema/controller.proto index 7fb165e..eb17411 100644 --- a/schema/druncschema/controller.proto +++ b/schema/druncschema/controller.proto @@ -6,8 +6,10 @@ import "druncschema/request_response.proto"; import "google/protobuf/any.proto"; service Controller { + rpc ls (Request) returns (Response) {} rpc describe (Request) returns (Response) {} - rpc status (Request) returns (Response) {} + rpc get_children_status (Request) returns (Response) {} + rpc get_status (Request) returns (Response) {} rpc describe_fsm (Request) returns (Response) {} rpc execute_fsm_command (Request) returns (Response) {} @@ -40,6 +42,8 @@ message FSMCommandResponse{ google.protobuf.Any data = 3; } + + message Argument { enum Presence{ MANDATORY = 0; @@ -77,9 +81,22 @@ message FSMCommandsDescription { } + message Status { + string name = 1; string state = 2; string sub_state = 3; bool in_error = 4; bool included = 5; } + +message ChildrenStatus { + repeated Status children_status = 1; +} + +// message CommandResponse { +// Command command = 1; +// int32 command_code = 2; +// google.protobuf.Any payload = 3; +// } +