AGX Dynamics 2.40.0.0
Loading...
Searching...
No Matches
dependencies/agx_dependencies_250712_0.17.10_Windows_64_VS2022/include/agx-nt-ros2/Subscriber.h
Go to the documentation of this file.
1/*
2Copyright 2007-2023. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19// AGX Networking Toolbox includes.
22#include "agx-nt-ros2/Qos.h"
23
24// Standard library includes.
25#include <memory>
26#include <string>
27
28namespace agxROS2
29{
30 struct DdsSubscriberTypes;
31}
32
33#ifdef _MSC_VER
34# pragma warning(push)
35# pragma warning(disable: 4251) // Disable warnings about members needing dll interface.
36#endif
37
38namespace agxROS2
39{
43 template <typename TMsg>
45 {
46 public:
53 Subscriber(const std::string& topic, const QOS& qos = QOS(), int8_t inDomainId = 0);
55
62 bool receiveMessage(TMsg& outMsg) const;
63
64 private:
65 void init(const std::string& topic, const QOS& qos);
66 std::unique_ptr<DdsSubscriberTypes> ddsTypes;
67 std::string typeName;
68 int8_t domainId{ 0 };
69 };
70}
71
72
73//
74// Predefined publisher types.
75//
76
77namespace agxROS2
78{
79 namespace agxMsgs
80 {
83 }
84
85 namespace builtinInterfaces
86 {
89 }
90
91 namespace rosgraphMsgs
92 {
94 }
95
96 namespace stdMsgs
97 {
126 }
127
128 namespace geometryMsgs
129 {
159 }
160
161 namespace sensorMsgs
162 {
190 }
191}
192
193#ifdef _MSC_VER
194# pragma warning(pop)
195#endif
#define AGXNTROS2_EXPORT
Subscriber(const std::string &topic, const QOS &qos=QOS(), int8_t inDomainId=0)
Constructor for the Subscriber.
bool receiveMessage(TMsg &outMsg) const
Try to receive a message.