mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-28 00:35:42 +00:00
mesh: single mesh_upper_transport_send_control_pdu instead of segmented/unsegmented
This commit is contained in:
parent
9b1db5eacc
commit
f804bd819f
@ -1614,7 +1614,7 @@ static void config_heartbeat_publication_emit(btstack_timer_source_t * ts){
|
||||
mesh_upper_transport_setup_unsegmented_control_pdu(network_pdu, mesh_heartbeat_publication.netkey_index,
|
||||
mesh_heartbeat_publication.ttl, primary_element_address, mesh_heartbeat_publication.destination,
|
||||
MESH_TRANSPORT_OPCODE_HEARTBEAT, data, sizeof(data));
|
||||
mesh_upper_transport_send_unsegmented_control_pdu(network_pdu);
|
||||
mesh_upper_transport_send_control_pdu((mesh_pdu_t *) network_pdu);
|
||||
}
|
||||
btstack_run_loop_set_timer(ts, time_ms);
|
||||
btstack_run_loop_add_timer(ts);
|
||||
|
@ -347,12 +347,12 @@ void test_send_control_message(uint16_t netkey_index, uint8_t ttl, uint16_t src,
|
||||
// send as unsegmented control pdu
|
||||
mesh_network_pdu_t * network_pdu = mesh_network_pdu_get();
|
||||
mesh_upper_transport_setup_unsegmented_control_pdu(network_pdu, netkey_index, ttl, src, dest, opcode, transport_pdu_data+1, transport_pdu_len-1);
|
||||
mesh_upper_transport_send_unsegmented_control_pdu(network_pdu);
|
||||
mesh_upper_transport_send_control_pdu((mesh_pdu_t*) network_pdu);
|
||||
} else {
|
||||
// send as segmented control pdu
|
||||
mesh_transport_pdu_t * transport_pdu = mesh_transport_pdu_get();
|
||||
mesh_upper_transport_setup_segmented_control_pdu(transport_pdu, netkey_index, ttl, src, dest, opcode, transport_pdu_data+1, transport_pdu_len-1);
|
||||
mesh_upper_transport_send_segmented_control_pdu(transport_pdu);
|
||||
mesh_upper_transport_send_control_pdu((mesh_pdu_t*) transport_pdu);
|
||||
}
|
||||
|
||||
// check for all network pdus
|
||||
|
@ -682,12 +682,8 @@ uint8_t mesh_upper_transport_setup_segmented_access_pdu(mesh_transport_pdu_t * t
|
||||
return 0;
|
||||
}
|
||||
|
||||
void mesh_upper_transport_send_unsegmented_control_pdu(mesh_network_pdu_t * network_pdu){
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t*) network_pdu);
|
||||
}
|
||||
|
||||
void mesh_upper_transport_send_segmented_control_pdu(mesh_transport_pdu_t * transport_pdu){
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t*) transport_pdu);
|
||||
void mesh_upper_transport_send_control_pdu(mesh_pdu_t * pdu){
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t*) pdu);
|
||||
}
|
||||
|
||||
void mesh_upper_transport_send_unsegmented_access_pdu_digest(void * arg){
|
||||
|
@ -69,10 +69,7 @@ uint8_t mesh_upper_transport_setup_segmented_control_pdu(mesh_transport_pdu_t *
|
||||
uint8_t mesh_upper_transport_setup_unsegmented_control_pdu(mesh_network_pdu_t * network_pdu, uint16_t netkey_index,
|
||||
uint8_t ttl, uint16_t src, uint16_t dest, uint8_t opcode, const uint8_t * control_pdu_data, uint16_t control_pdu_len);
|
||||
|
||||
void mesh_upper_transport_send_unsegmented_control_pdu(mesh_network_pdu_t * network_pdu);
|
||||
|
||||
void mesh_upper_transport_send_segmented_control_pdu(mesh_transport_pdu_t * transport_pdu);
|
||||
|
||||
void mesh_upper_transport_send_control_pdu(mesh_pdu_t * pdu);
|
||||
|
||||
// Access PDUs
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user