ros2_control - galactic
Loading...
Searching...
No Matches
zenoh_transport.h
1// Copyright 2026 Open Source Robotics Foundation, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef ZENBEDDED_TRANSPORT__ZENOH_TRANSPORT_H_
16#define ZENBEDDED_TRANSPORT__ZENOH_TRANSPORT_H_
17
18#include <stddef.h>
19#include <stdint.h>
20
21#ifdef __cplusplus
22extern "C"
23{
24#endif
25
26#if defined(CONFIG_ZENBEDDED_ZENOH_LOCATOR)
27#define ZENBEDDED_DEFAULT_LOCATOR CONFIG_ZENBEDDED_ZENOH_LOCATOR
28#else
29#define ZENBEDDED_DEFAULT_LOCATOR "127.0.0.1:7447"
30#endif
31
48 int zenbedded_transport_init(
49 uint32_t domain_id, const char * node_name, const char * mode, const char * locator);
50
60 void zenbedded_transport_destroy(void);
61
62 typedef struct zenbedded_pub_s * zenbedded_pub_t;
63 typedef struct zenbedded_sub_s * zenbedded_sub_t;
64
72 zenbedded_pub_t zenbedded_transport_declare_publisher(
73 const char * topic_name, const char * type_name);
74
83 int zenbedded_transport_publish(
84 zenbedded_pub_t pub, const uint8_t * payload, size_t payload_size);
85
89 typedef void (*zenbedded_recv_cb_t)(const uint8_t * payload, size_t size, void * user_data);
90
100 zenbedded_sub_t zenbedded_transport_declare_subscriber(
101 const char * topic_name, const char * type_name, zenbedded_recv_cb_t callback,
102 void * user_data);
103
110 int zenbedded_transport_undeclare_publisher(zenbedded_pub_t pub);
111
118 int zenbedded_transport_undeclare_subscriber(zenbedded_sub_t sub);
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif // ZENBEDDED_TRANSPORT__ZENOH_TRANSPORT_H_
Definition zenoh_transport.c:94
Definition zenoh_transport.c:106