Skip to content

Commit

Permalink
Merge branch 'main' into fix_merge_main
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Nov 19, 2024
2 parents 5071eda + 8b9d818 commit b6993fa
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,12 @@ set(Z_FEATURE_PUBLISHER_SESSION_CHECK 1 CACHE STRING "Toggle publisher session c
set(Z_FEATURE_BATCHING 1 CACHE STRING "Toggle batching")
set(Z_FEATURE_RX_CACHE 0 CACHE STRING "Toggle RX_CACHE")

# Add a warning message if someone tries to enable Z_FEATURE_LIVELINESS directly
if(Z_FEATURE_LIVELINESS AND NOT Z_FEATURE_UNSTABLE_API)
message(WARNING "Z_FEATURE_LIVELINESS can only be enabled when Z_FEATURE_UNSTABLE_API is also enabled. Disabling Z_FEATURE_LIVELINESS.")
set(Z_FEATURE_LIVELINESS 0 CACHE STRING "Toggle liveliness feature" FORCE)
endif()

add_compile_definitions("Z_BUILD_DEBUG=$<CONFIG:Debug>")
message(STATUS "Building with feature confing:\n\
* UNSTABLE_API: ${Z_FEATURE_UNSTABLE_API}\n\
Expand Down
4 changes: 4 additions & 0 deletions include/zenoh-pico/collections/element.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ static inline void _z_noop_move(void *dst, void *src) {

_Z_ELEM_DEFINE(_z_noop, _z_noop_t, _z_noop_size, _z_noop_clear, _z_noop_copy, _z_noop_move)

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_COLLECTIONS_ELEMENT_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/net/publish.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ void _z_publisher_clear(_z_publisher_t *pub);
void _z_publisher_free(_z_publisher_t **pub);
#endif

#ifdef __cplusplus
}
#endif

#endif /* INCLUDE_ZENOH_PICO_NET_PUBLISH_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/net/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ void _z_queryable_free(_z_queryable_t **qbl);

#endif

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_QUERY_NETAPI_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/net/subscribe.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ void _z_subscriber_free(_z_subscriber_t **sub);

#endif

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_SUBSCRIBE_NETAPI_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/protocol/codec/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ z_result_t _z_n_interest_decode(_z_n_msg_interest_t *interest, _z_zbuf_t *zbf, u
z_result_t _z_network_message_encode(_z_wbuf_t *wbf, const _z_network_message_t *msg);
z_result_t _z_network_message_decode(_z_network_message_t *msg, _z_zbuf_t *zbf, _z_arc_slice_t *arcs);

#ifdef __cplusplus
}
#endif

#endif /* INCLUDE_ZENOH_PICO_PROTOCOL_CODEC_NETWORK_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/protocol/definitions/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,8 @@ _z_network_message_t _z_n_msg_make_push(_Z_MOVE(_z_keyexpr_t) key, _Z_MOVE(_z_pu
_z_network_message_t _z_n_msg_make_interest(_z_interest_t interest);
z_result_t _z_n_msg_copy(_z_network_message_t *dst, const _z_network_message_t *src);

#ifdef __cplusplus
}
#endif

#endif /* INCLUDE_ZENOH_PICO_PROTOCOL_DEFINITIONS_NETWORK_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/session/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ static inline void _z_session_mutex_lock(_z_session_t *zn) { _ZP_UNUSED(zn); }
static inline void _z_session_mutex_unlock(_z_session_t *zn) { _ZP_UNUSED(zn); }
#endif

#ifdef __cplusplus
}
#endif

#endif /* INCLUDE_ZENOH_PICO_SESSION_UTILS_H */
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 @@ -37,4 +37,8 @@ z_result_t _z_send_n_msg(_z_session_t *zn, const _z_network_message_t *n_msg, z_
z_congestion_control_t cong_ctrl);
z_result_t _z_send_n_batch(_z_session_t *zn, z_congestion_control_t cong_ctrl);

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_TRANSPORT_TX_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/transport/multicast/rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ z_result_t _z_multicast_handle_transport_message(_z_transport_multicast_t *ztm,
_z_slice_t *addr);
z_result_t _z_multicast_update_rx_buffer(_z_transport_multicast_t *ztm);

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_TRANSPORT_LINK_RX_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/transport/raweth/rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ z_result_t _z_raweth_recv_t_msg(_z_transport_multicast_t *ztm, _z_transport_mess
z_result_t _z_raweth_recv_t_msg_na(_z_transport_multicast_t *ztm, _z_transport_message_t *t_msg, _z_slice_t *addr);
z_result_t _z_raweth_update_rx_buff(_z_transport_multicast_t *ztm);

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_RAWETH_RX_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/transport/raweth/tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ z_result_t _z_raweth_send_n_msg(_z_session_t *zn, const _z_network_message_t *z_
z_congestion_control_t cong_ctrl);
z_result_t _z_raweth_send_t_msg(_z_transport_common_t *ztc, const _z_transport_message_t *t_msg);

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_RAWETH_TX_H */
4 changes: 4 additions & 0 deletions include/zenoh-pico/transport/unicast/rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@ z_result_t _z_unicast_recv_t_msg_na(_z_transport_unicast_t *ztu, _z_transport_me
z_result_t _z_unicast_handle_transport_message(_z_transport_unicast_t *ztu, _z_transport_message_t *t_msg);
z_result_t _z_unicast_update_rx_buffer(_z_transport_unicast_t *ztu);

#ifdef __cplusplus
}
#endif

#endif /* ZENOH_PICO_UNICAST_RX_H */
8 changes: 8 additions & 0 deletions src/protocol/keyexpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ _z_keyexpr_t _z_keyexpr_duplicate(const _z_keyexpr_t *src) {
return dst;
}

_z_keyexpr_t *_z_keyexpr_clone(const _z_keyexpr_t *src) {
_z_keyexpr_t *dst = z_malloc(sizeof(_z_keyexpr_t));
if (dst != NULL) {
_z_keyexpr_copy(dst, src);
}
return dst;
}

_z_keyexpr_t _z_keyexpr_steal(_Z_MOVE(_z_keyexpr_t) src) {
_z_keyexpr_t stolen = *src;
*src = _z_keyexpr_null();
Expand Down
2 changes: 1 addition & 1 deletion zenohpico.pc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ prefix=/usr/local
Name: zenohpico
Description:
URL:
Version: 1.0.20241115dev
Version: 1.0.20241018dev
Cflags: -I${prefix}/include
Libs: -L${prefix}/lib -lzenohpico

0 comments on commit b6993fa

Please sign in to comment.