:py:mod:`viam.proto.component.servo` ==================================== .. py:module:: viam.proto.component.servo .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: viam.proto.component.servo.ServoServiceBase viam.proto.component.servo.ServoServiceStub viam.proto.component.servo.UnimplementedServoServiceBase viam.proto.component.servo.GetPositionRequest viam.proto.component.servo.GetPositionResponse viam.proto.component.servo.IsMovingRequest viam.proto.component.servo.IsMovingResponse viam.proto.component.servo.MoveRequest viam.proto.component.servo.MoveResponse viam.proto.component.servo.Status viam.proto.component.servo.StopRequest viam.proto.component.servo.StopResponse .. py:class:: ServoServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: Move(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.MoveRequest, component.servo.v1.servo_pb2.MoveResponse]) -> None :abstractmethod: :async: .. py:method:: GetPosition(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.GetPositionRequest, component.servo.v1.servo_pb2.GetPositionResponse]) -> None :abstractmethod: :async: .. py:method:: Stop(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.StopRequest, component.servo.v1.servo_pb2.StopResponse]) -> None :abstractmethod: :async: .. py:method:: IsMoving(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.IsMovingRequest, component.servo.v1.servo_pb2.IsMovingResponse]) -> None :abstractmethod: :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :abstractmethod: :async: .. py:method:: GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) -> None :abstractmethod: :async: .. py:method:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: ServoServiceStub(channel: grpclib.client.Channel) .. py:class:: UnimplementedServoServiceBase Bases: :py:obj:`ServoServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: Move(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.MoveRequest, component.servo.v1.servo_pb2.MoveResponse]) -> None :async: .. py:method:: GetPosition(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.GetPositionRequest, component.servo.v1.servo_pb2.GetPositionResponse]) -> None :async: .. py:method:: Stop(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.StopRequest, component.servo.v1.servo_pb2.StopResponse]) -> None :async: .. py:method:: IsMoving(stream: grpclib.server.Stream[component.servo.v1.servo_pb2.IsMovingRequest, component.servo.v1.servo_pb2.IsMovingResponse]) -> None :async: .. py:method:: DoCommand(stream: grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]) -> None :async: .. py:method:: GetGeometries(stream: grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]) -> None :async: .. py:class:: GetPositionRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str the name of the servo, as registered .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: GetPositionResponse(*, position_deg: int = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: position_deg :type: int the degrees from neutral by which the servo is currently rotated. Values are between 0 and 180 .. py:class:: IsMovingRequest(*, name: str = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: name :type: str .. py:class:: IsMovingResponse(*, is_moving: bool = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: is_moving :type: bool .. py:class:: MoveRequest(*, name: str = ..., angle_deg: int = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str the name of the servo, as registered .. py:attribute:: angle_deg :type: int the degrees by which to rotate the servo. Accepted values are between 0 and 180 .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: MoveResponse Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:class:: Status(*, position_deg: int = ..., is_moving: bool = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:attribute:: position_deg :type: int .. py:attribute:: is_moving :type: bool .. py:class:: StopRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below. .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str Name of a servo .. py:method:: HasField(field_name: Literal[extra, b'extra']) -> bool Checks if a certain field is set for the message. For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, :exc:`ValueError` will be raised. :param field_name: The name of the field to check for presence. :type field_name: str :returns: Whether a value has been set for the named field. :rtype: bool :raises ValueError: if the `field_name` is not a member of this message. .. py:class:: StopResponse Bases: :py:obj:`google.protobuf.message.Message` Abstract base class for protocol messages. Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.