mesh_access: getters for sig and vendor model identifiers

This commit is contained in:
Milanka Ringwald 2020-01-21 16:35:56 +01:00
parent 0ac5ead3a2
commit bacd6cd3ab
2 changed files with 14 additions and 0 deletions

View File

@ -583,6 +583,17 @@ uint32_t mesh_access_parser_get_model_identifier(mesh_access_parser_state_t * pa
return mesh_model_get_model_identifier(vendor_id, model_id);
}
uint32_t mesh_access_parser_get_sig_model_identifier(mesh_access_parser_state_t * parser){
uint16_t model_id = mesh_access_parser_get_u16(parser);
return mesh_model_get_model_identifier(BLUETOOTH_COMPANY_ID_BLUETOOTH_SIG_INC, model_id);
}
uint32_t mesh_access_parser_get_vendor_model_identifier(mesh_access_parser_state_t * parser){
uint16_t vendor_id = mesh_access_parser_get_u16(parser);
uint16_t model_id = mesh_access_parser_get_u16(parser);
return mesh_model_get_model_identifier(vendor_id, model_id);
}
// Mesh Access Message Builder
// message builder

View File

@ -244,6 +244,9 @@ void mesh_access_parser_get_label_uuid(mesh_access_parser_state_t * state, uint8
void mesh_access_parser_get_key(mesh_access_parser_state_t * state, uint8_t * dest);
uint32_t mesh_access_parser_get_model_identifier(mesh_access_parser_state_t * parser);
uint32_t mesh_access_parser_get_sig_model_identifier(mesh_access_parser_state_t * parser);
uint32_t mesh_access_parser_get_vendor_model_identifier(mesh_access_parser_state_t * parser);
// message builder transport
mesh_transport_pdu_t * mesh_access_transport_init(uint32_t opcode);
void mesh_access_transport_add_uint8(mesh_transport_pdu_t * pdu, uint8_t value);