mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-01 04:20:33 +00:00
mesh: route heartbeat control message to configuration server
This commit is contained in:
parent
e9292fe87e
commit
b77439a1e3
@ -1081,6 +1081,19 @@ static int mesh_node_startup_from_tlv(void){
|
||||
return prov_data_valid;
|
||||
}
|
||||
|
||||
static void mesh_control_message_handler(mesh_pdu_t * pdu){
|
||||
// get opcode
|
||||
uint8_t opcode = mesh_pdu_control_opcode(pdu);
|
||||
printf("Opcode: 0x%02x\n", opcode);
|
||||
switch(opcode){
|
||||
case 0x0a:
|
||||
mesh_configuration_server_process_heartbeat(pdu);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mesh_upper_transport_message_processed_by_higher_layer(pdu);
|
||||
}
|
||||
|
||||
static void mesh_node_setup_default_models(void){
|
||||
// configure Config Server
|
||||
@ -1137,6 +1150,9 @@ void mesh_init(void){
|
||||
|
||||
// register for seq number updates
|
||||
mesh_sequence_number_set_update_callback(&mesh_persist_iv_index_and_sequence_number_if_needed);
|
||||
|
||||
// register for control messages
|
||||
mesh_upper_transport_register_control_message_handler(&mesh_control_message_handler);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2202,3 +2202,6 @@ const mesh_operation_t * mesh_configuration_server_get_operations(void){
|
||||
return mesh_configuration_server_model_operations;
|
||||
}
|
||||
|
||||
void mesh_configuration_server_process_heartbeat(mesh_pdu_t * pdu){
|
||||
printf("HEARTBEAT\n");
|
||||
}
|
||||
|
@ -84,6 +84,8 @@ const mesh_operation_t * mesh_configuration_server_get_operations(void);
|
||||
|
||||
void mesh_configuration_server_feature_changed(void);
|
||||
|
||||
void mesh_configuration_server_process_heartbeat(mesh_pdu_t * pdu);
|
||||
|
||||
// PTS Testing
|
||||
void config_nekey_list_set_max(uint16_t max);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user