|
RMW desert 1.0
|
Public Member Functions | |
| DesertSubscriber (std::string topic_name, const rosidl_message_type_support_t *type_supports, rmw_gid_t gid) | |
| Create a subscriber. | |
| bool | has_data () |
| Check if there is available data for the registered topic. | |
| void | read_data (void *msg) |
| Read a publication from the publisher. | |
| rmw_gid_t | get_gid () |
| Retreive the gid of the current entity. | |
| std::string | get_topic_name () |
| Retreive the topic name of the current entity. | |
| std::string | get_type_name () |
| Retreive the message type of the current entity. | |
| DesertSubscriber::DesertSubscriber | ( | std::string | topic_name, |
| const rosidl_message_type_support_t * | type_supports, | ||
| rmw_gid_t | gid | ||
| ) |
Create a subscriber.
| topic_name | Name of the topic used for the registration |
| type_supports | Pointer to the message data structure coming from the ROS upper layers |
| gid | Global identifier of the entity |
| rmw_gid_t DesertSubscriber::get_gid | ( | ) |
Retreive the gid of the current entity.
This function returns the global identifier of the current entity in the rmw format.
| std::string DesertSubscriber::get_topic_name | ( | ) |
Retreive the topic name of the current entity.
This function returns a string containing the topic name of the current entity.
| std::string DesertSubscriber::get_type_name | ( | ) |
Retreive the message type of the current entity.
This function returns a string containing the message type name of the current entity.
| bool DesertSubscriber::has_data | ( | ) |
Check if there is available data for the registered topic.
The has_data function calls the interpret_packets method in RxStream and then verifies if in the map of subscriber packets there is a correspondence with the topic name of the current instance.
| void DesertSubscriber::read_data | ( | void * | msg | ) |
Read a publication from the publisher.
The read_data function interprets a transmission with the topic name present in the current instance deserializing the message using the method from the MessageSerialization namespace. A discrimination is made between C members and C++ members based on the type support.
| msg | Pointer to the memory location used to store the message |