:py:mod:`viam.proto.service.sensors` ==================================== .. py:module:: viam.proto.service.sensors .. autoapi-nested-parse:: @generated by Viam. Do not edit manually! Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: viam.proto.service.sensors.SensorsServiceBase viam.proto.service.sensors.SensorsServiceStub viam.proto.service.sensors.GetReadingsRequest viam.proto.service.sensors.GetReadingsResponse viam.proto.service.sensors.GetSensorsRequest viam.proto.service.sensors.GetSensorsResponse viam.proto.service.sensors.Readings .. py:class:: SensorsServiceBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. py:method:: GetSensors(stream: grpclib.server.Stream[service.sensors.v1.sensors_pb2.GetSensorsRequest, service.sensors.v1.sensors_pb2.GetSensorsResponse]) -> None :abstractmethod: :async: .. py:method:: GetReadings(stream: grpclib.server.Stream[service.sensors.v1.sensors_pb2.GetReadingsRequest, service.sensors.v1.sensors_pb2.GetReadingsResponse]) -> 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:: __mapping__() -> Dict[str, grpclib.const.Handler] .. py:class:: SensorsServiceStub(channel: grpclib.client.Channel) .. py:class:: GetReadingsRequest(*, name: str = ..., sensor_names: collections.abc.Iterable[viam.gen.common.v1.common_pb2.ResourceName] | 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:: sensor_names :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[viam.gen.common.v1.common_pb2.ResourceName] .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str .. 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:: GetReadingsResponse(*, readings: collections.abc.Iterable[global___Readings] | 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:: readings :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Readings] .. py:class:: GetSensorsRequest(*, name: str = ..., extra: google.protobuf.struct_pb2.Struct | None = ...) Bases: :py:obj:`google.protobuf.message.Message` The sensors service messages are deprecated .. py:property:: extra :type: google.protobuf.struct_pb2.Struct Additional arguments to the method .. py:attribute:: name :type: str .. 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:: GetSensorsResponse(*, sensor_names: collections.abc.Iterable[viam.gen.common.v1.common_pb2.ResourceName] | 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:: sensor_names :type: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[viam.gen.common.v1.common_pb2.ResourceName] .. py:class:: Readings(*, name: viam.gen.common.v1.common_pb2.ResourceName | None = ..., readings: collections.abc.Mapping[str, google.protobuf.struct_pb2.Value] | 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:class:: ReadingsEntry(*, key: str = ..., value: google.protobuf.struct_pb2.Value | 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:: value :type: google.protobuf.struct_pb2.Value .. py:attribute:: key :type: str .. py:method:: HasField(field_name: Literal[value, b'value']) -> 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:property:: name :type: viam.gen.common.v1.common_pb2.ResourceName .. py:property:: readings :type: google.protobuf.internal.containers.MessageMap[str, google.protobuf.struct_pb2.Value] .. py:method:: HasField(field_name: Literal[name, b'name']) -> 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.