Skip to content

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: SensorCategory.ValueType module-attribute ¤

Accelerometers (acceleration sensor).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_ANEMOMETER: SensorCategory.ValueType module-attribute ¤

Anemometer (wind velocity and direction sensor).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_BAROMETER: SensorCategory.ValueType module-attribute ¤

Barometer (pressure sensor).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_GENERAL: SensorCategory.ValueType 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: SensorCategory.ValueType module-attribute ¤

Hygrometer (humidity sensor)

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_PYRANOMETER: SensorCategory.ValueType module-attribute ¤

Pyranometer (solar irradiance sensor).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_THERMOMETER: SensorCategory.ValueType module-attribute ¤

Thermometer (temperature sensor)

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_CATEGORY_UNSPECIFIED: SensorCategory.ValueType module-attribute ¤

Unspecified

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_ERROR_CODE_INTERNAL: SensorErrorCode.ValueType module-attribute ¤

Error indicating an internal error within the sensor.

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_ERROR_CODE_UNKNOWN: SensorErrorCode.ValueType 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: SensorErrorCode.ValueType module-attribute ¤

Default value. No specific error is specified.

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_ACCELERATION: SensorMetric.ValueType module-attribute ¤

Acceleration. In meters per second per second (m / s^2)

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_ANGLE: SensorMetric.ValueType 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: SensorMetric.ValueType 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: SensorMetric.ValueType module-attribute ¤

Humidity In percentage (%).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_IRRADIANCE: SensorMetric.ValueType module-attribute ¤

Irradiance / Radiation flux In watts per square meter (W / m^2).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_PRESSURE: SensorMetric.ValueType module-attribute ¤

Pressure In Pascal (Pa).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_TEMPERATURE: SensorMetric.ValueType module-attribute ¤

Temperature. In Celsius (°C).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_UNSPECIFIED: SensorMetric.ValueType module-attribute ¤

Unspecified.

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_METRIC_VELOCITY: SensorMetric.ValueType module-attribute ¤

Velocity In meters per second (m / s).

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_STATE_CODE_ERROR: SensorStateCode.ValueType module-attribute ¤

The sensor is in an error state.

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_STATE_CODE_ON: SensorStateCode.ValueType module-attribute ¤

The sensor is up and running.

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SENSOR_STATE_CODE_UNSPECIFIED: SensorStateCode.ValueType 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: global___SensorCategory.ValueType instance-attribute ¤

The category of the sensor.

id: builtins.int instance-attribute ¤

A unique identifier for the sensor.

manufacturer: builtins.str instance-attribute ¤

The sensor manufacturer.

microgrid_id: builtins.int instance-attribute ¤

Unique identifier of the parent microgrid_id.

model_name: builtins.str instance-attribute ¤

The model name of the sensor.

name: builtins.str instance-attribute ¤

An optional name for the sensor.

operational_lifetime: frequenz.api.common.v1.microgrid.lifetime_pb2.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", sample: metric_sample_type: {simple_metric: {value: 23.5}, }, { sampled_at: "2023-10-01T00:00:00Z", metric: "METRIC_SENSOR_RELATIVE_HUMIDITY", sample: metric_sample_type: {simple_metric: {value: 23.5}, } ], states: [ { sampled_at: "2023-10-01T00:00:00Z", states: [], errors: [], }, ]

} ```

Attributes¤
metric_samples: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SensorMetricSample] property ¤

List of measurements for a metric of the specific microgrid sensor.

sensor_id: builtins.int instance-attribute ¤

The ID of the microgrid sensors.

states: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SensorState] property ¤

List of states of a specific microgrid sensor.

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 ¤

Bases: Message

Representation of a sampled sensor metric along with its value.

Attributes¤
metric: frequenz.api.common.v1.metrics.metric_sample_pb2.Metric.ValueType instance-attribute ¤

The metric that was sampled.

sample: frequenz.api.common.v1.metrics.metric_sample_pb2.MetricSampleVariant property ¤

The value of the sampled metric.

sampled_at: google.protobuf.timestamp_pb2.Timestamp property ¤

The UTC timestamp of when the metric was sampled.

frequenz.api.common.v1.microgrid.sensors.sensors_pb2.SensorState ¤

Bases: Message

Representation of a sensor state and errors.

Attributes¤
errors: google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___SensorErrorCode.ValueType] 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: google.protobuf.timestamp_pb2.Timestamp property ¤

The time at which the state was sampled.

states: google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___SensorStateCode.ValueType] 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.