|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
19 #ifndef YARP_ROSMSG_sensor_msgs_Joy_h
20 #define YARP_ROSMSG_sensor_msgs_Joy_h
37 std::vector<yarp::conf::float32_t>
axes;
76 if (len > 0 && !connection.
expectBlock((
char*)&
buttons[0],
sizeof(std::int32_t)*len)) {
102 for (
int i=0; i<len; i++) {
112 for (
int i=0; i<len; i++) {
161 for (
size_t i=0; i<
axes.size(); i++) {
168 for (
size_t i=0; i<
buttons.size(); i++) {
189 static constexpr
const char*
typeName =
"sensor_msgs/Joy";
192 static constexpr
const char*
typeChecksum =
"5a9ea5f83505693b71e785041e67a8bb";
196 # Reports the state of a joysticks axes and buttons.\n\
197 Header header # timestamp in the header is the time the data is received from the joystick\n\
198 float32[] axes # the axes measurements from a joystick\n\
199 int32[] buttons # the buttons measurements from a joystick \n\
201 ================================================================================\n\
202 MSG: std_msgs/Header\n\
203 # Standard metadata for higher-level stamped data types.\n\
204 # This is generally used to communicate timestamped data \n\
205 # in a particular coordinate frame.\n\
207 # sequence ID: consecutively increasing ID \n\
209 #Two-integer timestamp that is expressed as:\n\
210 # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
211 # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
212 # time-handling sugar is provided by the client library\n\
214 #Frame this data is associated with\n\
233 #endif // YARP_ROSMSG_sensor_msgs_Joy_h
yarp::rosmsg::std_msgs::Header header
virtual void appendFloat32(yarp::conf::float32_t data)=0
Send a representation of a 32-bit floating point number to the network connection.
virtual bool read(yarp::os::idl::WireReader &reader)
bool writeBottle(yarp::os::ConnectionWriter &connection) const override
virtual bool isBareMode() const =0
Check if the connection is bare mode.
bool readBare(yarp::os::ConnectionReader &connection) override
bool writeBare(yarp::os::ConnectionWriter &connection) const override
std::vector< yarp::conf::float32_t > axes
virtual bool isError() const =0
static constexpr const char * typeText
#define BOTTLE_TAG_FLOAT32
static Type byName(const char *name)
bool write(yarp::os::ConnectionWriter &connection) const override
Write this object to a network connection.
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.
std::vector< std::int32_t > buttons
yarp::os::idl::BottleStyle< yarp::rosmsg::sensor_msgs::Joy > bottleStyle
A "tamed" Portable, that promises to serialize itself in an IDL-friendly way.
yarp::os::Type getType() const override
virtual bool isBareMode() const =0
Check if the connection is bare mode.
virtual bool convertTextMode()=0
Converts a standard description in binary into a textual description, if the connection is in text-mo...
static constexpr const char * typeChecksum
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.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
bool readBottle(yarp::os::ConnectionReader &connection) override
static constexpr const char * typeName
The main, catch-all namespace for YARP.
virtual yarp::conf::float32_t expectFloat32()=0
Read a 32-bit floating point number from the network connection.
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).
yarp::os::idl::BareStyle< yarp::rosmsg::sensor_msgs::Joy > rosStyle
virtual bool write(const yarp::os::idl::WireWriter &writer) const