Ignition Transport

API Reference

7.1.0
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_IGNITION_TRANSPORT_CIFACE_H_
19 #define INCLUDE_IGNITION_TRANSPORT_CIFACE_H_
20 
21 #include "ignition/transport/Export.hh"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26  typedef struct IgnTransportNode IgnTransportNode;
28 
35  IgnTransportNode IGNITION_TRANSPORT_VISIBLE *ignTransportNodeCreate(
36  const char *_partition);
37 
40  void IGNITION_TRANSPORT_VISIBLE
42 
48  int IGNITION_TRANSPORT_VISIBLE
50  const char *_topic,
51  const char *_msgType);
52 
53 
60  int IGNITION_TRANSPORT_VISIBLE
62  const char *_topic,
63  const void *_data,
64  const char *_msgType);
65 
72  int IGNITION_TRANSPORT_VISIBLE
74  const char *_topic,
75  void (*_callback)(const char *, size_t, const char *, void *),
76  void *_userData);
77 
84  int IGNITION_TRANSPORT_VISIBLE
86  void (*_callback)(char *, size_t, char *, void *),
87  void *_userData);
88 
93  int IGNITION_TRANSPORT_VISIBLE
94  ignTransportUnsubscribe(IgnTransportNode *_node, const char *_topic);
95 
99  void IGNITION_TRANSPORT_VISIBLE ignTransportWaitForShutdown();
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 // INCLUDE_IGNITION_TRANSPORT_CIFACE_H_
106 #endif
void IGNITION_TRANSPORT_VISIBLE ignTransportNodeDestroy(IgnTransportNode **_node)
Destroy a transport node.
int IGNITION_TRANSPORT_VISIBLE ignTransportSubscribeNonConst(IgnTransportNode *_node, char *_topic, void(*_callback)(char *, size_t, char *, void *), void *_userData)
Subscribe to a topic, and register a callback.
int IGNITION_TRANSPORT_VISIBLE ignTransportUnsubscribe(IgnTransportNode *_node, const char *_topic)
Unsubscribe from a topic.
int IGNITION_TRANSPORT_VISIBLE ignTransportAdvertise(IgnTransportNode *_node, const char *_topic, const char *_msgType)
Advertise a topic.
void IGNITION_TRANSPORT_VISIBLE ignTransportWaitForShutdown()
Block the current thread until a SIGINT or SIGTERM is received. Note that this function registers a s...
struct IgnTransportNode IgnTransportNode
A transport node.
Definition: CIface.h:27
int IGNITION_TRANSPORT_VISIBLE ignTransportPublish(IgnTransportNode *_node, const char *_topic, const void *_data, const char *_msgType)
Publishes a message on a topic.
IgnTransportNode IGNITION_TRANSPORT_VISIBLE * ignTransportNodeCreate(const char *_partition)
Create a transport node.
int IGNITION_TRANSPORT_VISIBLE ignTransportSubscribe(IgnTransportNode *_node, const char *_topic, void(*_callback)(const char *, size_t, const char *, void *), void *_userData)
Subscribe to a topic, and register a callback.