diff --git a/src/mesh/mesh_access.c b/src/mesh/mesh_access.c index 8c81c90e7..5603001a7 100644 --- a/src/mesh/mesh_access.c +++ b/src/mesh/mesh_access.c @@ -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 diff --git a/src/mesh/mesh_access.h b/src/mesh/mesh_access.h index a4dca211e..c39feb400 100644 --- a/src/mesh/mesh_access.h +++ b/src/mesh/mesh_access.h @@ -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);