Represents ensemble of (to be constructed) ROS messages, to be handled at once by this class.
More...
#include <callback_handlers.hpp>
|
| | CallbackHandlers ()=default |
| |
| void | handle (RxMessage &rx_message) |
| | Ćalled every time rx_message is found to contain some potentially useful message. More...
|
| |
| template<typename T > |
| CallbackMap | insert (std::string message_key) |
| | Adds a pair to the multimap "callbackmap_", with the message_key being the key. More...
|
| |
| void | readCallback (const uint8_t *data, std::size_t &size) |
| | Searches for Rx messages that could potentially be decoded/parsed/published. More...
|
| |
|
| typedef std::map< std::string, uint32_t > | DiagnosticArrayMap |
| |
| typedef std::map< std::string, uint32_t > | GPSFixMap |
| | Shorthand for the map responsible for matching ROS message identifiers relevant for GPSFix to a uint32_t. More...
|
| |
| typedef std::map< std::string, uint32_t > | NavSatFixMap |
| | Shorthand for the map responsible for matching ROS message identifiers relevant for NavSatFix to a uint32_t. More...
|
| |
| typedef std::map< std::string, uint32_t > | PoseWithCovarianceStampedMap |
| |
Represents ensemble of (to be constructed) ROS messages, to be handled at once by this class.
Definition at line 207 of file callback_handlers.hpp.
◆ CallbackMap
Key is std::string and represents the ROS message key, value is boost::shared_ptr<CallbackHandler>
Definition at line 213 of file callback_handlers.hpp.
◆ DiagnosticArrayMap
Shorthand for the map responsible for matching ROS message identifiers relevant for DiagnosticArray to a uint32_t
Definition at line 307 of file callback_handlers.hpp.
◆ GPSFixMap
Shorthand for the map responsible for matching ROS message identifiers relevant for GPSFix to a uint32_t.
Definition at line 284 of file callback_handlers.hpp.
◆ NavSatFixMap
Shorthand for the map responsible for matching ROS message identifiers relevant for NavSatFix to a uint32_t.
Definition at line 291 of file callback_handlers.hpp.
◆ PoseWithCovarianceStampedMap
Shorthand for the map responsible for matching ROS message identifiers relevant for PoseWithCovarianceStamped to a uint32_t
Definition at line 299 of file callback_handlers.hpp.
◆ CallbackHandlers()
| io_comm_rx::CallbackHandlers::CallbackHandlers |
( |
| ) |
|
|
default |
◆ handle()
| void io_comm_rx::CallbackHandlers::handle |
( |
RxMessage & |
rx_message | ) |
|
Ćalled every time rx_message is found to contain some potentially useful message.
- Parameters
-
| rx_message | The for loop forwards to a ROS message specific handle if the latter was added via callbackmap_.insert at some earlier point. |
Definition at line 90 of file callback_handlers.cpp.
◆ insert()
template<typename T >
| CallbackMap io_comm_rx::CallbackHandlers::insert |
( |
std::string |
message_key | ) |
|
|
inline |
Adds a pair to the multimap "callbackmap_", with the message_key being the key.
This method is called by "handlers_" in rosaic_node.cpp. T would be a (custom or not) ROS message, e.g. rosaic::PVTGeodetic, or nmea_msgs::GPGGA. Note that "typename" could be omitted in the argument.
- Parameters
-
| message_key | The pair's key |
| callback | The key's counterpart |
- Returns
- The modified multimap "callbackmap_"
Definition at line 228 of file callback_handlers.hpp.
◆ readCallback()
| void io_comm_rx::CallbackHandlers::readCallback |
( |
const uint8_t * |
data, |
|
|
std::size_t & |
size |
|
) |
| |
Searches for Rx messages that could potentially be decoded/parsed/published.
- Parameters
-
| [in] | data | Buffer passed on from AsyncManager class |
| [in] | size | Size of the buffer |
Definition at line 269 of file callback_handlers.cpp.
◆ callback_mutex_
| boost::mutex io_comm_rx::CallbackHandlers::callback_mutex_ |
|
staticprivate |
The "static" keyword resolves construct-by-copying issues related to this mutex by making it available throughout the code unit. The mutex constructor list contains "mutex
(const mutex&) = delete", hence construct-by-copying a mutex is explicitly prohibited. The get_handlers() method of the Comm_IO class hence forces us to make this mutex static.
Definition at line 265 of file callback_handlers.hpp.
◆ callbackmap_
Callback handlers multimap for Rx messages; it needs to be public since we copy-assign (did not work otherwise) new callbackmap_, after inserting a pair to the multimap within the DefineMessages() method of the ROSaicNode class, onto its old version.
Definition at line 257 of file callback_handlers.hpp.
◆ diagnosticarray_map
◆ do_diagnostics_
| std::string io_comm_rx::CallbackHandlers::do_diagnostics_ = "4014" |
|
staticprivate |
Determines which of the SBF blocks necessary for the diagnostic_msgs/DiagnosticArray ROS message arrives last and thus launches its construction
Definition at line 281 of file callback_handlers.hpp.
◆ do_gpsfix_
| std::string io_comm_rx::CallbackHandlers::do_gpsfix_ = "4007" |
|
staticprivate |
Determines which of the SBF blocks necessary for the gps_common::GPSFix ROS message arrives last and thus launches its construction
Definition at line 269 of file callback_handlers.hpp.
◆ do_navsatfix_
| std::string io_comm_rx::CallbackHandlers::do_navsatfix_ = "4007" |
|
staticprivate |
Determines which of the SBF blocks necessary for the sensor_msgs::NavSatFix ROS message arrives last and thus launches its construction
Definition at line 273 of file callback_handlers.hpp.
◆ do_pose_
| std::string io_comm_rx::CallbackHandlers::do_pose_ = "4007" |
|
staticprivate |
Determines which of the SBF blocks necessary for the geometry_msgs/PoseWithCovarianceStamped ROS message arrives last and thus launches its construction
Definition at line 277 of file callback_handlers.hpp.
◆ gpsfix_map
◆ navsatfix_map
◆ pose_map
The documentation for this class was generated from the following files: