Repository URL to install this package:
|
Version:
4.1.0 ▾
|
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
from bosdyn.api import license_pb2 as bosdyn_dot_api_dot_license__pb2
class LicenseServiceStub(object):
"""The LicenseService allows clients to query the currently installed license on robot.
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.GetLicenseInfo = channel.unary_unary(
'/bosdyn.api.LicenseService/GetLicenseInfo',
request_serializer=bosdyn_dot_api_dot_license__pb2.GetLicenseInfoRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_license__pb2.GetLicenseInfoResponse.FromString,
)
self.GetFeatureEnabled = channel.unary_unary(
'/bosdyn.api.LicenseService/GetFeatureEnabled',
request_serializer=bosdyn_dot_api_dot_license__pb2.GetFeatureEnabledRequest.SerializeToString,
response_deserializer=bosdyn_dot_api_dot_license__pb2.GetFeatureEnabledResponse.FromString,
)
class LicenseServiceServicer(object):
"""The LicenseService allows clients to query the currently installed license on robot.
"""
def GetLicenseInfo(self, request, context):
"""Get information, such as the license number, dates of validity, and features for the license
currently uploaded on the robot.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def GetFeatureEnabled(self, request, context):
"""Check if specific features (identified by string names) are enabled under the currently
loaded license for this robot.
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_LicenseServiceServicer_to_server(servicer, server):
rpc_method_handlers = {
'GetLicenseInfo': grpc.unary_unary_rpc_method_handler(
servicer.GetLicenseInfo,
request_deserializer=bosdyn_dot_api_dot_license__pb2.GetLicenseInfoRequest.FromString,
response_serializer=bosdyn_dot_api_dot_license__pb2.GetLicenseInfoResponse.SerializeToString,
),
'GetFeatureEnabled': grpc.unary_unary_rpc_method_handler(
servicer.GetFeatureEnabled,
request_deserializer=bosdyn_dot_api_dot_license__pb2.GetFeatureEnabledRequest.FromString,
response_serializer=bosdyn_dot_api_dot_license__pb2.GetFeatureEnabledResponse.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'bosdyn.api.LicenseService', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
# This class is part of an EXPERIMENTAL API.
class LicenseService(object):
"""The LicenseService allows clients to query the currently installed license on robot.
"""
@staticmethod
def GetLicenseInfo(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, '/bosdyn.api.LicenseService/GetLicenseInfo',
bosdyn_dot_api_dot_license__pb2.GetLicenseInfoRequest.SerializeToString,
bosdyn_dot_api_dot_license__pb2.GetLicenseInfoResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def GetFeatureEnabled(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, '/bosdyn.api.LicenseService/GetFeatureEnabled',
bosdyn_dot_api_dot_license__pb2.GetFeatureEnabledRequest.SerializeToString,
bosdyn_dot_api_dot_license__pb2.GetFeatureEnabledResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)