Source code for viam.gen.component.gantry.v1.gantry_grpc

import abc
import typing
import grpclib.const
import grpclib.client
if typing.TYPE_CHECKING:
    import grpclib.server
from .... import common
import google.api.annotations_pb2
import google.protobuf.struct_pb2
from .... import component

[docs]class GantryServiceBase(abc.ABC):
[docs] @abc.abstractmethod async def GetPosition(self, stream: 'grpclib.server.Stream[component.gantry.v1.gantry_pb2.GetPositionRequest, component.gantry.v1.gantry_pb2.GetPositionResponse]') -> None: pass
[docs] @abc.abstractmethod async def MoveToPosition(self, stream: 'grpclib.server.Stream[component.gantry.v1.gantry_pb2.MoveToPositionRequest, component.gantry.v1.gantry_pb2.MoveToPositionResponse]') -> None: pass
[docs] @abc.abstractmethod async def Home(self, stream: 'grpclib.server.Stream[component.gantry.v1.gantry_pb2.HomeRequest, component.gantry.v1.gantry_pb2.HomeResponse]') -> None: pass
[docs] @abc.abstractmethod async def GetLengths(self, stream: 'grpclib.server.Stream[component.gantry.v1.gantry_pb2.GetLengthsRequest, component.gantry.v1.gantry_pb2.GetLengthsResponse]') -> None: pass
[docs] @abc.abstractmethod async def Stop(self, stream: 'grpclib.server.Stream[component.gantry.v1.gantry_pb2.StopRequest, component.gantry.v1.gantry_pb2.StopResponse]') -> None: pass
[docs] @abc.abstractmethod async def IsMoving(self, stream: 'grpclib.server.Stream[component.gantry.v1.gantry_pb2.IsMovingRequest, component.gantry.v1.gantry_pb2.IsMovingResponse]') -> None: pass
[docs] @abc.abstractmethod async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None: pass
[docs] @abc.abstractmethod async def GetGeometries(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]') -> None: pass
[docs] def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]: return {'/viam.component.gantry.v1.GantryService/GetPosition': grpclib.const.Handler(self.GetPosition, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.GetPositionRequest, component.gantry.v1.gantry_pb2.GetPositionResponse), '/viam.component.gantry.v1.GantryService/MoveToPosition': grpclib.const.Handler(self.MoveToPosition, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.MoveToPositionRequest, component.gantry.v1.gantry_pb2.MoveToPositionResponse), '/viam.component.gantry.v1.GantryService/Home': grpclib.const.Handler(self.Home, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.HomeRequest, component.gantry.v1.gantry_pb2.HomeResponse), '/viam.component.gantry.v1.GantryService/GetLengths': grpclib.const.Handler(self.GetLengths, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.GetLengthsRequest, component.gantry.v1.gantry_pb2.GetLengthsResponse), '/viam.component.gantry.v1.GantryService/Stop': grpclib.const.Handler(self.Stop, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.StopRequest, component.gantry.v1.gantry_pb2.StopResponse), '/viam.component.gantry.v1.GantryService/IsMoving': grpclib.const.Handler(self.IsMoving, grpclib.const.Cardinality.UNARY_UNARY, component.gantry.v1.gantry_pb2.IsMovingRequest, component.gantry.v1.gantry_pb2.IsMovingResponse), '/viam.component.gantry.v1.GantryService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse), '/viam.component.gantry.v1.GantryService/GetGeometries': grpclib.const.Handler(self.GetGeometries, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse)}
[docs]class GantryServiceStub: def __init__(self, channel: grpclib.client.Channel) -> None: self.GetPosition = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/GetPosition', component.gantry.v1.gantry_pb2.GetPositionRequest, component.gantry.v1.gantry_pb2.GetPositionResponse) self.MoveToPosition = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/MoveToPosition', component.gantry.v1.gantry_pb2.MoveToPositionRequest, component.gantry.v1.gantry_pb2.MoveToPositionResponse) self.Home = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/Home', component.gantry.v1.gantry_pb2.HomeRequest, component.gantry.v1.gantry_pb2.HomeResponse) self.GetLengths = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/GetLengths', component.gantry.v1.gantry_pb2.GetLengthsRequest, component.gantry.v1.gantry_pb2.GetLengthsResponse) self.Stop = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/Stop', component.gantry.v1.gantry_pb2.StopRequest, component.gantry.v1.gantry_pb2.StopResponse) self.IsMoving = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/IsMoving', component.gantry.v1.gantry_pb2.IsMovingRequest, component.gantry.v1.gantry_pb2.IsMovingResponse) self.DoCommand = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/DoCommand', common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse) self.GetGeometries = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gantry.v1.GantryService/GetGeometries', common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse)