chrono::ros::ChROSMessageView Class Reference
Description
A received, immutable ROS 2 message, addressed by field name.
Delivered to ChROSSubscriptionCallback::OnMessage(); valid only during the callback unless retained (handles share ownership of the payload buffer, so keeping a copy of the view object is safe and cheap).
#include <ChROSMessage.h>
Public Member Functions | |
| bool | GetBool (const std::string &path) const |
| Read a bool-typed field. | |
| int64_t | GetInt (const std::string &path) const |
| Read a signed-integer field. | |
| uint64_t | GetUInt (const std::string &path) const |
| Read an unsigned-integer field. | |
| double | GetDouble (const std::string &path) const |
| Read a floating-point field. | |
| std::string | GetString (const std::string &path) const |
| Read a string field. | |
| std::vector< std::string > | GetStringArray (const std::string &path) const |
| Read a string array/sequence field. | |
| core::BlobView | GetBlob (const std::string &path) const |
| Zero-copy view of a primitive array/sequence (camera pixels, lidar points, ...). More... | |
| std::vector< uint8_t > | CopyBlob (const std::string &path) const |
| Copying alternative (e.g. for retaining data past the callback). | |
| size_t | GetCount (const std::string &path) const |
| Element count of an array/sequence field. | |
| ChROSMessageView | GetMessage (const std::string &path, size_t index=0) const |
| View scoped to a nested message (singular field, or element 'index' of a message array/sequence). | |
| double | GetTimeSec (const std::string &path) const |
| Read a builtin_interfaces/Time-shaped field as seconds. | |
| std::string | DescribeType () const |
| Pretty-print the message type's full field layout. | |
Friends | |
| class | ChROSBridge |
Member Function Documentation
◆ GetBlob()
| core::BlobView chrono::ros::ChROSMessageView::GetBlob | ( | const std::string & | path | ) | const |
Zero-copy view of a primitive array/sequence (camera pixels, lidar points, ...).
The view is valid as long as this ChROSMessageView (or a copy of it) is alive.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_ros/ChROSMessage.h
- /builds/uwsbel/chrono/src/chrono_ros/ChROSMessage.cpp