mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 21:35:16 +00:00
mesh: move model contains subscription load/store to mesh from access
This commit is contained in:
parent
a0253209c2
commit
812ef2e382
@ -552,6 +552,15 @@ void mesh_access_key_refresh_revoke_keys(mesh_subnet_t * subnet){
|
||||
}
|
||||
}
|
||||
|
||||
// Mesh Model Subscription
|
||||
int mesh_model_contains_subscription(mesh_model_t * mesh_model, uint16_t address){
|
||||
uint16_t i;
|
||||
for (i=0;i<MAX_NR_MESH_SUBSCRIPTION_PER_MODEL;i++){
|
||||
if (mesh_model->subscriptions[i] == address) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Mesh IV Index
|
||||
static uint32_t mesh_tag_for_iv_index_and_seq_number(void){
|
||||
return ((uint32_t) 'M' << 24) | ((uint32_t) 'F' << 16) | ((uint32_t) 'I' << 9) | ((uint32_t) 'S');
|
||||
|
@ -87,6 +87,9 @@ uint8_t mesh_model_bind_appkey(mesh_model_t * mesh_model, uint16_t appkey_index)
|
||||
void mesh_model_unbind_appkey(mesh_model_t * mesh_model, uint16_t appkey_index);
|
||||
int mesh_model_contains_appkey(mesh_model_t * mesh_model, uint16_t appkey_index);
|
||||
|
||||
// Mesh Model Subscriptions
|
||||
int mesh_model_contains_subscription(mesh_model_t * mesh_model, uint16_t address);
|
||||
|
||||
// temp
|
||||
void mesh_access_setup_from_provisioning_data(const mesh_provisioning_data_t * provisioning_data);
|
||||
void mesh_access_setup_without_provisiong_data(void);
|
||||
|
@ -976,14 +976,6 @@ void mesh_access_message_processed(mesh_pdu_t * pdu){
|
||||
mesh_upper_transport_message_processed_by_higher_layer(pdu);
|
||||
}
|
||||
|
||||
int mesh_model_contains_subscription(mesh_model_t * mesh_model, uint16_t address){
|
||||
uint16_t i;
|
||||
for (i=0;i<MAX_NR_MESH_SUBSCRIPTION_PER_MODEL;i++){
|
||||
if (mesh_model->subscriptions[i] == address) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Mesh Model Publication
|
||||
static btstack_timer_source_t mesh_access_publication_timer;
|
||||
|
||||
|
@ -347,9 +347,6 @@ uint16_t mesh_pdu_appkey_index(mesh_pdu_t * pdu);
|
||||
uint16_t mesh_pdu_len(mesh_pdu_t * pdu);
|
||||
uint8_t * mesh_pdu_data(mesh_pdu_t * pdu);
|
||||
|
||||
// Mesh Model Subscriptions
|
||||
int mesh_model_contains_subscription(mesh_model_t * mesh_model, uint16_t address);
|
||||
|
||||
// Mesh Access Parser
|
||||
int mesh_access_pdu_get_opcode(mesh_pdu_t * pdu, uint32_t * opcode, uint16_t * opcode_size);
|
||||
int mesh_access_parser_init(mesh_access_parser_state_t * state, mesh_pdu_t * pdu);
|
||||
|
Loading…
x
Reference in New Issue
Block a user