38 #ifndef SENSOR_MESSAGES_H__ 39 #define SENSOR_MESSAGES_H__ 42 #include "sensor_common.h" 43 #include "nrf_mesh_assert.h" 57 #define MAX_NUM_SENSORS 38 60 #define SENSOR_DESCRIPTOR_MINLEN 2 61 #define SENSOR_DESCRIPTOR_STATE_SIZE 8 62 #define SENSOR_DESCRIPTOR_MAXLEN (MAX_NUM_SENSORS * SENSOR_DESCRIPTOR_STATE_SIZE) 65 #define SENSOR_SETTING_SET_MINLEN 5 68 #define SENSOR_CADENCE_SET_MINLEN 8 71 #define SENSOR_STATUS_MINLEN 3 72 #define SENSOR_STATUS_MAXLEN_SINGLE_SENSOR 130 73 #define SENSOR_STATUS_MAXLEN 379 78 SENSOR_OPCODE_DESCRIPTOR_GET = 0x8230,
79 SENSOR_OPCODE_DESCRIPTOR_STATUS = 0x51,
80 SENSOR_OPCODE_GET = 0x8231,
81 SENSOR_OPCODE_STATUS = 0x52,
82 SENSOR_OPCODE_COLUMN_GET = 0x8232,
83 SENSOR_OPCODE_COLUMN_STATUS = 0x53,
84 SENSOR_OPCODE_SERIES_GET = 0X8233,
85 SENSOR_OPCODE_SERIES_STATUS = 0x54,
86 SENSOR_OPCODE_CADENCE_GET = 0x8234,
87 SENSOR_OPCODE_CADENCE_SET = 0x55,
88 SENSOR_OPCODE_CADENCE_SET_UNACKNOWLEDGED = 0x56,
89 SENSOR_OPCODE_CADENCE_STATUS = 0x57,
90 SENSOR_OPCODE_SETTINGS_GET = 0x8235,
91 SENSOR_OPCODE_SETTINGS_STATUS = 0x58,
92 SENSOR_OPCODE_SETTING_GET = 0x8236,
93 SENSOR_OPCODE_SETTING_SET = 0x59,
94 SENSOR_OPCODE_SETTING_SET_UNACKNOWLEDGED = 0x5A,
95 SENSOR_OPCODE_SETTING_STATUS = 0x5B,
110 typedef struct __attribute((packed))
115 typedef struct __attribute((packed))
117 uint64_t sensor_property_id : 16;
118 uint64_t sensor_positive_tolerance : 12;
119 uint64_t sensor_negative_tolerance : 12;
120 uint64_t sensor_sampling_function : 8;
121 uint64_t sensor_measurement_period : 8;
122 uint64_t sensor_update_interval : 8;
126 "Wrong packed sensor_descriptor_pkt_t.");
146 typedef union __attribute((packed))
148 uint16_t property_id;
157 typedef struct __attribute((packed))
185 typedef uint8_t sensor_cadence_status_msg_pkt_t;
207 typedef struct __attribute((packed))
217 typedef struct __attribute((packed))
238 typedef struct __attribute((packed))
241 uint16_t setting_property_ids[];
257 typedef struct __attribute((packed))
277 typedef struct __attribute((packed))
281 uint8_t setting_raw[];
302 typedef struct __attribute((packed))
306 uint8_t setting_access;
307 uint8_t setting_raw[];
321 typedef struct __attribute((packed))
341 typedef uint8_t sensor_status_msg_pkt_t;
354 typedef struct __attribute((packed))
357 uint8_t raw_value_x[];
377 typedef struct __attribute((packed))
380 uint8_t raw_value_xwy[];
400 typedef struct __attribute((packed))
403 uint8_t raw_value_x1x2[];
432 typedef struct __attribute((packed))
435 uint8_t raw_value_xwy[];
Message format for the Sensor Descriptor Status message.
uint16_t property_id
Property ID for the sensor.
uint16_t setting_property_id
Setting Property ID identifying a setting within a sensor.
uint16_t property_id
Property ID for the sensor.
Message format for the Sensor Column Status message 4.2.16 Sensor Column Status Sensor Column Status ...
uint16_t property_id
Property ID for the sensor.
Message format for the Sensor Cadence Set/Set Unacknowledged message (partial) 4.2.4 Sensor Cadence Set Sensor Cadence Set is an acknowledged message used to set the Sensor Cadence state of an element (see Section 4.1.3).
Packed message structure typedefs are used for packing and unpacking byte stream. ...
uint16_t property_id
Property ID for the sensor.
Message format for the Sensor Setting Get message.
Message format for the Sensor Series Status message 4.2.18 Sensor Series Status Sensor Series Status ...
uint16_t property_id
Property ID for the sensor.
Message format for the Sensor Get message 4.2.13 Sensor Get Sensor Get is an acknowledged message use...
uint16_t property_id
Property ID for the sensor.
Message format for the Sensor Settings Get message.
uint16_t property_id
Property ID for the sensor.
uint16_t property_id
Property ID for the sensor.
uint16_t setting_property_id
Setting Property ID identifying a setting within a sensor.
uint16_t property_id
Property ID for the sensor.
uint16_t setting_property_id
Setting Property ID identifying a setting within a sensor.
Message format for the Sensor Setting Set/Set Unacknowledged message (partial) 4.2.10 Sensor Setting Set Sensor Setting Set is an acknowledged message used to set the Sensor Setting state of an element (see Section 4.1.2).
Message format for the Sensor Cadence Get message.
uint16_t property_id
Property ID for the sensor.
uint16_t property_id
Property ID for the sensor.
Message format for the Sensor Column Get message (partial) 4.2.15 Sensor Column Get Sensor Column Get...
uint16_t property_id
Property ID for the sensor.
uint16_t property_id
Property ID for the sensor.
Message format for the Sensor Settings Status message.
Message format for the Sensor Series Get message (partial) 4.2.17 Sensor Series Get Sensor Series Get...
Message format for the Sensor Setting Status message.