Gazebo Transport

API Reference

12.2.2
gz/transport/CIface.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef INCLUDE_GZ_TRANSPORT_CIFACE_H_
19 #define INCLUDE_GZ_TRANSPORT_CIFACE_H_
20 
21 #include "gz/transport/Export.hh"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26  typedef struct SubscribeOpts
27  {
28  // cppcheck-suppress unusedStructMember
29  unsigned int msgsPerSec;
30  } SubscribeOpts;
31 
34 
35  // TODO(CH3): Deprecated. Remove!
36  #ifdef _WIN32
37  using IgnTransportNode = GzTransportNode;
38  #else
39  using IgnTransportNode GZ_DEPRECATED(12) = GzTransportNode;
40  #endif
41 
48  GzTransportNode GZ_TRANSPORT_VISIBLE *gzTransportNodeCreate(
49  const char *_partition);
50 
53  void GZ_TRANSPORT_VISIBLE
55 
61  int GZ_TRANSPORT_VISIBLE
63  const char *_topic,
64  const char *_msgType);
65 
66 
73  int GZ_TRANSPORT_VISIBLE
75  const char *_topic,
76  const void *_data,
77  const char *_msgType);
78 
85  int GZ_TRANSPORT_VISIBLE
87  const char *_topic,
88  void (*_callback)(const char *, size_t, const char *, void *),
89  void *_userData);
90 
98  int GZ_TRANSPORT_VISIBLE
100  const char *_topic, SubscribeOpts _opts,
101  void (*_callback)(const char *, size_t, const char *, void *),
102  void *_userData);
103 
110  int GZ_TRANSPORT_VISIBLE
111  gzTransportSubscribeNonConst(GzTransportNode *_node, char *_topic,
112  void (*_callback)(char *, size_t, char *, void *),
113  void *_userData);
114 
119  int GZ_TRANSPORT_VISIBLE
120  gzTransportUnsubscribe(GzTransportNode *_node, const char *_topic);
121 
125  void GZ_TRANSPORT_VISIBLE gzTransportWaitForShutdown();
126 
127  const auto GZ_DEPRECATED(12) ignTransportNodeCreate = gzTransportNodeCreate;
128  const auto GZ_DEPRECATED(12) ignTransportNodeDestroy = gzTransportNodeDestroy;
129  const auto GZ_DEPRECATED(12) ignTransportAdvertise = gzTransportAdvertise;
130  const auto GZ_DEPRECATED(12) ignTransportPublish = gzTransportPublish;
131  const auto GZ_DEPRECATED(12) ignTransportSubscribe = gzTransportSubscribe;
132  const auto GZ_DEPRECATED(12) ignTransportSubscribeOptions = gzTransportSubscribeOptions;
133  const auto GZ_DEPRECATED(12) ignTransportSubscribeNonConst = gzTransportSubscribeNonConst;
134  const auto GZ_DEPRECATED(12) ignTransportUnsubscribe = gzTransportUnsubscribe;
135  const auto GZ_DEPRECATED(12) ignTransportWaitForShutdown = gzTransportWaitForShutdown;
136 
137 #ifdef __cplusplus
138 }
139 #endif
140 
141 // INCLUDE_GZ_TRANSPORT_CIFACE_H_
142 #endif