mesh: add mesh_model_get_configuration_server

This commit is contained in:
Milanka Ringwald 2019-06-11 13:24:48 +02:00 committed by Matthias Ringwald
parent 504b0c7ada
commit 206ab9522f
2 changed files with 5 additions and 0 deletions

View File

@ -125,6 +125,9 @@ int mesh_model_is_bluetooth_sig(uint32_t model_identifier){
return mesh_model_get_vendor_id(model_identifier) == BLUETOOTH_COMPANY_ID_BLUETOOTH_SIG_INC;
}
mesh_model_t * mesh_model_get_configuration_server(void){
return mesh_model_get_by_identifier(primary_element, mesh_model_get_model_identifier_bluetooth_sig(MESH_SIG_MODEL_ID_CONFIGURATION_SERVER));
}
void mesh_element_add_model(mesh_element_t * element, mesh_model_t * mesh_model){
if (mesh_model_is_bluetooth_sig(mesh_model->model_identifier)){

View File

@ -186,6 +186,8 @@ uint16_t mesh_model_get_model_id(uint32_t model_identifier);
uint32_t mesh_model_get_model_identifier(uint16_t vendor_id, uint16_t model_id);
mesh_model_t * mesh_model_get_configuration_server(void);
// Mesh PDU Getter
uint16_t mesh_pdu_src(mesh_pdu_t * pdu);
uint16_t mesh_pdu_dst(mesh_pdu_t * pdu);