AGX Dynamics  2.38.0.2
var/agx-dependencies/agx_dependencies_240131_ubuntu_20.04_64/include/agx-nt-ros2/Subscriber.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2023. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx 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 
28 namespace 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 
38 namespace agxROS2
39 {
43  template <typename TMsg>
45  {
46  public:
53  Subscriber(const std::string& topic, const QOS& qos = QOS(), int8_t inDomainId = 0);
54  ~Subscriber();
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 
77 namespace 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
AGXNTROS2_EXPORT
#define AGXNTROS2_EXPORT
Definition: agx-nt-ros2_export.h:34
Qos.h
agx-nt-ros2_export.h
MessageTypes.h
agxROS2::QOS
Struct containing Quality of Service (QOS) settings.
Definition: var/agx-dependencies/agx_dependencies_240131_ubuntu_20.04_64/include/agx-nt-ros2/Qos.h:56
agx::init
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API.
agxROS2
Definition: agxROS2/export.h:46
agxROS2::Subscriber
Subscriber class that enables receiving ROS2 messages.
Definition: var/agx-dependencies/agx_dependencies_240131_ubuntu_20.04_64/include/agx-nt-ros2/Subscriber.h:44