:py:mod:`viam.proto.component.encoder` ====================================== .. py:module:: viam.proto.component.encoder .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: viam.proto.component.encoder.EncoderServiceBase viam.proto.component.encoder.EncoderServiceStub viam.proto.component.encoder.UnimplementedEncoderServiceBase viam.proto.component.encoder.GetPositionRequest viam.proto.component.encoder.GetPositionResponse viam.proto.component.encoder.GetPropertiesRequest viam.proto.component.encoder.GetPropertiesResponse viam.proto.component.encoder.PositionType viam.proto.component.encoder.ResetPositionRequest viam.proto.component.encoder.ResetPositionResponse .. py:class:: EncoderServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetPosition(stream: grpclib.server.Stream[component.encoder.v1.encoder_pb2.GetPositionRequest, component.encoder.v1.encoder_pb2.GetPositionResponse]) -> None :abstractmethod: :async: .. py:method:: ResetPosition(stream: grpclib.server.Stream[component.encoder.v1.encoder_pb2.ResetPositionRequest, component.encoder.v1.encoder_pb2.ResetPositionResponse]) -> None :abstractmethod: :async: .. py:method:: GetProperties(stream: grpclib.server.Stream[component.encoder.v1.encoder_pb2.GetPropertiesRequest, component.encoder.v1.encoder_pb2.GetPropertiesResponse]) -> 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:: EncoderServiceStub(channel: grpclib.client.Channel) .. py:class:: UnimplementedEncoderServiceBase Bases: :py:obj:`EncoderServiceBase` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetPosition(stream: grpclib.server.Stream[component.encoder.v1.encoder_pb2.GetPositionRequest, component.encoder.v1.encoder_pb2.GetPositionResponse]) -> None :async: .. py:method:: ResetPosition(stream: grpclib.server.Stream[component.encoder.v1.encoder_pb2.ResetPositionRequest, component.encoder.v1.encoder_pb2.ResetPositionResponse]) -> None :async: .. py:method:: GetProperties(stream: grpclib.server.Stream[component.encoder.v1.encoder_pb2.GetPropertiesRequest, component.encoder.v1.encoder_pb2.GetPropertiesResponse]) -> 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 = ..., position_type: global___PositionType | None = ..., 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 encoder .. py:attribute:: position_type :type: global___PositionType If supplied, the response will return the specified position type. If the driver does not implement the requested type, this call will return an error. If position type is not specified, the response will return a default according to the driver. .. py:method:: HasField(field_name: Literal[_position_type, b'_position_type', extra, b'extra', position_type, b'position_type']) -> 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:method:: WhichOneof(oneof_group: Literal[_position_type, b'_position_type']) -> Literal[position_type] | None Returns the name of the field that is set inside a oneof group. If no field is set, returns None. :param oneof_group: the name of the oneof group to check. :type oneof_group: str :returns: The name of the group that is set, or None. :rtype: str or None :raises ValueError: no group with the given name exists .. py:class:: GetPositionResponse(*, value: float = ..., position_type: global___PositionType = ...) 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:: value :type: float .. py:attribute:: position_type :type: global___PositionType .. py:class:: GetPropertiesRequest(*, 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 the encoder .. 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:: GetPropertiesResponse(*, ticks_count_supported: bool = ..., angle_degrees_supported: 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:: ticks_count_supported :type: bool .. py:attribute:: angle_degrees_supported :type: bool .. py:class:: PositionType Bases: :py:obj:`_PositionType` .. py:class:: ResetPositionRequest(*, 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 an encoder .. 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:: ResetPositionResponse 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.