|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
28 #ifndef YARP_ROSMSG_sensor_msgs_CompressedImage_h
29 #define YARP_ROSMSG_sensor_msgs_CompressedImage_h
47 std::vector<std::uint8_t>
data;
85 if (len > 0 && !connection.
expectBlock((
char*)&
data[0],
sizeof(std::uint8_t)*len)) {
116 for (
int i=0; i<len; i++) {
168 for (
size_t i=0; i<
data.size(); i++) {
189 static constexpr
const char*
typeName =
"sensor_msgs/CompressedImage";
192 static constexpr
const char*
typeChecksum =
"8f7a12909da2c9d3332d540a0977563f";
196 # This message contains a compressed image\n\
198 Header header # Header timestamp should be acquisition time of image\n\
199 # Header frame_id should be optical frame of camera\n\
200 # origin of frame should be optical center of cameara\n\
201 # +x should point to the right in the image\n\
202 # +y should point down in the image\n\
203 # +z should point into to plane of the image\n\
205 string format # Specifies the format of the data\n\
206 # Acceptable values:\n\
208 uint8[] data # Compressed image buffer\n\
210 ================================================================================\n\
211 MSG: std_msgs/Header\n\
212 # Standard metadata for higher-level stamped data types.\n\
213 # This is generally used to communicate timestamped data \n\
214 # in a particular coordinate frame.\n\
216 # sequence ID: consecutively increasing ID \n\
218 #Two-integer timestamp that is expressed as:\n\
219 # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
220 # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
221 # time-handling sugar is provided by the client library\n\
223 #Frame this data is associated with\n\
242 #endif // YARP_ROSMSG_sensor_msgs_CompressedImage_h
static constexpr const char * typeName
bool readString(std::string &str, bool *is_vocab=nullptr)
bool readBare(yarp::os::ConnectionReader &connection) override
virtual bool read(yarp::os::idl::WireReader &reader)
virtual void appendInt8(std::int8_t data)=0
Send a representation of a 8-bit integer to the network connection.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
#define BOTTLE_TAG_STRING
yarp::os::idl::BareStyle< yarp::rosmsg::sensor_msgs::CompressedImage > rosStyle
yarp::rosmsg::std_msgs::Header header
std::vector< std::uint8_t > data
bool writeBare(yarp::os::ConnectionWriter &connection) const override
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
virtual std::int8_t expectInt8()=0
Read a 8-bit integer from the network connection.
yarp::os::Type getType() const override
yarp::os::idl::BottleStyle< yarp::rosmsg::sensor_msgs::CompressedImage > bottleStyle
virtual bool isError() const =0
static Type byName(const char *name)
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
Type & addProperty(const char *key, const Value &val)
An interface for writing to a network connection.
virtual bool isError() const =0
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
bool writeBottle(yarp::os::ConnectionWriter &connection) const override
static constexpr const char * typeChecksum
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
virtual void appendInt32(std::int32_t data)=0
Send a representation of a 32-bit integer to the network connection.
IDL-friendly connection reader.
An interface for reading from a network connection.
static constexpr const char * typeText
The main, catch-all namespace for YARP.
virtual void appendExternalBlock(const char *data, size_t len)=0
Send a block of data to the network connection, without making a copy.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
A single value (typically within a Bottle).
bool readBottle(yarp::os::ConnectionReader &connection) override
virtual bool write(const yarp::os::idl::WireWriter &writer) const