viam.components.sensor

Submodules

Package Contents

Classes

Sensor

Sensor represents a physical sensing device that can provide measurement readings.

class viam.components.sensor.Sensor(name: str)[source]

Sensor represents a physical sensing device that can provide measurement readings.

This acts as an abstract base class for any drivers representing specific sensor implementations. This cannot be used on its own. If the __init__() function is overridden, it must call the super().__init__() function.

SUBTYPE
abstract async get_readings(*, extra: Optional[Mapping[str, Any]] = None, timeout: Optional[float] = None, **kwargs) Mapping[str, Any][source]

Obtain the measurements/data specific to this sensor.

Returns

The measurements. Can be of any type.

Return type

Mapping[str, Any]