| edition = "2023"; |
| |
| package milotic_tlbmc; |
| |
| import "google/protobuf/duration.proto"; |
| import "google/protobuf/timestamp.proto"; |
| import "entity_common_config.proto"; |
| import "i2c_common_config.proto"; |
| import "reading_range_config.proto"; |
| import "threshold_config.proto"; |
| import "resource.proto"; |
| |
| enum SensorUnit { |
| UNIT_UNKNOWN = 0; |
| UNIT_DEGREE_CELSIUS = 1; |
| UNIT_WATT = 2; |
| UNIT_AMPERE = 3; |
| UNIT_VOLT = 4; |
| UNIT_REVOLUTION_PER_MINUTE = 5; |
| UNIT_PERCENT = 6; |
| } |
| |
| message SensorValue { |
| double reading = 1; |
| google.protobuf.Timestamp timestamp = 2; |
| } |
| |
| message SensorAttributesStatic { |
| Attributes attributes = 1; |
| SensorUnit unit = 2; |
| ThresholdConfigs thresholds = 3; |
| ReadingRangeConfigs reading_ranges = 4; |
| EntityCommonConfig entity_common_config = 5; |
| google.protobuf.Duration static_refresh_interval = 6; |
| I2cCommonConfig i2c_common_config = 7; |
| } |
| |
| message SensorAttributesDynamic { |
| State state = 1; |
| // The refresh interval of the sensor. Changing refresh interval in the fly is |
| // unimplemented. `static_refresh_interval` in the static attributes is used |
| // by today's implementation. |
| google.protobuf.Duration refresh_interval = 2; |
| // Threshold for data points in the buffer reaching which the sensor will |
| // trigger a notification. |
| int32 data_points_to_notify = 3; |
| // The number of data points buffered. |
| int32 data_points_buffered = 4; |
| } |