sensors_pb2
frequenz.api.common.v1.microgrid.sensors.sensors_pb2
¤
Generated protocol buffer code.
Attributes¤
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_ACCELEROMETER
module-attribute
¤
Accelerometers (acceleration sensor).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_ANEMOMETER
module-attribute
¤
Anemometer (wind velocity and direction sensor).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_BAROMETER
module-attribute
¤
Barometer (pressure sensor).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_GENERAL
module-attribute
¤
General sensors, which do not fall in any of the above categories
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_HYGROMETER
module-attribute
¤
Hygrometer (humidity sensor)
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_PYRANOMETER
module-attribute
¤
Pyranometer (solar irradiance sensor).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_THERMOMETER
module-attribute
¤
Thermometer (temperature sensor)
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_UNSPECIFIED
module-attribute
¤
Unspecified
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_ERROR_CODE_INTERNAL
module-attribute
¤
Error indicating an internal error within the sensor.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_ERROR_CODE_UNKNOWN
module-attribute
¤
The sensor is reporting an unknown or an undefined error, and the sender cannot parse the sensor error to any of the variants below.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_ERROR_CODE_UNSPECIFIED
module-attribute
¤
Default value. No specific error is specified.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_ACCELERATION
module-attribute
¤
Acceleration. In meters per second per second (m / s^2)
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_ANGLE
module-attribute
¤
Metric to represent angles, for metrics like direction. In angles with respect to the (magnetic) North (°).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_DEW_POINT
module-attribute
¤
Dew point. The temperature at which the air becomes saturated with water vapor.
In Celsius (°C).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_HUMIDITY
module-attribute
¤
Humidity In percentage (%).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_IRRADIANCE
module-attribute
¤
Irradiance / Radiation flux In watts per square meter (W / m^2).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_PRESSURE
module-attribute
¤
Pressure In Pascal (Pa).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_TEMPERATURE
module-attribute
¤
Temperature. In Celsius (°C).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_UNSPECIFIED
module-attribute
¤
Unspecified.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_VELOCITY
module-attribute
¤
Velocity In meters per second (m / s).
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_STATE_CODE_ERROR
module-attribute
¤
The sensor is in an error state.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_STATE_CODE_ON
module-attribute
¤
The sensor is up and running.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_STATE_CODE_UNSPECIFIED
module-attribute
¤
Default value when the sensor state is not explicitly set. This is the zero value of the enum.
Classes¤
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.Sensor
¤
Bases: Message
A sensor that measures a physical metric in the microgrid's surrounding environment.
Attributes¤
category
instance-attribute
¤
The category of the sensor.
id
instance-attribute
¤
A unique identifier for the sensor.
manufacturer
instance-attribute
¤
The sensor manufacturer.
microgrid_id
instance-attribute
¤
Unique identifier of the parent microgrid_id.
model_name
instance-attribute
¤
The model name of the sensor.
name
instance-attribute
¤
An optional name for the sensor.
operational_lifetime
property
¤
The operational lifetime of the sensor.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorCategory
¤
Bases: _SensorCategory
Enumerated sensor categories.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorData
¤
Bases: Message
SensorData message aggregates multiple metrics, operational states, and errors, related to a specific microgrid sensor.
Example
Example output of a component data message: ``` { sensor_id: 13, metric_samples: [ / list of metrics for multiple timestamps / { sampled_at: "2023-10-01T00:00:00Z", metric: "METRIC_SENSOR_TEMPERATURE", value: metric_value_variant: {simple_metric: {value: 23.5}, }, { sampled_at: "2023-10-01T00:00:00Z", metric: "METRIC_SENSOR_RELATIVE_HUMIDITY", value: metric_value_variant: {simple_metric: {value: 23.5}, } ], states: [ { sampled_at: "2023-10-01T00:00:00Z", states: [], errors: [], }, ]
} ```
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorErrorCode
¤
Bases: _SensorErrorCode
A representation of all possible errors that can occur in sensors.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorMetric
¤
Bases: _SensorMetric
Enumrated sensor metrics.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorMetricSample
¤
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorState
¤
Bases: Message
Representation of a sensor state and errors.
Attributes¤
errors
property
¤
List of errors for the microgrid sensor.
Note
This list is expected to have errors if and only if the sensor is in an error state.
Note
The list will contain unique members. No error will exist twice in this list.
sampled_at
property
¤
The time at which the state was sampled.
states
property
¤
List of states of the microgrid sensor.
Note
The list will contain unique members. No state will exist twice in this list.
frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorStateCode
¤
Bases: _SensorStateCode
Enum to represent the various states that a sensor can be in. This enum is unified across all sensor categories for consistency.