Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
670 lines (613 sloc) 25.7 KB
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: piglow.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='piglow.proto',
package='proto',
syntax='proto3',
serialized_pb=_b('\n\x0cpiglow.proto\x12\x05proto\"-\n\nLedRequest\x12\x0b\n\x03num\x18\x01 \x01(\x05\x12\x12\n\nbrightness\x18\x02 \x01(\r\"\'\n\x11\x42rightnessRequest\x12\x12\n\nbrightness\x18\x01 \x01(\r\"7\n\x0fTentacleRequest\x12\x10\n\x08tentacle\x18\x01 \x01(\x05\x12\x12\n\nbrightness\x18\x02 \x01(\r\"m\n\x14ValueTentacleRequest\x12\x10\n\x08tentacle\x18\x01 \x01(\x05\x12\x0b\n\x03val\x18\x02 \x01(\x01\x12\x0f\n\x07max_val\x18\x03 \x01(\x01\x12\x12\n\nbrightness\x18\x04 \x01(\r\x12\x11\n\tdirection\x18\x05 \x01(\x08\"\x11\n\x03\x41\x63k\x12\n\n\x02ok\x18\x01 \x01(\x08\x32\x96\x04\n\x06PiGlow\x12)\n\x06SetLED\x12\x11.proto.LedRequest\x1a\n.proto.Ack\"\x00\x12\x30\n\x06SetAll\x12\x18.proto.BrightnessRequest\x1a\n.proto.Ack\"\x00\x12\x32\n\x08SetWhite\x12\x18.proto.BrightnessRequest\x1a\n.proto.Ack\"\x00\x12\x31\n\x07SetBlue\x12\x18.proto.BrightnessRequest\x1a\n.proto.Ack\"\x00\x12\x32\n\x08SetGreen\x12\x18.proto.BrightnessRequest\x1a\n.proto.Ack\"\x00\x12\x33\n\tSetYellow\x12\x18.proto.BrightnessRequest\x1a\n.proto.Ack\"\x00\x12\x33\n\tSetOrange\x12\x18.proto.BrightnessRequest\x1a\n.proto.Ack\"\x00\x12\x30\n\x06SetRed\x12\x18.proto.BrightnessRequest\x1a\n.proto.Ack\"\x00\x12\x33\n\x0bSetTentacle\x12\x16.proto.TentacleRequest\x1a\n.proto.Ack\"\x00\x12\x43\n\x16\x44isplayValueOnTentacle\x12\x1b.proto.ValueTentacleRequest\x1a\n.proto.Ack\"\x00\x62\x06proto3')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_LEDREQUEST = _descriptor.Descriptor(
name='LedRequest',
full_name='proto.LedRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='num', full_name='proto.LedRequest.num', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='brightness', full_name='proto.LedRequest.brightness', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=23,
serialized_end=68,
)
_BRIGHTNESSREQUEST = _descriptor.Descriptor(
name='BrightnessRequest',
full_name='proto.BrightnessRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='brightness', full_name='proto.BrightnessRequest.brightness', index=0,
number=1, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=70,
serialized_end=109,
)
_TENTACLEREQUEST = _descriptor.Descriptor(
name='TentacleRequest',
full_name='proto.TentacleRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='tentacle', full_name='proto.TentacleRequest.tentacle', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='brightness', full_name='proto.TentacleRequest.brightness', index=1,
number=2, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=111,
serialized_end=166,
)
_VALUETENTACLEREQUEST = _descriptor.Descriptor(
name='ValueTentacleRequest',
full_name='proto.ValueTentacleRequest',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='tentacle', full_name='proto.ValueTentacleRequest.tentacle', index=0,
number=1, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='val', full_name='proto.ValueTentacleRequest.val', index=1,
number=2, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='max_val', full_name='proto.ValueTentacleRequest.max_val', index=2,
number=3, type=1, cpp_type=5, label=1,
has_default_value=False, default_value=float(0),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='brightness', full_name='proto.ValueTentacleRequest.brightness', index=3,
number=4, type=13, cpp_type=3, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='direction', full_name='proto.ValueTentacleRequest.direction', index=4,
number=5, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=168,
serialized_end=277,
)
_ACK = _descriptor.Descriptor(
name='Ack',
full_name='proto.Ack',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='ok', full_name='proto.Ack.ok', index=0,
number=1, type=8, cpp_type=7, label=1,
has_default_value=False, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
syntax='proto3',
extension_ranges=[],
oneofs=[
],
serialized_start=279,
serialized_end=296,
)
DESCRIPTOR.message_types_by_name['LedRequest'] = _LEDREQUEST
DESCRIPTOR.message_types_by_name['BrightnessRequest'] = _BRIGHTNESSREQUEST
DESCRIPTOR.message_types_by_name['TentacleRequest'] = _TENTACLEREQUEST
DESCRIPTOR.message_types_by_name['ValueTentacleRequest'] = _VALUETENTACLEREQUEST
DESCRIPTOR.message_types_by_name['Ack'] = _ACK
LedRequest = _reflection.GeneratedProtocolMessageType('LedRequest', (_message.Message,), dict(
DESCRIPTOR = _LEDREQUEST,
__module__ = 'piglow_pb2'
# @@protoc_insertion_point(class_scope:proto.LedRequest)
))
_sym_db.RegisterMessage(LedRequest)
BrightnessRequest = _reflection.GeneratedProtocolMessageType('BrightnessRequest', (_message.Message,), dict(
DESCRIPTOR = _BRIGHTNESSREQUEST,
__module__ = 'piglow_pb2'
# @@protoc_insertion_point(class_scope:proto.BrightnessRequest)
))
_sym_db.RegisterMessage(BrightnessRequest)
TentacleRequest = _reflection.GeneratedProtocolMessageType('TentacleRequest', (_message.Message,), dict(
DESCRIPTOR = _TENTACLEREQUEST,
__module__ = 'piglow_pb2'
# @@protoc_insertion_point(class_scope:proto.TentacleRequest)
))
_sym_db.RegisterMessage(TentacleRequest)
ValueTentacleRequest = _reflection.GeneratedProtocolMessageType('ValueTentacleRequest', (_message.Message,), dict(
DESCRIPTOR = _VALUETENTACLEREQUEST,
__module__ = 'piglow_pb2'
# @@protoc_insertion_point(class_scope:proto.ValueTentacleRequest)
))
_sym_db.RegisterMessage(ValueTentacleRequest)
Ack = _reflection.GeneratedProtocolMessageType('Ack', (_message.Message,), dict(
DESCRIPTOR = _ACK,
__module__ = 'piglow_pb2'
# @@protoc_insertion_point(class_scope:proto.Ack)
))
_sym_db.RegisterMessage(Ack)
import grpc
from grpc.beta import implementations as beta_implementations
from grpc.beta import interfaces as beta_interfaces
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
class PiGlowStub(object):
"""The remote PiGlow service
"""
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
"""
self.SetLED = channel.unary_unary(
'/proto.PiGlow/SetLED',
request_serializer=LedRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetAll = channel.unary_unary(
'/proto.PiGlow/SetAll',
request_serializer=BrightnessRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetWhite = channel.unary_unary(
'/proto.PiGlow/SetWhite',
request_serializer=BrightnessRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetBlue = channel.unary_unary(
'/proto.PiGlow/SetBlue',
request_serializer=BrightnessRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetGreen = channel.unary_unary(
'/proto.PiGlow/SetGreen',
request_serializer=BrightnessRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetYellow = channel.unary_unary(
'/proto.PiGlow/SetYellow',
request_serializer=BrightnessRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetOrange = channel.unary_unary(
'/proto.PiGlow/SetOrange',
request_serializer=BrightnessRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetRed = channel.unary_unary(
'/proto.PiGlow/SetRed',
request_serializer=BrightnessRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.SetTentacle = channel.unary_unary(
'/proto.PiGlow/SetTentacle',
request_serializer=TentacleRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
self.DisplayValueOnTentacle = channel.unary_unary(
'/proto.PiGlow/DisplayValueOnTentacle',
request_serializer=ValueTentacleRequest.SerializeToString,
response_deserializer=Ack.FromString,
)
class PiGlowServicer(object):
"""The remote PiGlow service
"""
def SetLED(self, request, context):
"""Set LED n to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetAll(self, request, context):
"""Set all LEDs to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetWhite(self, request, context):
"""Set all White LEDs to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetBlue(self, request, context):
"""Set all Blue LEDs to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetGreen(self, request, context):
"""Set all Green LEDs to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetYellow(self, request, context):
"""Set all Yellow LEDs to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetOrange(self, request, context):
"""Set all Orange LEDs to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetRed(self, request, context):
"""Set all Red LEDs to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def SetTentacle(self, request, context):
"""Set all LEDs along the whole of a tentacle to brightness
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def DisplayValueOnTentacle(self, request, context):
"""Display a value on a tentacle
"""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def add_PiGlowServicer_to_server(servicer, server):
rpc_method_handlers = {
'SetLED': grpc.unary_unary_rpc_method_handler(
servicer.SetLED,
request_deserializer=LedRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetAll': grpc.unary_unary_rpc_method_handler(
servicer.SetAll,
request_deserializer=BrightnessRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetWhite': grpc.unary_unary_rpc_method_handler(
servicer.SetWhite,
request_deserializer=BrightnessRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetBlue': grpc.unary_unary_rpc_method_handler(
servicer.SetBlue,
request_deserializer=BrightnessRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetGreen': grpc.unary_unary_rpc_method_handler(
servicer.SetGreen,
request_deserializer=BrightnessRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetYellow': grpc.unary_unary_rpc_method_handler(
servicer.SetYellow,
request_deserializer=BrightnessRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetOrange': grpc.unary_unary_rpc_method_handler(
servicer.SetOrange,
request_deserializer=BrightnessRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetRed': grpc.unary_unary_rpc_method_handler(
servicer.SetRed,
request_deserializer=BrightnessRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'SetTentacle': grpc.unary_unary_rpc_method_handler(
servicer.SetTentacle,
request_deserializer=TentacleRequest.FromString,
response_serializer=Ack.SerializeToString,
),
'DisplayValueOnTentacle': grpc.unary_unary_rpc_method_handler(
servicer.DisplayValueOnTentacle,
request_deserializer=ValueTentacleRequest.FromString,
response_serializer=Ack.SerializeToString,
),
}
generic_handler = grpc.method_handlers_generic_handler(
'proto.PiGlow', rpc_method_handlers)
server.add_generic_rpc_handlers((generic_handler,))
class BetaPiGlowServicer(object):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
"""The remote PiGlow service
"""
def SetLED(self, request, context):
"""Set LED n to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetAll(self, request, context):
"""Set all LEDs to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetWhite(self, request, context):
"""Set all White LEDs to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetBlue(self, request, context):
"""Set all Blue LEDs to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetGreen(self, request, context):
"""Set all Green LEDs to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetYellow(self, request, context):
"""Set all Yellow LEDs to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetOrange(self, request, context):
"""Set all Orange LEDs to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetRed(self, request, context):
"""Set all Red LEDs to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def SetTentacle(self, request, context):
"""Set all LEDs along the whole of a tentacle to brightness
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
def DisplayValueOnTentacle(self, request, context):
"""Display a value on a tentacle
"""
context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)
class BetaPiGlowStub(object):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This class was generated
only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0."""
"""The remote PiGlow service
"""
def SetLED(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set LED n to brightness
"""
raise NotImplementedError()
SetLED.future = None
def SetAll(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all LEDs to brightness
"""
raise NotImplementedError()
SetAll.future = None
def SetWhite(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all White LEDs to brightness
"""
raise NotImplementedError()
SetWhite.future = None
def SetBlue(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all Blue LEDs to brightness
"""
raise NotImplementedError()
SetBlue.future = None
def SetGreen(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all Green LEDs to brightness
"""
raise NotImplementedError()
SetGreen.future = None
def SetYellow(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all Yellow LEDs to brightness
"""
raise NotImplementedError()
SetYellow.future = None
def SetOrange(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all Orange LEDs to brightness
"""
raise NotImplementedError()
SetOrange.future = None
def SetRed(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all Red LEDs to brightness
"""
raise NotImplementedError()
SetRed.future = None
def SetTentacle(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Set all LEDs along the whole of a tentacle to brightness
"""
raise NotImplementedError()
SetTentacle.future = None
def DisplayValueOnTentacle(self, request, timeout, metadata=None, with_call=False, protocol_options=None):
"""Display a value on a tentacle
"""
raise NotImplementedError()
DisplayValueOnTentacle.future = None
def beta_create_PiGlow_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_deserializers = {
('proto.PiGlow', 'DisplayValueOnTentacle'): ValueTentacleRequest.FromString,
('proto.PiGlow', 'SetAll'): BrightnessRequest.FromString,
('proto.PiGlow', 'SetBlue'): BrightnessRequest.FromString,
('proto.PiGlow', 'SetGreen'): BrightnessRequest.FromString,
('proto.PiGlow', 'SetLED'): LedRequest.FromString,
('proto.PiGlow', 'SetOrange'): BrightnessRequest.FromString,
('proto.PiGlow', 'SetRed'): BrightnessRequest.FromString,
('proto.PiGlow', 'SetTentacle'): TentacleRequest.FromString,
('proto.PiGlow', 'SetWhite'): BrightnessRequest.FromString,
('proto.PiGlow', 'SetYellow'): BrightnessRequest.FromString,
}
response_serializers = {
('proto.PiGlow', 'DisplayValueOnTentacle'): Ack.SerializeToString,
('proto.PiGlow', 'SetAll'): Ack.SerializeToString,
('proto.PiGlow', 'SetBlue'): Ack.SerializeToString,
('proto.PiGlow', 'SetGreen'): Ack.SerializeToString,
('proto.PiGlow', 'SetLED'): Ack.SerializeToString,
('proto.PiGlow', 'SetOrange'): Ack.SerializeToString,
('proto.PiGlow', 'SetRed'): Ack.SerializeToString,
('proto.PiGlow', 'SetTentacle'): Ack.SerializeToString,
('proto.PiGlow', 'SetWhite'): Ack.SerializeToString,
('proto.PiGlow', 'SetYellow'): Ack.SerializeToString,
}
method_implementations = {
('proto.PiGlow', 'DisplayValueOnTentacle'): face_utilities.unary_unary_inline(servicer.DisplayValueOnTentacle),
('proto.PiGlow', 'SetAll'): face_utilities.unary_unary_inline(servicer.SetAll),
('proto.PiGlow', 'SetBlue'): face_utilities.unary_unary_inline(servicer.SetBlue),
('proto.PiGlow', 'SetGreen'): face_utilities.unary_unary_inline(servicer.SetGreen),
('proto.PiGlow', 'SetLED'): face_utilities.unary_unary_inline(servicer.SetLED),
('proto.PiGlow', 'SetOrange'): face_utilities.unary_unary_inline(servicer.SetOrange),
('proto.PiGlow', 'SetRed'): face_utilities.unary_unary_inline(servicer.SetRed),
('proto.PiGlow', 'SetTentacle'): face_utilities.unary_unary_inline(servicer.SetTentacle),
('proto.PiGlow', 'SetWhite'): face_utilities.unary_unary_inline(servicer.SetWhite),
('proto.PiGlow', 'SetYellow'): face_utilities.unary_unary_inline(servicer.SetYellow),
}
server_options = beta_implementations.server_options(request_deserializers=request_deserializers, response_serializers=response_serializers, thread_pool=pool, thread_pool_size=pool_size, default_timeout=default_timeout, maximum_timeout=maximum_timeout)
return beta_implementations.server(method_implementations, options=server_options)
def beta_create_PiGlow_stub(channel, host=None, metadata_transformer=None, pool=None, pool_size=None):
"""The Beta API is deprecated for 0.15.0 and later.
It is recommended to use the GA API (classes and functions in this
file not marked beta) for all further purposes. This function was
generated only to ease transition from grpcio<0.15.0 to grpcio>=0.15.0"""
request_serializers = {
('proto.PiGlow', 'DisplayValueOnTentacle'): ValueTentacleRequest.SerializeToString,
('proto.PiGlow', 'SetAll'): BrightnessRequest.SerializeToString,
('proto.PiGlow', 'SetBlue'): BrightnessRequest.SerializeToString,
('proto.PiGlow', 'SetGreen'): BrightnessRequest.SerializeToString,
('proto.PiGlow', 'SetLED'): LedRequest.SerializeToString,
('proto.PiGlow', 'SetOrange'): BrightnessRequest.SerializeToString,
('proto.PiGlow', 'SetRed'): BrightnessRequest.SerializeToString,
('proto.PiGlow', 'SetTentacle'): TentacleRequest.SerializeToString,
('proto.PiGlow', 'SetWhite'): BrightnessRequest.SerializeToString,
('proto.PiGlow', 'SetYellow'): BrightnessRequest.SerializeToString,
}
response_deserializers = {
('proto.PiGlow', 'DisplayValueOnTentacle'): Ack.FromString,
('proto.PiGlow', 'SetAll'): Ack.FromString,
('proto.PiGlow', 'SetBlue'): Ack.FromString,
('proto.PiGlow', 'SetGreen'): Ack.FromString,
('proto.PiGlow', 'SetLED'): Ack.FromString,
('proto.PiGlow', 'SetOrange'): Ack.FromString,
('proto.PiGlow', 'SetRed'): Ack.FromString,
('proto.PiGlow', 'SetTentacle'): Ack.FromString,
('proto.PiGlow', 'SetWhite'): Ack.FromString,
('proto.PiGlow', 'SetYellow'): Ack.FromString,
}
cardinalities = {
'DisplayValueOnTentacle': cardinality.Cardinality.UNARY_UNARY,
'SetAll': cardinality.Cardinality.UNARY_UNARY,
'SetBlue': cardinality.Cardinality.UNARY_UNARY,
'SetGreen': cardinality.Cardinality.UNARY_UNARY,
'SetLED': cardinality.Cardinality.UNARY_UNARY,
'SetOrange': cardinality.Cardinality.UNARY_UNARY,
'SetRed': cardinality.Cardinality.UNARY_UNARY,
'SetTentacle': cardinality.Cardinality.UNARY_UNARY,
'SetWhite': cardinality.Cardinality.UNARY_UNARY,
'SetYellow': cardinality.Cardinality.UNARY_UNARY,
}
stub_options = beta_implementations.stub_options(host=host, metadata_transformer=metadata_transformer, request_serializers=request_serializers, response_deserializers=response_deserializers, thread_pool=pool, thread_pool_size=pool_size)
return beta_implementations.dynamic_stub(channel, 'proto.PiGlow', cardinalities, options=stub_options)
# @@protoc_insertion_point(module_scope)