38 #ifndef CONFIG_MESSAGES_H__ 39 #define CONFIG_MESSAGES_H__ 44 #include "nrf_mesh_assert.h" 55 #define CONFIG_RETRANSMIT_COUNT_MAX ((1 << 3) - 1) 57 #define CONFIG_RETRANSMIT_INTERVAL_STEPS_MAX ((1 << 5) - 1) 59 #define CONFIG_RETRANSMIT_INTERVAL_STEP_TO_MS(STEP) ((STEP) * 10) 61 #define CONFIG_RETRANSMIT_INTERVAL_MS_TO_STEP(MS) ((MS) / 10) 71 typedef struct __attribute((packed))
107 if (p_key_id_1 != NULL)
112 if (p_key_id_2 != NULL)
119 #define CONFIG_MSG_KEY_INDEX_12_MASK 0x0fff 133 typedef union __attribute((packed))
135 struct __attribute((packed))
139 struct __attribute((packed))
167 typedef struct __attribute((packed))
174 typedef struct __attribute((packed))
181 typedef struct __attribute((packed))
187 typedef struct __attribute((packed))
194 typedef struct __attribute((packed))
200 typedef struct __attribute((packed))
204 uint8_t packed_appkey_indexes[];
208 typedef struct __attribute((packed))
214 typedef struct __attribute((packed))
227 typedef struct __attribute((packed))
233 typedef struct __attribute((packed))
239 typedef struct __attribute((packed))
252 typedef struct __attribute((packed))
259 typedef struct __attribute((packed))
267 typedef struct __attribute((packed))
275 typedef struct __attribute((packed))
284 typedef struct __attribute((packed))
292 typedef struct __attribute((packed))
300 typedef struct __attribute((packed))
307 typedef struct __attribute((packed))
316 typedef struct __attribute((packed))
323 typedef struct __attribute((packed))
329 typedef struct __attribute((packed))
344 typedef struct __attribute((packed))
350 typedef struct __attribute((packed))
364 typedef struct __attribute((packed))
370 typedef struct __attribute((packed))
376 typedef struct __attribute((packed))
382 typedef struct __attribute((packed))
389 typedef struct __attribute((packed))
397 typedef struct __attribute((packed))
408 typedef struct __attribute((packed))
420 typedef struct __attribute((packed))
428 typedef struct __attribute((packed))
440 typedef struct __attribute((packed))
448 typedef struct __attribute((packed))
465 typedef struct __attribute((packed))
471 typedef struct __attribute((packed))
478 typedef struct __attribute((packed))
486 typedef struct __attribute((packed))
492 typedef struct __attribute((packed))
507 typedef struct __attribute((packed))
515 typedef struct __attribute((packed))
523 typedef struct __attribute((packed))
530 typedef struct __attribute((packed))
537 typedef struct __attribute((packed))
544 typedef struct __attribute((packed))
549 uint8_t key_indexes[];
553 typedef struct __attribute((packed))
559 uint8_t key_indexes[];
563 typedef struct __attribute((packed))
570 typedef struct __attribute((packed))
575 uint16_t subscriptions[];
579 typedef struct __attribute((packed))
585 uint16_t subscriptions[];
589 typedef struct __attribute((packed))
595 typedef struct __attribute((packed))
598 uint8_t polltimeout[3];
uint8_t network_transmit_count
Number of retransmissions per transmited packet.
uint8_t status
Status code.
uint16_t vendor_model_id
Vendor model ID.
Message format for the AppKey Status message.
uint16_t destination
Heartbeat publication destination.
uint16_t credential_flag
Friendship credentials flag.
uint8_t relay_retransmit_interval_steps
Number of 10 ms steps between retransmissions.
Message format for the Composition Data Get message.
uint8_t publish_ttl
TTL for outgoing messages.
Message format for the Model App Status message.
uint8_t identity_state
Current state of the node identity advertisement.
uint16_t company_id
Company ID.
Friendship is supported, but disabled.
uint8_t status
Status code.
uint8_t page_number
Page-number for the composition data page to retrieve.
config_msg_key_index_12_t netkey_index
Subnet index.
config_model_id_t model_id
Model ID.
uint16_t company_id
Vendor-specific company ID.
uint8_t proxy_state
The desired state of the GATT proxy service.
uint8_t proxy_state
The state of the GATT proxy service.
config_model_id_t model_id
Model ID.
uint8_t count_log
Number of heartbeat messages received.
#define NRF_MESH_KEY_SIZE
Size (in octets) of an encryption key.
Message format for the SIG/Vendor Model Subscription Get message.
uint8_t ttl
TTL for heartbeat message.
Message format for the Friend Set message.
Message format for the Friend Status message.
Message format for the Network Key Delete message.
config_gatt_proxy_state_t
Possible values for the GATT Proxy state.
config_net_beacon_state_t
Possible values for the network beacon state.
uint8_t relay_state
Desired state of the relaying feature.
uint8_t period_log
Period of heartbeat messages.
#define NRF_MESH_UUID_SIZE
Size (in octets) of a UUID.
Message format for the Default TTL Set message.
config_msg_key_index_12_t netkey_index
Network key index.
Message format for the AppKey Add message.
config_friend_state_t
Possible values for the Friend state.
uint8_t key_id_1_lsb
8 LSB of the first key index.
static void config_msg_model_id_set(config_model_id_t *p_dst, const access_model_id_t *p_src, bool is_sig)
Sets the value of the model id for different kind of models (SIG or vendor).
Relaying is supported, but disabled.
uint8_t key_id_1_msb
4 MSB of the first key index.
uint16_t element_address
Address of the element.
The network beacon is disabled.
Message format for the Network Transmit Status message.
config_msg_key_index_12_t netkey_index
Index for the network key used to send heartbeats.
config_model_id_t model_id
ID of the model.
uint8_t relay_retransmit_count
Desired number of retransmissions per relayed packed.
Message format for the AppKey Get message.
uint16_t publish_address
Publish address.
uint16_t source
Source of heartbeat messages.
config_model_id_t model_id
ID of the model.
The network beacon is enabled.
Message format for the Model Subscription Status message.
config_model_id_t model_id
ID of the model.
Message format for the Model Subscription Virtual Add/Delete/Overwrite messages.
uint16_t element_address
Unicast address of the element.
uint8_t publish_period
Period for periodic publishing.
config_msg_key_index_24_t key_indexes
Pair containing a netkey and an appkey index.
uint16_t appkey_index
Application key index.
Message format for the AppKey Delete message.
uint8_t key_id_2_lsb
4 LSB of the second key index.
uint8_t friend_state
The desired state of the friendship feature.
uint8_t friend_state
The state of the friendship feature.
The GATT proxy feature is not supported.
config_msg_key_index_12_t appkey_index
Application key index.
uint16_t lpn_address
The unicast address of the Low Power node.
Message format for the Config Beacon Set message.
Message format for the Relay Status message.
uint8_t status
Status code.
Message format for the Model Publication Get message.
Message format for the Network Key Add/Update messages.
config_identity_state_t
Possible values for the identity state.
uint8_t beacon_state
Beacon state.
Message format for the Heartbeat Subscription Status message.
Message format for the Node Identity Status message.
uint16_t element_address
Unicast address of the element.
uint16_t features
Features triggering heartbeat messages.
uint8_t page_number
Page-number for the composition data page contained in this response.
config_model_id_t model_id
Identifier of the model.
Message format for the Node Identity Get message.
uint8_t status
Status code.
uint8_t phase
Current key refresh phase for the subnet.
uint16_t element_address
Unicast address of the element.
uint16_t address
Address to subscribe to.
config_msg_key_index_12_t netkey_index
Index of the network the key refresh phase is reported for.
config_model_id_t model_id
Model ID.
Message format for the GATT Proxy Status message.
uint16_t element_address
Unicast address of the element.
Message format for the Vendor Model App List message.
static void config_msg_key_index_24_set(config_msg_key_index_24_t *p_idx24, uint16_t key_id_1, uint16_t key_id_2)
Sets the value of the keys in a 24-bit index struct.
config_msg_key_index_12_t netkey_index
Network key index.
uint8_t period_log
Period of heartbeat messages.
Message format for the Key Refresh Phase Get message.
uint16_t sig_model_id
SIG model ID.
uint16_t sig_model_id
SIG model ID.
uint8_t key_id_2_msb
8 MSB of the second key index.
The GATT proxy is running and enabled.
config_publication_params_t state
Current publication parameters.
config_msg_key_index_12_t netkey_index
Index of the network to set the key refresh phase for.
Friendship is not supported.
Message format for the Model Subscription Delete All message.
uint16_t element_address
Address of the element.
config_msg_key_index_12_t netkey_index
Network key to report application keys for.
uint16_t element_address
Address of the element.
uint8_t transition
ID of the phase to transition to.
uint8_t status
Status code.
uint16_t model_id
Model ID.
uint8_t ttl
Default TTL value.
Message format for the Key Refresh Phase Status message.
uint16_t destination
Destination of heartbeat messages.
Message format for the Model Publication Virtual Set message.
uint8_t ttl
Default TTL value.
The node identity advertisement is stopped.
config_msg_key_index_12_t netkey_index
Subnet index.
config_msg_key_index_12_t netkey_index
Network key index.
uint16_t element_address
Unicast address of the element.
Model ID type for configuration messages.
config_relay_state_t
Values for the relay state.
uint16_t address
Address that the model was subscribed to.
Message format for the Config Beacon Status message.
Message format for the GATT Proxy Set message.
Message format for the Heartbeat Publication Status message.
Message format for the SIG Model App List message.
config_msg_key_index_12_t netkey_index
Index for the network key used to send heartbeats.
Relaying is not supported.
uint16_t element_address
Unicast address of the element.
config_msg_key_index_12_t netkey_index
Subnet index.
config_msg_key_index_24_t key_indexes
Pair containing a netkey and an appkey index.
uint8_t period_log
Period of transmitted heartbeat messages.
Friendship is supported and enabled.
static void config_msg_key_index_24_get(const config_msg_key_index_24_t *p_idx24, uint16_t *p_key_id_1, uint16_t *p_key_id_2)
Gets the value of one or both of the keys in a 24-bit index struct.
Message format for the Low Power node PollTimeout Status message.
uint8_t min_hops
Least number of hops in received heartbeat messages.
uint16_t element_address
Unicast address of the element.
uint8_t ttl
TTL for heartbeat message.
uint8_t status
Status code.
uint8_t status
Status code.
uint8_t relay_retransmit_count
Number of retransmissions per relayed packet.
uint8_t retransmit_count
Number of retransmissions of each message.
uint8_t network_transmit_count
Desired number of retransmissions per packed.
Message format for the Model Publication Status message.
config_msg_key_index_24_t key_indexes
Pair containing a netkey and an appkey index.
Message format for the Composition Data Status message.
uint8_t retransmit_interval
Number of 50 ms steps between each retransmission.
uint16_t model_id
Model ID.
config_model_id_t model_id
ID of the model.
uint8_t relay_state
Current state of the relaying feature.
config_msg_key_index_12_t appkey_index
Application key index.
Message format for the Heartbeat Publication Set message.
uint8_t status
Status code.
uint8_t status
Status code.
uint8_t relay_retransmit_interval_steps
Desired number of 10 ms steps between retransmissions.
Message format for the Model Subscription Add/Delete/Overwrite messages.
uint8_t count_log
Number of heartbeat messages to be sent.
Message format for the Heartbeat Subscription Set message.
uint16_t features
Features triggering heartbeat messages.
uint8_t status
Status code.
uint16_t source
Source of heartbeat messages.
config_msg_key_index_24_t key_indexes
Pair containing a netkey and an appkey index.
uint16_t vendor_company_id
Vendor company ID.
uint16_t vendor_company_id
Vendor company ID.
uint8_t max_hops
Largest number of hops in received heartbeat messages.
The node identity advertisement is running.
config_model_id_t model_id
Model identifier.
uint8_t status
Status code.
uint16_t element_address
Unicast address of the element.
Message format for the Vendor Model Subscription List message.
uint8_t network_transmit_interval_steps
Number of 10 ms steps between retransmissions.
Node identity advertising is not supported.
config_msg_key_index_12_t netkey_index
Index of the network to get the key refresh phase for.
Message format for the Node Identity Set message.
uint8_t status
Status code.
Message format for the Relay Set message.
uint16_t publish_address
Publish address.
Relaying is supported and enabled.
uint8_t status
Status code.
uint8_t count_log
Number of heartbeat messages to be sent.
uint8_t identity_state
Identity advertisement state.
Message format for the AppKey List message.
Message format for the Model App Bind/Unbind message.
Message format for the Default TTL Status message.
config_model_id_t model_id
Model ID.
Message format for the Network Transmit Set message.
config_publication_params_t state
The publication parameters to set.
Message format for the Network Key Status message.
uint16_t lpn_address
The unicast address of the Low Power node.
uint16_t vendor_model_id
Vendor model ID.
Message format for the Model Publication Set message.
uint16_t element_address
Address of the element.
uint8_t status
Status code.
uint16_t rfu
Reserved for future use, set to 0.
uint8_t period_log
Period of transmitted heartbeat messages.
Message format for the Key Refresh Phase Set message.
#define NRF_MESH_STATIC_ASSERT(...)
Compile-time assertion.
uint16_t destination
Heartbeat publication destination.
uint16_t element_address
Address of the element.
Message format for the AppKey Update message.
uint8_t beacon_state
Beacon state.
Message format for the Low Power node PollTimeout Get message.
uint16_t element_address
Unicast address of the element.
uint8_t network_transmit_interval_steps
Desired number of 10 ms steps between retransmissions.
uint16_t element_address
Unicast address of the element.
uint16_t config_msg_key_index_12_t
12-bit key index type.
Message format for the SIG Model Subscription List message.
config_msg_key_index_12_t netkey_index
Network key index.
config_publication_params_t state
The publication parameters to set.
The GATT proxy is running, but disabled.
uint16_t destination
Destination of heartbeat messages.
Message format for the SIG/Vendor Model App Get message.
uint16_t element_address
Unicast address of the element.