|
AGX Dynamics
2.38.0.2
|
Subscriber class that enables receiving ROS2 messages. More...
#include <Subscriber.h>
Public Member Functions | |
| Subscriber (const std::string &topic, const QOS &qos=QOS(), int8_t inDomainId=0) | |
| Constructor for the Subscriber. More... | |
| ~Subscriber () | |
| bool | receiveMessage (TMsg &outMsg) const |
| Try to receive a message. More... | |
Subscriber class that enables receiving ROS2 messages.
Definition at line 44 of file var/agx-dependencies/agx_dependencies_240131_ubuntu_20.04_64/include/agx-nt-ros2/Subscriber.h.
| agxROS2::Subscriber< TMsg >::Subscriber | ( | const std::string & | topic, |
| const QOS & | qos = QOS(), |
||
| int8_t | inDomainId = 0 |
||
| ) |
Constructor for the Subscriber.
| topic | - the topic on which the Subscriber will receive messages. |
| qos | - Quality of Service (QOS) specifies behaviours such as message lifetime among other things. |
| inDomainId | - determines which DDS domain the Subscriber uses. Default for ROS2 is 0. |
| agxROS2::Subscriber< TMsg >::~Subscriber | ( | ) |
| bool agxROS2::Subscriber< TMsg >::receiveMessage | ( | TMsg & | outMsg | ) | const |
Try to receive a message.
This is a non-blocking function, i.e. it returns immediately if no new messages are avaiable.
| outMsg | - out parameter containing the received message if a receive was successful. |