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 
31 {
33  const char * node_name;
35  const char * node_namespace;
37  const char * topic_type;
41  uint8_t endpoint_gid[RMW_GID_STORAGE_SIZE];
45 
47 
55 
57 
92  rmw_topic_endpoint_info_t * topic_endpoint_info,
93  rcutils_allocator_t * allocator);
94 
96 
132 rmw_ret_t
134  rmw_topic_endpoint_info_t * topic_endpoint_info,
135  const char * topic_type,
136  rcutils_allocator_t * allocator);
137 
139 
175 rmw_ret_t
177  rmw_topic_endpoint_info_t * topic_endpoint_info,
178  const char * node_name,
179  rcutils_allocator_t * allocator);
180 
182 
218 rmw_ret_t
220  rmw_topic_endpoint_info_t * topic_endpoint_info,
221  const char * node_namespace,
222  rcutils_allocator_t * allocator);
223 
225 
252 rmw_ret_t
254  rmw_topic_endpoint_info_t * topic_endpoint_info,
255  rmw_endpoint_type_t type);
256 
258 
288 rmw_ret_t
290  rmw_topic_endpoint_info_t * topic_endpoint_info,
291  const uint8_t gid[],
292  size_t size);
293 
295 
323 rmw_ret_t
325  rmw_topic_endpoint_info_t * topic_endpoint_info,
326  const rmw_qos_profile_t * qos_profile);
327 
328 #ifdef __cplusplus
329 }
330 #endif
331 
332 #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:37
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:540
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 endpoint QoS profile in the given topic endpoint info data structure.
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:63
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 endpoint type in the given topic endpoint info data structure.
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 the given topic endpoint info data structure.
rmw_topic_endpoint_info_t::node_name
const char * node_name
Name of the node.
Definition: topic_endpoint_info.h:33
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 topic endpoint info data structure.
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 zero initialized topic endpoint info data structure.
allocator.h
rmw_topic_endpoint_info_t::endpoint_type
rmw_endpoint_type_t endpoint_type
The endpoint type.
Definition: topic_endpoint_info.h:39
RMW_GID_STORAGE_SIZE
#define RMW_GID_STORAGE_SIZE
Definition: types.h:41
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 the given topic endpoint info data structure.
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:43
visibility_control.h
rcutils_allocator_t
rmw_topic_endpoint_info_t
Definition: topic_endpoint_info.h:30
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 endpoint gid in the given topic endpoint info data structure.
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 the given topic endpoint info data structure.
rmw_qos_profile_t
ROS MiddleWare quality of service profile.
Definition: types.h:462
rmw_topic_endpoint_info_t::node_namespace
const char * node_namespace
Namespace of the node.
Definition: topic_endpoint_info.h:35