mesh: mesh_trigger_iv_update

This commit is contained in:
Matthias Ringwald 2019-07-05 16:04:02 +02:00
parent 7d00533263
commit a42685b6ad
2 changed files with 9 additions and 0 deletions

View File

@ -976,6 +976,14 @@ int mesh_iv_update_active(void){
return global_iv_update_active;
}
void mesh_trigger_iv_update(void){
if (global_iv_update_active) return;
// set IV Update in Progress
global_iv_update_active = 1;
// increase IV index
global_iv_index++;
}
// Network PDU Getter
uint8_t mesh_network_nid(mesh_network_pdu_t * network_pdu){
return network_pdu->data[0] & 0x7f;

View File

@ -376,6 +376,7 @@ void mesh_set_iv_index(uint32_t iv_index);
uint32_t mesh_get_iv_index(void);
int mesh_iv_update_active(void);
void mesh_trigger_iv_update(void);
// Testing only
void mesh_network_received_message(const uint8_t * pdu_data, uint8_t pdu_len, uint8_t flags);