rmw  master
C API providing a middleware abstraction layer which is used to implement the rest of ROS.
topic_endpoint_info.h
Go to the documentation of this file.
1 // Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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 RMW__TOPIC_ENDPOINT_INFO_H_
16 #define RMW__TOPIC_ENDPOINT_INFO_H_
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include "rcutils/allocator.h"
24 #include "rmw/types.h"
25 #include "rmw/visibility_control.h"
26 
30 {
32  const char * node_name;
34  const char * node_namespace;
36  const char * topic_type;
40  uint8_t endpoint_gid[RMW_GID_STORAGE_SIZE];
44 
50 
52 
70  rmw_topic_endpoint_info_t * topic_endpoint_info,
71  rcutils_allocator_t * allocator);
72 
74 
91  rmw_topic_endpoint_info_t * topic_endpoint_info,
92  const char * topic_type,
93  rcutils_allocator_t * allocator);
94 
96 
111 rmw_ret_t
113  rmw_topic_endpoint_info_t * topic_endpoint_info,
114  const char * node_name,
115  rcutils_allocator_t * allocator);
116 
118 
133 rmw_ret_t
135  rmw_topic_endpoint_info_t * topic_endpoint_info,
136  const char * node_namespace,
137  rcutils_allocator_t * allocator);
138 
140 
155 rmw_ret_t
157  rmw_topic_endpoint_info_t * topic_endpoint_info,
158  rmw_endpoint_type_t type);
159 
161 
176 rmw_ret_t
178  rmw_topic_endpoint_info_t * topic_endpoint_info,
179  const uint8_t gid[],
180  size_t size);
181 
183 
197 rmw_ret_t
199  rmw_topic_endpoint_info_t * topic_endpoint_info,
200  const rmw_qos_profile_t * qos_profile);
201 
202 #ifdef __cplusplus
203 }
204 #endif
205 
206 #endif // RMW__TOPIC_ENDPOINT_INFO_H_
rmw_topic_endpoint_info_t::topic_type
const char * topic_type
The associated topic type.
Definition: topic_endpoint_info.h:36
RMW_PUBLIC
#define RMW_PUBLIC
Definition: visibility_control.h:48
types.h
RMW_PUBLIC_TYPE
RMW_PUBLIC_TYPE
Type mapping of rcutils log severity types to rmw specific types.
Definition: types.h:499
rmw_topic_endpoint_info_set_qos_profile
rmw_ret_t rmw_topic_endpoint_info_set_qos_profile(rmw_topic_endpoint_info_t *topic_endpoint_info, const rmw_qos_profile_t *qos_profile)
Set the qos_profile in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_t
struct RMW_PUBLIC_TYPE rmw_topic_endpoint_info_t rmw_topic_endpoint_info_t
rmw_endpoint_type_t
enum RMW_PUBLIC_TYPE rmw_endpoint_type_t rmw_endpoint_type_t
Endpoint enumeration type.
Definition: types.h:61
rmw_topic_endpoint_info_set_endpoint_type
rmw_ret_t rmw_topic_endpoint_info_set_endpoint_type(rmw_topic_endpoint_info_t *topic_endpoint_info, rmw_endpoint_type_t type)
Set the gid in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_set_node_name
rmw_ret_t rmw_topic_endpoint_info_set_node_name(rmw_topic_endpoint_info_t *topic_endpoint_info, const char *node_name, rcutils_allocator_t *allocator)
Set the node_name in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_t::node_name
const char * node_name
Name of the node.
Definition: topic_endpoint_info.h:32
rmw_topic_endpoint_info_fini
rmw_ret_t rmw_topic_endpoint_info_fini(rmw_topic_endpoint_info_t *topic_endpoint_info, rcutils_allocator_t *allocator)
Finalize a rmw_topic_endpoint_info_t object.
RMW_WARN_UNUSED
#define RMW_WARN_UNUSED
Indicate that a variable is not used, and prevent compiler from issuing warnings.
Definition: macros.h:24
rmw_get_zero_initialized_topic_endpoint_info
rmw_topic_endpoint_info_t rmw_get_zero_initialized_topic_endpoint_info(void)
Return a rmw_topic_endpoint_info_t struct with members initialized to NULL.
allocator.h
rmw_topic_endpoint_info_t::endpoint_type
rmw_endpoint_type_t endpoint_type
The endpoint type.
Definition: topic_endpoint_info.h:38
RMW_GID_STORAGE_SIZE
#define RMW_GID_STORAGE_SIZE
Definition: types.h:39
rmw_topic_endpoint_info_set_topic_type
rmw_ret_t rmw_topic_endpoint_info_set_topic_type(rmw_topic_endpoint_info_t *topic_endpoint_info, const char *topic_type, rcutils_allocator_t *allocator)
Set the topic_type in rmw_topic_endpoint_info_t.
rmw_ret_t
int32_t rmw_ret_t
Return code for rmw functions.
Definition: ret_types.h:26
rmw_topic_endpoint_info_t::qos_profile
rmw_qos_profile_t qos_profile
QoS profile of the endpoint.
Definition: topic_endpoint_info.h:42
visibility_control.h
rcutils_allocator_t
rmw_topic_endpoint_info_t
Definition: topic_endpoint_info.h:29
rmw_topic_endpoint_info_set_gid
rmw_ret_t rmw_topic_endpoint_info_set_gid(rmw_topic_endpoint_info_t *topic_endpoint_info, const uint8_t gid[], size_t size)
Set the gid in rmw_topic_endpoint_info_t.
rmw_topic_endpoint_info_set_node_namespace
rmw_ret_t rmw_topic_endpoint_info_set_node_namespace(rmw_topic_endpoint_info_t *topic_endpoint_info, const char *node_namespace, rcutils_allocator_t *allocator)
Set the node_namespace in rmw_topic_endpoint_info_t.
rmw_qos_profile_t
ROS MiddleWare quality of service profile.
Definition: types.h:436
rmw_topic_endpoint_info_t::node_namespace
const char * node_namespace
Namespace of the node.
Definition: topic_endpoint_info.h:34