Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add corrections on 1.1 #791

Merged
merged 42 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
cd4550d
Update closure handlers documentaion (#736)
sashacmc Oct 14, 2024
c75c89a
Rename closure callback/dropper types (#739)
sashacmc Oct 14, 2024
6db8aa7
Remove legacy z_zint_t from public API (#741)
sashacmc Oct 15, 2024
95bc75c
Add `export "C"` for all header files (#740)
sashacmc Oct 15, 2024
a8962f8
add serialize from substr functions (#742)
DenisBiryukov91 Oct 16, 2024
7ccffa7
Rename z_loaned_hello_handler_t to z_closure_hello_callback_t (#743)
sashacmc Oct 16, 2024
bd5712e
Mark z_reply_replier_id as unstable (#745)
sashacmc Oct 16, 2024
54c430a
Add documentation about logging (#744)
sashacmc Oct 16, 2024
65f6927
Update README.md (#746)
sashacmc Oct 16, 2024
d80efd4
hardcode clang-format runner to Ubuntu24.04 (#748)
DenisBiryukov91 Oct 17, 2024
5f39d6a
fix build granularity (#747)
DenisBiryukov91 Oct 17, 2024
bb1a0d2
fix: badly named constant (#750)
jean-roland Oct 18, 2024
fc4fe28
fix packages
DenisBiryukov91 Oct 18, 2024
5ae9d57
merge main
DenisBiryukov91 Oct 18, 2024
0e534df
fix: update debian packaging
diogomatsubara Oct 19, 2024
2935b0d
fix: debian dev package name
diogomatsubara Oct 19, 2024
5735d91
Merge pull request #751 from DenisBiryukov91/fix-package-generation
Mallets Oct 21, 2024
45fcb32
Merge pull request #752 from ZettaScaleLabs/fix-pico-debian-package
Mallets Oct 21, 2024
9872197
fix: package version for releases (#753)
diogomatsubara Oct 21, 2024
8aa53e2
build shared lib for packages instead of static one (#757)
DenisBiryukov91 Oct 22, 2024
fe105a9
Fix z_task cleanup for platforms with pthread support (#759)
sashacmc Oct 22, 2024
6ca364b
Fix read/lease task cleanup (#760)
sashacmc Oct 22, 2024
d1e63e4
Align ID string representation with zenoh (lowercase) (#761)
sashacmc Oct 23, 2024
df70c74
Remove default parameters from z_closure (#755)
sashacmc Oct 24, 2024
9cc5d70
build both libraries:shared and static when packaging; (#766)
DenisBiryukov91 Oct 28, 2024
35f60d6
Publish debian packages (#769)
diogomatsubara Oct 31, 2024
c8e60ca
fix: Don't tag release branch during dry-run
diogomatsubara Nov 5, 2024
0fd9d9e
Replace exit with return in zephyr examples (#774)
sashacmc Nov 5, 2024
3c3569c
Add platform_common.c to zephyr CMakeLists.txt file
sashacmc Nov 6, 2024
7cffd69
Merge pull request #778 from ZettaScaleLabs/fix_zephyr_build_2
Mallets Nov 7, 2024
0085e43
Merge pull request #772 from ZettaScaleLabs/no-tag-in-dry-run
Mallets Nov 7, 2024
291a9cd
Rework Zenoh ID conversion
sashacmc Nov 8, 2024
9ab6439
Merge pull request #779 from ZettaScaleLabs/rework_zid_processing
Mallets Nov 8, 2024
f2c25c0
chore: Update org secrets (#782)
diogomatsubara Nov 12, 2024
1901e44
Implement liveliness support (#632)
sashacmc Nov 15, 2024
836257c
Mark liveliness API as unstable and disable by default
sashacmc Nov 18, 2024
caefa3f
Fix typo (#787)
sashacmc Nov 18, 2024
8b9d818
Merge pull request #788 from ZettaScaleLabs/mark_liveliness_as_unstable
Mallets Nov 18, 2024
d1ffc49
Merge branch 'main' into ft_fix_1_1
jean-roland Nov 19, 2024
45343b3
fix: correct 1.1 issues
jean-roland Nov 19, 2024
9489266
feat: add zp_batch_flush
jean-roland Nov 19, 2024
93db822
fix: switch to #if 0 to deactivate tcp function
jean-roland Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ set(Z_FEATURE_PUBLICATION 1 CACHE STRING "Toggle publication feature")
set(Z_FEATURE_SUBSCRIPTION 1 CACHE STRING "Toggle subscription feature")
set(Z_FEATURE_QUERY 1 CACHE STRING "Toggle query feature")
set(Z_FEATURE_QUERYABLE 1 CACHE STRING "Toggle queryable feature")
set(Z_FEATURE_LIVELINESS 1 CACHE STRING "Toggle liveliness feature")
set(Z_FEATURE_LIVELINESS 0 CACHE STRING "Toggle liveliness feature")
set(Z_FEATURE_INTEREST 1 CACHE STRING "Toggle interests")
set(Z_FEATURE_FRAGMENTATION 1 CACHE STRING "Toggle fragmentation")
set(Z_FEATURE_ENCODING_VALUES 1 CACHE STRING "Toggle encoding values")
Expand All @@ -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
2 changes: 1 addition & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ See details at :ref:`owned_types_concept`

Functions
---------
.. autocfunction:: liveliness.h::z_liveliness_token_options_t_default
.. autocfunction:: liveliness.h::z_liveliness_token_options_default
.. autocfunction:: liveliness.h::z_liveliness_declare_token
.. autocfunction:: liveliness.h::z_liveliness_undeclare_token
.. autocfunction:: liveliness.h::z_liveliness_subscriber_options_default
Expand Down
2 changes: 1 addition & 1 deletion include/zenoh-pico/api/liveliness.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ typedef struct z_liveliness_token_options_t {
/**
* Constructs default value for :c:type:`z_liveliness_token_options_t`.
*/
z_result_t z_liveliness_token_options_t_default(z_liveliness_token_options_t *options);
z_result_t z_liveliness_token_options_default(z_liveliness_token_options_t *options);

/**
* Constructs and declares a liveliness token on the network.
Expand Down
19 changes: 15 additions & 4 deletions include/zenoh-pico/api/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -2063,9 +2063,9 @@ const z_loaned_keyexpr_t *z_subscriber_keyexpr(const z_loaned_subscriber_t *subs
#ifdef Z_FEATURE_UNSTABLE_API
#if Z_FEATURE_BATCHING == 1
/**
* Activate the batching mechanism.
* Any message that would have been sent on the network by a subsequent api call (e.g z_put, z_get)
* will be instead stored until the batch is full or batching is stopped with :c:func:`zp_batch_stop`.
* Activate the batching mechanism, any message that would have been sent on the network by a subsequent api call (e.g
* z_put, z_get) will be instead stored until the batch is full, flushed with :c:func:`zp_batch_flush` or batching is
* stopped with :c:func:`zp_batch_stop`.
*
* Parameters:
* zs: Pointer to a :c:type:`z_loaned_session_t` that will start batching messages.
Expand All @@ -2076,7 +2076,18 @@ const z_loaned_keyexpr_t *z_subscriber_keyexpr(const z_loaned_subscriber_t *subs
z_result_t zp_batch_start(const z_loaned_session_t *zs);

/**
* Deactivate the batching mechanism and flush the remaining messages.
* Send the currently batched messages on the network.
*
* Parameters:
* zs: Pointer to a :c:type:`z_loaned_session_t` that will send its batched messages.
*
* Return:
* ``0`` if batch successfully sent, ``negative value`` otherwise.
*/
z_result_t zp_batch_flush(const z_loaned_session_t *zs);

/**
* Deactivate the batching mechanism and send the currently batched on the network.
*
* Parameters:
* zs: Pointer to a :c:type:`z_loaned_session_t` that will stop batching messages.
Expand Down
6 changes: 3 additions & 3 deletions include/zenoh-pico/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define Z_FEATURE_SUBSCRIPTION 1
#define Z_FEATURE_QUERY 1
#define Z_FEATURE_QUERYABLE 1
#define Z_FEATURE_LIVELINESS 1
#define Z_FEATURE_LIVELINESS 0
#define Z_FEATURE_RAWETH_TRANSPORT 0
#define Z_FEATURE_INTEREST 1
#define Z_FEATURE_DYNAMIC_MEMORY_ALLOCATION 0
Expand All @@ -44,9 +44,9 @@
#define Z_FEATURE_ENCODING_VALUES 1
#define Z_FEATURE_TCP_NODELAY 1
#define Z_FEATURE_LOCAL_SUBSCRIBER 0
#define Z_FEATURE_PUBLISHER_SESSION_CHECK 0
#define Z_FEATURE_PUBLISHER_SESSION_CHECK 1
#define Z_FEATURE_BATCHING 1
#define Z_FEATURE_RX_CACHE 1
#define Z_FEATURE_RX_CACHE 0
// End of CMake generation

/*------------------ Runtime configuration properties ------------------*/
Expand Down
4 changes: 0 additions & 4 deletions include/zenoh-pico/net/primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
extern "C" {
#endif

#ifdef __cplusplus
extern "C" {
#endif

/*------------------ Discovery ------------------*/

/**
Expand Down
9 changes: 9 additions & 0 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,15 @@ z_result_t zp_batch_start(const z_loaned_session_t *zs) {
return _z_transport_start_batching(&session->_tp) ? _Z_RES_OK : _Z_ERR_GENERIC;
}

z_result_t zp_batch_flush(const z_loaned_session_t *zs) {
_z_session_t *session = _Z_RC_IN_VAL(zs);
if (_Z_RC_IS_NULL(zs)) {
return _Z_ERR_SESSION_CLOSED;
}
// Send current batch
return _z_send_n_batch(session, Z_CONGESTION_CONTROL_DEFAULT);
}

z_result_t zp_batch_stop(const z_loaned_session_t *zs) {
_z_session_t *session = _Z_RC_IN_VAL(zs);
if (_Z_RC_IS_NULL(zs)) {
Expand Down
2 changes: 0 additions & 2 deletions src/transport/multicast/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ z_result_t _z_multicast_handle_transport_message(_z_transport_multicast_t *ztm,
_Z_INFO("Failed to decode defragmented message");
ret = _Z_ERR_MESSAGE_DESERIALIZATION_FAILED;
}
// Fragmented messages must be cleared. Non-fragmented messages are released with their transport.
_z_msg_clear(&zm);
// Free the decoding buffer
_z_zbuf_clear(&zbf);
*dbuf_state = _Z_DBUF_STATE_NULL;
Expand Down
2 changes: 0 additions & 2 deletions src/transport/unicast/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ z_result_t _z_unicast_handle_transport_message(_z_transport_unicast_t *ztu, _z_t
_Z_INFO("Failed to decode defragmented message");
ret = _Z_ERR_MESSAGE_DESERIALIZATION_FAILED;
}
// Fragmented messages must be cleared. Non-fragmented messages are released with their transport.
_z_msg_clear(&zm);
// Free the decoding buffer
_z_zbuf_clear(&zbf);
*dbuf_state = _Z_DBUF_STATE_NULL;
Expand Down
12 changes: 12 additions & 0 deletions src/transport/unicast/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ static z_result_t _z_unicast_handshake_client(_z_transport_unicast_establish_par
return _Z_RES_OK;
}

// TODO: Activate if we add peer unicast support
#if 0
static z_result_t _z_unicast_handshake_listener(_z_transport_unicast_establish_param_t *param, const _z_link_t *zl,
const _z_id_t *local_zid, enum z_whatami_t whatami) {
// Read t message from link
Expand Down Expand Up @@ -293,6 +295,16 @@ static z_result_t _z_unicast_handshake_listener(_z_transport_unicast_establish_p
// Handshake finished
return _Z_RES_OK;
}
#else
static z_result_t _z_unicast_handshake_listener(_z_transport_unicast_establish_param_t *param, const _z_link_t *zl,
const _z_id_t *local_zid, enum z_whatami_t whatami) {
_ZP_UNUSED(param);
_ZP_UNUSED(zl);
_ZP_UNUSED(local_zid);
_ZP_UNUSED(whatami);
return _Z_ERR_TRANSPORT_OPEN_FAILED;
}
#endif

z_result_t _z_unicast_open_client(_z_transport_unicast_establish_param_t *param, const _z_link_t *zl,
const _z_id_t *local_zid) {
Expand Down
Loading