diff --git a/generated/nidcpower/nidcpower/session_pb2.py b/generated/nidcpower/nidcpower/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/nidcpower/nidcpower/session_pb2.py +++ b/generated/nidcpower/nidcpower/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/nidcpower/nidcpower/session_pb2_grpc.py b/generated/nidcpower/nidcpower/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/nidcpower/nidcpower/session_pb2_grpc.py +++ b/generated/nidcpower/nidcpower/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/generated/nidigital/nidigital/session_pb2.py b/generated/nidigital/nidigital/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/nidigital/nidigital/session_pb2.py +++ b/generated/nidigital/nidigital/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/nidigital/nidigital/session_pb2_grpc.py b/generated/nidigital/nidigital/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/nidigital/nidigital/session_pb2_grpc.py +++ b/generated/nidigital/nidigital/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/generated/nidmm/nidmm/session_pb2.py b/generated/nidmm/nidmm/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/nidmm/nidmm/session_pb2.py +++ b/generated/nidmm/nidmm/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/nidmm/nidmm/session_pb2_grpc.py b/generated/nidmm/nidmm/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/nidmm/nidmm/session_pb2_grpc.py +++ b/generated/nidmm/nidmm/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/generated/nifake/nifake/session_pb2.py b/generated/nifake/nifake/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/nifake/nifake/session_pb2.py +++ b/generated/nifake/nifake/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/nifake/nifake/session_pb2_grpc.py b/generated/nifake/nifake/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/nifake/nifake/session_pb2_grpc.py +++ b/generated/nifake/nifake/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/generated/nifake/nifake/unit_tests/test_grpc.py b/generated/nifake/nifake/unit_tests/test_grpc.py index e3463b93d5..f79f44ba56 100644 --- a/generated/nifake/nifake/unit_tests/test_grpc.py +++ b/generated/nifake/nifake/unit_tests/test_grpc.py @@ -13,7 +13,7 @@ import _mock_helper -GRPC_SESSION_OBJECT_FOR_TEST = nifake.session_pb2.Session(name="TestSession", id=42) +GRPC_SESSION_OBJECT_FOR_TEST = nifake.session_pb2.Session(name="TestSession") Metadatum = collections.namedtuple('Metadatum', ('key', 'value')) @@ -85,7 +85,6 @@ def _get_initialized_stub_interpreter(self, grpc_channel=object()): session_options = nifake.GrpcSessionOptions(grpc_channel, '', initialization_behavior=nifake.SessionInitializationBehavior.AUTO) interpreter = nifake._grpc_stub_interpreter.GrpcStubInterpreter(session_options) assert interpreter._client is self.patched_grpc_stub - assert interpreter.get_session_handle().id == 0 assert interpreter.get_session_handle().name == "" assert self.patched_grpc_stub._grpc_channel is grpc_channel interpreter.set_session_handle(GRPC_SESSION_OBJECT_FOR_TEST) @@ -203,7 +202,7 @@ def test_api_key_sent_to_init(self): library_func = 'InitWithOptions' expected_metadata = (('ni-api-key', nifake.MEASUREMENTLINK_23Q1_NIMI_PYTHON_API_KEY),) from nifake.session_pb2 import Session as GrpcSession - grpc_session_object = GrpcSession(id=42, name='') + grpc_session_object = GrpcSession(name='') response_object = self._set_side_effect(library_func, new_session_initialized=True, vi=grpc_session_object) init_behavior = nifake.SessionInitializationBehavior.AUTO grpc_options = nifake.GrpcSessionOptions(object(), '', initialization_behavior=init_behavior) diff --git a/generated/nifgen/nifgen/session_pb2.py b/generated/nifgen/nifgen/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/nifgen/nifgen/session_pb2.py +++ b/generated/nifgen/nifgen/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/nifgen/nifgen/session_pb2_grpc.py b/generated/nifgen/nifgen/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/nifgen/nifgen/session_pb2_grpc.py +++ b/generated/nifgen/nifgen/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/generated/nirfsg/nirfsg/session_pb2.py b/generated/nirfsg/nirfsg/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/nirfsg/nirfsg/session_pb2.py +++ b/generated/nirfsg/nirfsg/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/nirfsg/nirfsg/session_pb2_grpc.py b/generated/nirfsg/nirfsg/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/nirfsg/nirfsg/session_pb2_grpc.py +++ b/generated/nirfsg/nirfsg/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/generated/niscope/niscope/session_pb2.py b/generated/niscope/niscope/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/niscope/niscope/session_pb2.py +++ b/generated/niscope/niscope/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/niscope/niscope/session_pb2_grpc.py b/generated/niscope/niscope/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/niscope/niscope/session_pb2_grpc.py +++ b/generated/niscope/niscope/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/generated/niswitch/niswitch/session_pb2.py b/generated/niswitch/niswitch/session_pb2.py index 73b79bf26d..4f350ddfa4 100644 --- a/generated/niswitch/niswitch/session_pb2.py +++ b/generated/niswitch/niswitch/session_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"2\n\x07Session\x12\x0e\n\x04name\x18\x01 \x01(\tH\x00\x12\x0c\n\x02id\x18\x02 \x01(\rH\x00\x42\t\n\x07session\"j\n\x10\x44\x65viceProperties\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05model\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12\x12\n\nproduct_id\x18\x05 \x01(\r\"\x19\n\x17\x45numerateDevicesRequest\"L\n\x18\x45numerateDevicesResponse\x12\x30\n\x07\x64\x65vices\x18\x01 \x03(\x0b\x32\x1f.nidevice_grpc.DeviceProperties\";\n\x0eReserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"&\n\x0fReserveResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"F\n\x19IsReservedByClientRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"1\n\x1aIsReservedByClientResponse\x12\x13\n\x0bis_reserved\x18\x01 \x01(\x08\"=\n\x10UnreserveRequest\x12\x16\n\x0ereservation_id\x18\x01 \x01(\t\x12\x11\n\tclient_id\x18\x02 \x01(\t\"*\n\x11UnreserveResponse\x12\x15\n\ris_unreserved\x18\x01 \x01(\x08\"\x14\n\x12ResetServerRequest\".\n\x13ResetServerResponse\x12\x17\n\x0fis_server_reset\x18\x01 \x01(\x08*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x32\xd2\x03\n\x10SessionUtilities\x12\x63\n\x10\x45numerateDevices\x12&.nidevice_grpc.EnumerateDevicesRequest\x1a\'.nidevice_grpc.EnumerateDevicesResponse\x12H\n\x07Reserve\x12\x1d.nidevice_grpc.ReserveRequest\x1a\x1e.nidevice_grpc.ReserveResponse\x12i\n\x12IsReservedByClient\x12(.nidevice_grpc.IsReservedByClientRequest\x1a).nidevice_grpc.IsReservedByClientResponse\x12N\n\tUnreserve\x12\x1f.nidevice_grpc.UnreserveRequest\x1a .nidevice_grpc.UnreserveResponse\x12T\n\x0bResetServer\x12!.nidevice_grpc.ResetServerRequest\x1a\".nidevice_grpc.ResetServerResponseBB\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rsession.proto\x12\rnidevice_grpc\"\x17\n\x07Session\x12\x0c\n\x04name\x18\x01 \x01(\t*\xbc\x01\n\x1dSessionInitializationBehavior\x12/\n+SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x32\n.SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW\x10\x01\x12\x36\n2SESSION_INITIALIZATION_BEHAVIOR_ATTACH_TO_EXISTING\x10\x02\x42\x42\n\x12\x63om.ni.grpc.deviceB\x08NiDeviceP\x01\xaa\x02\x1fNationalInstruments.Grpc.Deviceb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -21,32 +21,8 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None DESCRIPTOR._serialized_options = b'\n\022com.ni.grpc.deviceB\010NiDeviceP\001\252\002\037NationalInstruments.Grpc.Device' - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=699 - _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=887 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_start=58 + _globals['_SESSIONINITIALIZATIONBEHAVIOR']._serialized_end=246 _globals['_SESSION']._serialized_start=32 - _globals['_SESSION']._serialized_end=82 - _globals['_DEVICEPROPERTIES']._serialized_start=84 - _globals['_DEVICEPROPERTIES']._serialized_end=190 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_start=192 - _globals['_ENUMERATEDEVICESREQUEST']._serialized_end=217 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_start=219 - _globals['_ENUMERATEDEVICESRESPONSE']._serialized_end=295 - _globals['_RESERVEREQUEST']._serialized_start=297 - _globals['_RESERVEREQUEST']._serialized_end=356 - _globals['_RESERVERESPONSE']._serialized_start=358 - _globals['_RESERVERESPONSE']._serialized_end=396 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_start=398 - _globals['_ISRESERVEDBYCLIENTREQUEST']._serialized_end=468 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_start=470 - _globals['_ISRESERVEDBYCLIENTRESPONSE']._serialized_end=519 - _globals['_UNRESERVEREQUEST']._serialized_start=521 - _globals['_UNRESERVEREQUEST']._serialized_end=582 - _globals['_UNRESERVERESPONSE']._serialized_start=584 - _globals['_UNRESERVERESPONSE']._serialized_end=626 - _globals['_RESETSERVERREQUEST']._serialized_start=628 - _globals['_RESETSERVERREQUEST']._serialized_end=648 - _globals['_RESETSERVERRESPONSE']._serialized_start=650 - _globals['_RESETSERVERRESPONSE']._serialized_end=696 - _globals['_SESSIONUTILITIES']._serialized_start=890 - _globals['_SESSIONUTILITIES']._serialized_end=1356 + _globals['_SESSION']._serialized_end=55 # @@protoc_insertion_point(module_scope) diff --git a/generated/niswitch/niswitch/session_pb2_grpc.py b/generated/niswitch/niswitch/session_pb2_grpc.py index 28709265d2..2daafffebf 100644 --- a/generated/niswitch/niswitch/session_pb2_grpc.py +++ b/generated/niswitch/niswitch/session_pb2_grpc.py @@ -2,203 +2,3 @@ """Client and server classes corresponding to protobuf-defined services.""" import grpc -from . import session_pb2 as session__pb2 - - -class SessionUtilitiesStub(object): - """Missing associated documentation comment in .proto file.""" - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. - """ - self.EnumerateDevices = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/EnumerateDevices', - request_serializer=session__pb2.EnumerateDevicesRequest.SerializeToString, - response_deserializer=session__pb2.EnumerateDevicesResponse.FromString, - ) - self.Reserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Reserve', - request_serializer=session__pb2.ReserveRequest.SerializeToString, - response_deserializer=session__pb2.ReserveResponse.FromString, - ) - self.IsReservedByClient = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/IsReservedByClient', - request_serializer=session__pb2.IsReservedByClientRequest.SerializeToString, - response_deserializer=session__pb2.IsReservedByClientResponse.FromString, - ) - self.Unreserve = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/Unreserve', - request_serializer=session__pb2.UnreserveRequest.SerializeToString, - response_deserializer=session__pb2.UnreserveResponse.FromString, - ) - self.ResetServer = channel.unary_unary( - '/nidevice_grpc.SessionUtilities/ResetServer', - request_serializer=session__pb2.ResetServerRequest.SerializeToString, - response_deserializer=session__pb2.ResetServerResponse.FromString, - ) - - -class SessionUtilitiesServicer(object): - """Missing associated documentation comment in .proto file.""" - - def EnumerateDevices(self, request, context): - """Provides a list of devices or chassis connected to server under localhost - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Reserve(self, request, context): - """Reserve a set of client defined resources for exclusive use - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def IsReservedByClient(self, request, context): - """Determines if a set of client defined resources is currently reserved by a - specific client - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Unreserve(self, request, context): - """Unreserves a previously reserved resource - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ResetServer(self, request, context): - """Resets the server to a default state with no open sessions - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - -def add_SessionUtilitiesServicer_to_server(servicer, server): - rpc_method_handlers = { - 'EnumerateDevices': grpc.unary_unary_rpc_method_handler( - servicer.EnumerateDevices, - request_deserializer=session__pb2.EnumerateDevicesRequest.FromString, - response_serializer=session__pb2.EnumerateDevicesResponse.SerializeToString, - ), - 'Reserve': grpc.unary_unary_rpc_method_handler( - servicer.Reserve, - request_deserializer=session__pb2.ReserveRequest.FromString, - response_serializer=session__pb2.ReserveResponse.SerializeToString, - ), - 'IsReservedByClient': grpc.unary_unary_rpc_method_handler( - servicer.IsReservedByClient, - request_deserializer=session__pb2.IsReservedByClientRequest.FromString, - response_serializer=session__pb2.IsReservedByClientResponse.SerializeToString, - ), - 'Unreserve': grpc.unary_unary_rpc_method_handler( - servicer.Unreserve, - request_deserializer=session__pb2.UnreserveRequest.FromString, - response_serializer=session__pb2.UnreserveResponse.SerializeToString, - ), - 'ResetServer': grpc.unary_unary_rpc_method_handler( - servicer.ResetServer, - request_deserializer=session__pb2.ResetServerRequest.FromString, - response_serializer=session__pb2.ResetServerResponse.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'nidevice_grpc.SessionUtilities', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) - - - # This class is part of an EXPERIMENTAL API. -class SessionUtilities(object): - """Missing associated documentation comment in .proto file.""" - - @staticmethod - def EnumerateDevices(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, '/nidevice_grpc.SessionUtilities/EnumerateDevices', - session__pb2.EnumerateDevicesRequest.SerializeToString, - session__pb2.EnumerateDevicesResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Reserve(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, '/nidevice_grpc.SessionUtilities/Reserve', - session__pb2.ReserveRequest.SerializeToString, - session__pb2.ReserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def IsReservedByClient(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, '/nidevice_grpc.SessionUtilities/IsReservedByClient', - session__pb2.IsReservedByClientRequest.SerializeToString, - session__pb2.IsReservedByClientResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def Unreserve(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, '/nidevice_grpc.SessionUtilities/Unreserve', - session__pb2.UnreserveRequest.SerializeToString, - session__pb2.UnreserveResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) - - @staticmethod - def ResetServer(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, '/nidevice_grpc.SessionUtilities/ResetServer', - session__pb2.ResetServerRequest.SerializeToString, - session__pb2.ResetServerResponse.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/nifake/unit_tests/test_grpc.py b/src/nifake/unit_tests/test_grpc.py index e3463b93d5..f79f44ba56 100644 --- a/src/nifake/unit_tests/test_grpc.py +++ b/src/nifake/unit_tests/test_grpc.py @@ -13,7 +13,7 @@ import _mock_helper -GRPC_SESSION_OBJECT_FOR_TEST = nifake.session_pb2.Session(name="TestSession", id=42) +GRPC_SESSION_OBJECT_FOR_TEST = nifake.session_pb2.Session(name="TestSession") Metadatum = collections.namedtuple('Metadatum', ('key', 'value')) @@ -85,7 +85,6 @@ def _get_initialized_stub_interpreter(self, grpc_channel=object()): session_options = nifake.GrpcSessionOptions(grpc_channel, '', initialization_behavior=nifake.SessionInitializationBehavior.AUTO) interpreter = nifake._grpc_stub_interpreter.GrpcStubInterpreter(session_options) assert interpreter._client is self.patched_grpc_stub - assert interpreter.get_session_handle().id == 0 assert interpreter.get_session_handle().name == "" assert self.patched_grpc_stub._grpc_channel is grpc_channel interpreter.set_session_handle(GRPC_SESSION_OBJECT_FOR_TEST) @@ -203,7 +202,7 @@ def test_api_key_sent_to_init(self): library_func = 'InitWithOptions' expected_metadata = (('ni-api-key', nifake.MEASUREMENTLINK_23Q1_NIMI_PYTHON_API_KEY),) from nifake.session_pb2 import Session as GrpcSession - grpc_session_object = GrpcSession(id=42, name='') + grpc_session_object = GrpcSession(name='') response_object = self._set_side_effect(library_func, new_session_initialized=True, vi=grpc_session_object) init_behavior = nifake.SessionInitializationBehavior.AUTO grpc_options = nifake.GrpcSessionOptions(object(), '', initialization_behavior=init_behavior) diff --git a/src/shared_protos/session.proto b/src/shared_protos/session.proto index 52413c4aa3..46c9fb944e 100644 --- a/src/shared_protos/session.proto +++ b/src/shared_protos/session.proto @@ -7,26 +7,6 @@ option csharp_namespace = "NationalInstruments.Grpc.Device"; package nidevice_grpc; -service SessionUtilities { - // Provides a list of devices or chassis connected to server under localhost - rpc EnumerateDevices(EnumerateDevicesRequest) - returns (EnumerateDevicesResponse); - - // Reserve a set of client defined resources for exclusive use - rpc Reserve(ReserveRequest) returns (ReserveResponse); - - // Determines if a set of client defined resources is currently reserved by a - // specific client - rpc IsReservedByClient(IsReservedByClientRequest) - returns (IsReservedByClientResponse); - - // Unreserves a previously reserved resource - rpc Unreserve(UnreserveRequest) returns (UnreserveResponse); - - // Resets the server to a default state with no open sessions - rpc ResetServer(ResetServerRequest) returns (ResetServerResponse); -} - enum SessionInitializationBehavior { SESSION_INITIALIZATION_BEHAVIOR_UNSPECIFIED = 0; SESSION_INITIALIZATION_BEHAVIOR_INITIALIZE_NEW = 1; @@ -34,61 +14,5 @@ enum SessionInitializationBehavior { } message Session { - oneof session { - string name = 1; - uint32 id = 2; - } -} - -message DeviceProperties { string name = 1; - string model = 2; - string vendor = 3; - string serial_number = 4; - uint32 product_id = 5; -} - -message EnumerateDevicesRequest {} - -message EnumerateDevicesResponse { - repeated DeviceProperties devices = 1; -} - -message ReserveRequest { - // client defined string representing a set of reservable resources - string reservation_id = 1; - // client defined identifier for a specific client - string client_id = 2; -} - -message ReserveResponse { - bool is_reserved = 1; -} - -message IsReservedByClientRequest { - // client defined string representing a set of reservable resources - string reservation_id = 1; - // client defined identifier for a specific client - string client_id = 2; -} - -message IsReservedByClientResponse { - bool is_reserved = 1; -} - -message UnreserveRequest { - // client defined string representing a set of reservable resources - string reservation_id = 1; - // client defined identifier for a specific client - string client_id = 2; -} - -message UnreserveResponse { - bool is_unreserved = 1; -} - -message ResetServerRequest {} - -message ResetServerResponse { - bool is_server_reset = 1; -} +} \ No newline at end of file diff --git a/src/shared_protos/session_utilities.proto b/src/shared_protos/session_utilities.proto new file mode 100644 index 0000000000..7149cec0ae --- /dev/null +++ b/src/shared_protos/session_utilities.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; + +option java_multiple_files = true; +option java_package = "com.ni.grpc.device"; +option java_outer_classname = "NiDevice"; +option csharp_namespace = "NationalInstruments.Grpc.Device"; + +package nidevice_grpc; + +service SessionUtilities { + // Provides a list of devices or chassis connected to server under localhost + rpc EnumerateDevices(EnumerateDevicesRequest) + returns (EnumerateDevicesResponse); + + // Provides a list of NI software installed on server under localhost + rpc EnumerateInstalledSoftware(EnumerateInstalledSoftwareRequest) + returns (EnumerateInstalledSoftwareResponse); + + // Reserve a set of client defined resources for exclusive use + rpc Reserve(ReserveRequest) returns (ReserveResponse); + + // Determines if a set of client defined resources is currently reserved by a + // specific client + rpc IsReservedByClient(IsReservedByClientRequest) + returns (IsReservedByClientResponse); + + // Unreserves a previously reserved resource + rpc Unreserve(UnreserveRequest) returns (UnreserveResponse); + + // Resets the server to a default state with no open sessions + rpc ResetServer(ResetServerRequest) returns (ResetServerResponse); +} + +message DeviceProperties { + string name = 1; + string model = 2; + string vendor = 3; + string serial_number = 4; + uint32 product_id = 5; +} + +message EnumerateDevicesRequest {} + +message EnumerateDevicesResponse { + repeated DeviceProperties devices = 1; +} + +message SoftwareProperties { + string package_id = 1; + string package_version = 2; + string product_name = 3; +} + +message EnumerateInstalledSoftwareRequest { + bool include_hidden_packages = 1; +} + +message EnumerateInstalledSoftwareResponse { + repeated SoftwareProperties software = 1; +} + +message ReserveRequest { + // client defined string representing a set of reservable resources + string reservation_id = 1; + // client defined identifier for a specific client + string client_id = 2; +} + +message ReserveResponse { + bool is_reserved = 1; +} + +message IsReservedByClientRequest { + // client defined string representing a set of reservable resources + string reservation_id = 1; + // client defined identifier for a specific client + string client_id = 2; +} + +message IsReservedByClientResponse { + bool is_reserved = 1; +} + +message UnreserveRequest { + // client defined string representing a set of reservable resources + string reservation_id = 1; + // client defined identifier for a specific client + string client_id = 2; +} + +message UnreserveResponse { + bool is_unreserved = 1; +} + +message ResetServerRequest {} + +message ResetServerResponse { + bool is_server_reset = 1; +}