-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d86ad8d
commit e420029
Showing
46 changed files
with
1,540 additions
and
896 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_JOIN_H | ||
#define ZENOH_PICO_TRANSPORT_JOIN_H | ||
|
||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _z_send_join(_z_transport_t *zt); | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_JOIN_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_LEASE_H | ||
#define ZENOH_PICO_TRANSPORT_LEASE_H | ||
|
||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _z_send_keep_alive(_z_transport_t *zt); | ||
void *_zp_lease_task(void *zt_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_LEASE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_READ_H | ||
#define ZENOH_PICO_TRANSPORT_READ_H | ||
|
||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _z_read(_z_transport_t *zt); | ||
void *_zp_read_task(void *zt_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_READ_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_RX_H | ||
#define ZENOH_PICO_TRANSPORT_RX_H | ||
|
||
#include "zenoh-pico/link/link.h" | ||
#include "zenoh-pico/transport/transport.h" | ||
|
||
/*------------------ Transmission and Reception helpers ------------------*/ | ||
int8_t _z_link_recv_t_msg(_z_transport_message_t *t_msg, const _z_link_t *zl); | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_RX_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,8 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_LINK_TX_H | ||
#define ZENOH_PICO_TRANSPORT_LINK_TX_H | ||
#ifndef ZENOH_PICO_TRANSPORT_TX_H | ||
#define ZENOH_PICO_TRANSPORT_TX_H | ||
|
||
#include "zenoh-pico/link/link.h" | ||
#include "zenoh-pico/net/session.h" | ||
|
@@ -26,20 +26,7 @@ void __unsafe_z_finalize_wbuf(_z_wbuf_t *buf, _Bool is_streamed); | |
int8_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 ------------------*/ | ||
int8_t _z_unicast_send_z_msg(_z_session_t *zn, _z_zenoh_message_t *z_msg, z_reliability_t reliability, | ||
z_congestion_control_t cong_ctrl); | ||
int8_t _z_multicast_send_z_msg(_z_session_t *zn, _z_zenoh_message_t *z_msg, z_reliability_t reliability, | ||
z_congestion_control_t cong_ctrl); | ||
|
||
int8_t _z_unicast_send_n_msg(_z_session_t *zn, const _z_network_message_t *z_msg, z_reliability_t reliability, | ||
z_congestion_control_t cong_ctrl); | ||
int8_t _z_multicast_send_n_msg(_z_session_t *zn, const _z_network_message_t *z_msg, z_reliability_t reliability, | ||
z_congestion_control_t cong_ctrl); | ||
|
||
int8_t _z_send_t_msg(_z_transport_t *zt, const _z_transport_message_t *t_msg); | ||
int8_t _z_unicast_send_t_msg(_z_transport_unicast_t *ztu, const _z_transport_message_t *t_msg); | ||
int8_t _z_multicast_send_t_msg(_z_transport_multicast_t *ztm, const _z_transport_message_t *t_msg); | ||
|
||
int8_t _z_link_send_t_msg(const _z_link_t *zl, const _z_transport_message_t *t_msg); | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_LINK_TX_H */ | ||
#endif /* ZENOH_PICO_TRANSPORT_TX_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_MULTICAST_H | ||
#define ZENOH_PICO_MULTICAST_H | ||
|
||
#include "zenoh-pico/api/types.h" | ||
|
||
void _zp_multicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback); | ||
void _zp_multicast_info_session(const _z_transport_t *zt, _z_config_t *ps); | ||
|
||
#endif /* ZENOH_PICO_MULTICAST_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,11 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_LINK_TASK_JOIN_H | ||
#define ZENOH_PICO_TRANSPORT_LINK_TASK_JOIN_H | ||
#ifndef ZENOH_MULTICAST_JOIN_H | ||
#define ZENOH_MULTICAST_JOIN_H | ||
|
||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _z_send_join(_z_transport_t *zt); | ||
int8_t _zp_multicast_send_join(_z_transport_multicast_t *ztm); | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_LINK_TASK_JOIN_H */ | ||
#endif /* ZENOH_MULTICAST_JOIN_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,17 +12,14 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_LINK_TASK_LEASE_H | ||
#define ZENOH_PICO_TRANSPORT_LINK_TASK_LEASE_H | ||
#ifndef ZENOH_PICO_MULTICAST_LEASE_H | ||
#define ZENOH_PICO_MULTICAST_LEASE_H | ||
|
||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _z_send_keep_alive(_z_transport_t *zt); | ||
int8_t _zp_unicast_send_keep_alive(_z_transport_unicast_t *ztu); | ||
int8_t _zp_multicast_send_keep_alive(_z_transport_multicast_t *ztm); | ||
|
||
void *_zp_lease_task(void *zt_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
void *_zp_unicast_lease_task(void *ztu_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
int8_t _zp_multicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task); | ||
int8_t _zp_multicast_stop_lease_task(_z_transport_t *zt); | ||
void *_zp_multicast_lease_task(void *ztm_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_LINK_TASK_LEASE_H */ | ||
#endif /* ZENOH_PICO_MULTICAST_LEASE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,17 +12,14 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_LINK_TASK_READ_H | ||
#define ZENOH_PICO_TRANSPORT_LINK_TASK_READ_H | ||
#ifndef ZENOH_PICO_MULTICAST_READ_H | ||
#define ZENOH_PICO_MULTICAST_READ_H | ||
|
||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _z_read(_z_transport_t *zt); | ||
int8_t _zp_unicast_read(_z_transport_unicast_t *ztu); | ||
int8_t _zp_multicast_read(_z_transport_multicast_t *ztm); | ||
|
||
void *_zp_read_task(void *zt_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
void *_zp_unicast_read_task(void *ztu_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
int8_t _zp_multicast_start_read_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task); | ||
int8_t _zp_multicast_stop_read_task(_z_transport_t *zt); | ||
void *_zp_multicast_read_task(void *ztm_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_LINK_TASK_READ_H */ | ||
#endif /* ZENOH_PICO_TRANSPORT_LINK_TASK_READ_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,23 +12,14 @@ | |
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_TRANSPORT_LINK_RX_H | ||
#define ZENOH_PICO_TRANSPORT_LINK_RX_H | ||
#ifndef ZENOH_PICO_MULTICAST_RX_H | ||
#define ZENOH_PICO_MULTICAST_RX_H | ||
|
||
#include "zenoh-pico/link/link.h" | ||
#include "zenoh-pico/transport/transport.h" | ||
|
||
/*------------------ Transmission and Reception helpers ------------------*/ | ||
int8_t _z_unicast_recv_t_msg(_z_transport_unicast_t *ztu, _z_transport_message_t *t_msg); | ||
int8_t _z_multicast_recv_t_msg(_z_transport_multicast_t *ztm, _z_transport_message_t *t_msg, _z_bytes_t *addr); | ||
|
||
int8_t _z_link_recv_t_msg(_z_transport_message_t *t_msg, const _z_link_t *zl); | ||
|
||
int8_t _z_unicast_recv_t_msg_na(_z_transport_unicast_t *ztu, _z_transport_message_t *t_msg); | ||
int8_t _z_multicast_recv_t_msg_na(_z_transport_multicast_t *ztm, _z_transport_message_t *t_msg, _z_bytes_t *addr); | ||
|
||
int8_t _z_unicast_handle_transport_message(_z_transport_unicast_t *ztu, _z_transport_message_t *t_msg); | ||
int8_t _z_multicast_handle_transport_message(_z_transport_multicast_t *ztm, _z_transport_message_t *t_msg, | ||
_z_bytes_t *addr); | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_LINK_RX_H */ | ||
#endif /* ZENOH_PICO_TRANSPORT_LINK_RX_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_MULTICAST_TRANSPORT_H | ||
#define ZENOH_PICO_MULTICAST_TRANSPORT_H | ||
|
||
#include "zenoh-pico/api/types.h" | ||
|
||
int8_t _z_multicast_transport_create(_z_transport_t *zt, _z_link_t *zl, | ||
_z_transport_multicast_establish_param_t *param); | ||
int8_t _z_multicast_open_peer(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, | ||
const _z_id_t *local_zid); | ||
int8_t _z_multicast_open_client(_z_transport_multicast_establish_param_t *param, const _z_link_t *zl, | ||
const _z_id_t *local_zid); | ||
int8_t _z_multicast_send_close(_z_transport_multicast_t *ztm, uint8_t reason, _Bool link_only); | ||
int8_t _z_multicast_transport_close(_z_transport_multicast_t *ztm, uint8_t reason); | ||
void _z_multicast_transport_clear(_z_transport_t *zt); | ||
#endif /* ZENOH_PICO_MULTICAST_TRANSPORT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_MULTICAST_TX_H | ||
#define ZENOH_PICO_MULTICAST_TX_H | ||
|
||
#include "zenoh-pico/net/session.h" | ||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _z_multicast_send_z_msg(_z_session_t *zn, _z_zenoh_message_t *z_msg, z_reliability_t reliability, | ||
z_congestion_control_t cong_ctrl); | ||
int8_t _z_multicast_send_n_msg(_z_session_t *zn, const _z_network_message_t *z_msg, z_reliability_t reliability, | ||
z_congestion_control_t cong_ctrl); | ||
int8_t _z_multicast_send_t_msg(_z_transport_multicast_t *ztm, const _z_transport_message_t *t_msg); | ||
|
||
#endif /* ZENOH_PICO_MULTICAST_TX_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_UNICAST_H | ||
#define ZENOH_PICO_UNICAST_H | ||
|
||
#include "zenoh-pico/api/types.h" | ||
|
||
void _zp_unicast_fetch_zid(const _z_transport_t *zt, z_owned_closure_zid_t *callback); | ||
void _zp_unicast_info_session(const _z_transport_t *zt, _z_config_t *ps); | ||
|
||
#endif /* ZENOH_PICO_UNICAST_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// Copyright (c) 2022 ZettaScale Technology | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License 2.0 which is available at | ||
// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// | ||
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
|
||
#ifndef ZENOH_PICO_UNICAST_LEASE_H | ||
#define ZENOH_PICO_UNICAST_LEASE_H | ||
|
||
#include "zenoh-pico/transport/transport.h" | ||
|
||
int8_t _zp_unicast_send_keep_alive(_z_transport_unicast_t *ztu); | ||
int8_t _zp_unicast_start_lease_task(_z_transport_t *zt, _z_task_attr_t *attr, _z_task_t *task); | ||
int8_t _zp_unicast_stop_lease_task(_z_transport_t *zt); | ||
void *_zp_unicast_lease_task(void *ztu_arg); // The argument is void* to avoid incompatible pointer types in tasks | ||
|
||
#endif /* ZENOH_PICO_TRANSPORT_LINK_TASK_LEASE_H */ |
Oops, something went wrong.