Skip to content

Commit

Permalink
refactor: fuse unicast and multicast tx
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Oct 28, 2024
1 parent 64e2f64 commit 35d52bf
Show file tree
Hide file tree
Showing 19 changed files with 286 additions and 665 deletions.
3 changes: 0 additions & 3 deletions include/zenoh-pico/session/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ void _z_session_clear(_z_session_t *zn);
z_result_t _z_session_close(_z_session_t *zn, uint8_t reason);

z_result_t _z_handle_network_message(_z_session_rc_t *zsrc, _z_zenoh_message_t *z_msg, uint16_t local_peer_id);
z_result_t _z_send_n_msg(_z_session_t *zn, _z_network_message_t *n_msg, z_reliability_t reliability,
z_congestion_control_t cong_ctrl);
z_result_t _z_send_n_batch(_z_session_t *zn, z_congestion_control_t cong_ctrl);

#if Z_FEATURE_MULTI_THREAD == 1
static inline void _z_session_mutex_lock(_z_session_t *zn) { (void)_z_mutex_lock(&zn->_mutex_inner); }
Expand Down
4 changes: 4 additions & 0 deletions include/zenoh-pico/transport/common/tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ void __unsafe_z_finalize_wbuf(_z_wbuf_t *buf, uint8_t link_flow_capability);
z_result_t __unsafe_z_serialize_zenoh_fragment(_z_wbuf_t *dst, _z_wbuf_t *src, z_reliability_t reliability, size_t sn);

/*------------------ Transmission and Reception helpers ------------------*/
z_result_t _z_transport_tx_send_t_msg(_z_transport_common_t *ztc, const _z_transport_message_t *t_msg);
z_result_t _z_send_t_msg(_z_transport_t *zt, const _z_transport_message_t *t_msg);
z_result_t _z_link_send_t_msg(const _z_link_t *zl, const _z_transport_message_t *t_msg);
z_result_t _z_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_msg, z_reliability_t reliability,
z_congestion_control_t cong_ctrl);
z_result_t _z_send_n_batch(_z_session_t *zn, z_congestion_control_t cong_ctrl);

#endif /* ZENOH_PICO_TRANSPORT_TX_H */
26 changes: 0 additions & 26 deletions include/zenoh-pico/transport/multicast/tx.h

This file was deleted.

26 changes: 0 additions & 26 deletions include/zenoh-pico/transport/unicast/tx.h

This file was deleted.

1 change: 1 addition & 0 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "zenoh-pico/session/utils.h"
#include "zenoh-pico/system/platform.h"
#include "zenoh-pico/system/platform_common.h"
#include "zenoh-pico/transport/common/tx.h"
#include "zenoh-pico/transport/multicast.h"
#include "zenoh-pico/transport/unicast.h"
#include "zenoh-pico/utils/endianness.h"
Expand Down
1 change: 1 addition & 0 deletions src/net/primitives.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "zenoh-pico/session/resource.h"
#include "zenoh-pico/session/subscription.h"
#include "zenoh-pico/session/utils.h"
#include "zenoh-pico/transport/common/tx.h"
#include "zenoh-pico/utils/logging.h"
#include "zenoh-pico/utils/result.h"

Expand Down
1 change: 1 addition & 0 deletions src/net/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "zenoh-pico/net/query.h"

#include "zenoh-pico/session/utils.h"
#include "zenoh-pico/transport/common/tx.h"
#include "zenoh-pico/utils/logging.h"

void _z_query_clear_inner(_z_query_t *q) {
Expand Down
1 change: 1 addition & 0 deletions src/session/interest.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "zenoh-pico/session/queryable.h"
#include "zenoh-pico/session/resource.h"
#include "zenoh-pico/session/utils.h"
#include "zenoh-pico/transport/common/tx.h"
#include "zenoh-pico/utils/logging.h"

#if Z_FEATURE_INTEREST == 1
Expand Down
1 change: 1 addition & 0 deletions src/session/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "zenoh-pico/session/session.h"
#include "zenoh-pico/session/subscription.h"
#include "zenoh-pico/session/utils.h"
#include "zenoh-pico/transport/common/tx.h"
#include "zenoh-pico/utils/logging.h"

/*------------------ Handle message ------------------*/
Expand Down
61 changes: 0 additions & 61 deletions src/session/tx.c

This file was deleted.

Loading

0 comments on commit 35d52bf

Please sign in to comment.