18#ifndef YARP_ROSMSG_std_msgs_Int32MultiArray_h
19#define YARP_ROSMSG_std_msgs_Int32MultiArray_h
36 std::vector<std::int32_t>
data;
63 if (len > 0 && !connection.
expectBlock((
char*)&
data[0],
sizeof(std::int32_t)*len)) {
89 for (
int i=0; i<len; i++) {
132 for (
size_t i=0; i<
data.size(); i++) {
153 static constexpr const char*
typeName =
"std_msgs/Int32MultiArray";
156 static constexpr const char*
typeChecksum =
"1d99f79f8b325b44fee908053e9c945b";
160# Please look at the MultiArrayLayout message definition for\n\
161# documentation on all multiarrays.\n\
163MultiArrayLayout layout # specification of data layout\n\
164int32[] data # array of data\n\
167================================================================================\n\
168MSG: std_msgs/MultiArrayLayout\n\
169# The multiarray declares a generic multi-dimensional array of a\n\
170# particular data type. Dimensions are ordered from outer most\n\
173MultiArrayDimension[] dim # Array of dimension properties\n\
174uint32 data_offset # padding elements at front of data\n\
176# Accessors should ALWAYS be written in terms of dimension stride\n\
177# and specified outer-most dimension first.\n\
179# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]\n\
181# A standard, 3-channel 640x480 image with interleaved color channels\n\
182# would be specified as:\n\
184# dim[0].label = \"height\"\n\
185# dim[0].size = 480\n\
186# dim[0].stride = 3*640*480 = 921600 (note dim[0] stride is just size of image)\n\
187# dim[1].label = \"width\"\n\
188# dim[1].size = 640\n\
189# dim[1].stride = 3*640 = 1920\n\
190# dim[2].label = \"channel\"\n\
192# dim[2].stride = 3\n\
194# multiarray(i,j,k) refers to the ith row, jth column, and kth channel.\n\
196================================================================================\n\
197MSG: std_msgs/MultiArrayDimension\n\
198string label # label of given dimension\n\
199uint32 size # size of given dimension (in type units)\n\
200uint32 stride # stride of given dimension\n\
An interface for reading from a network connection.
virtual bool expectBlock(char *data, size_t len)=0
Read a block of data from the network connection.
virtual bool isBareMode() const =0
Check if the connection is bare mode.
virtual std::int32_t expectInt32()=0
Read a 32-bit integer from the network connection.
virtual bool convertTextMode()=0
Reads in a standard description in text mode, and converts it to a standard description in binary.
virtual bool isError() const =0
An interface for writing to a network connection.
virtual bool isError() const =0
virtual bool isBareMode() const =0
Check if the connection is bare mode.
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 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.
static Type byName(const char *name)
Type & addProperty(const char *key, const Value &val)
A single value (typically within a Bottle).
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
virtual bool read(yarp::os::idl::WireReader &reader)
virtual bool write(const yarp::os::idl::WireWriter &writer) const
IDL-friendly connection reader.
static constexpr const char * typeText
yarp::rosmsg::std_msgs::MultiArrayLayout layout
yarp::os::idl::BottleStyle< yarp::rosmsg::std_msgs::Int32MultiArray > bottleStyle
bool readBare(yarp::os::ConnectionReader &connection) override
bool readBottle(yarp::os::ConnectionReader &connection) override
std::vector< std::int32_t > data
bool writeBottle(yarp::os::ConnectionWriter &connection) const override
yarp::os::idl::BareStyle< yarp::rosmsg::std_msgs::Int32MultiArray > rosStyle
bool writeBare(yarp::os::ConnectionWriter &connection) const override
yarp::os::Type getType() const override
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
static constexpr const char * typeChecksum
static constexpr const char * typeName
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
The main, catch-all namespace for YARP.