Class encapsulated motion control reply data. These messages are sent by the FS100 controller in response to MotionCtrl messages. These control commands are motoman-specific. More...
#include <motoman_motion_reply.h>
Public Member Functions | |
unsigned int | byteLength () |
void | clearData () |
Clears reply data. | |
void | copyFrom (MotionReply &src) |
Copies the passed in value. | |
industrial::shared_types::shared_int | getCommand () const |
Returns motion-control command. | |
industrial::shared_types::shared_real | getData (size_t idx) const |
Returns reply data. | |
industrial::shared_types::shared_int | getResult () const |
Returns motion-control result code. | |
std::string | getResultString () const |
industrial::shared_types::shared_int | getRobotID () const |
Returns target robot/group # for this reply. | |
industrial::shared_types::shared_int | getSequence () const |
Returns motion-control reply's sequence number. | |
industrial::shared_types::shared_int | getSubcode () const |
Returns motion-control result sub-code. | |
std::string | getSubcodeString () const |
void | init () |
Initializes a empty motion control reply. | |
void | init (industrial::shared_types::shared_int robot_id, industrial::shared_types::shared_int sequence, industrial::shared_types::shared_int command, MotionReplyResult result, industrial::shared_types::shared_int subcode, industrial::shared_types::shared_real data) |
Initializes a complete motion control reply. | |
bool | load (industrial::byte_array::ByteArray *buffer) |
MotionReply (void) | |
Default constructor. | |
bool | operator== (MotionReply &rhs) |
== operator implementation | |
void | setCommand (industrial::shared_types::shared_int command) |
Sets motion-control command (for reference) | |
void | setData (size_t idx, industrial::shared_types::shared_real val) |
Sets reply data. | |
void | setResult (industrial::shared_types::shared_int result) |
Sets motion-control result code. | |
void | setRobotID (industrial::shared_types::shared_int robot_id) |
Sets robot_id. | |
void | setSequence (industrial::shared_types::shared_int sequence) |
Sets motion-control reply's sequence number. | |
void | setSubcode (industrial::shared_types::shared_int subcode) |
Sets motion-control result sub-code. | |
bool | unload (industrial::byte_array::ByteArray *buffer) |
~MotionReply (void) | |
Destructor. | |
Static Public Member Functions | |
static std::string | getResultString (industrial::shared_types::shared_int code) |
static std::string | getSubcodeString (industrial::shared_types::shared_int code) |
Private Attributes | |
industrial::shared_types::shared_int | command_ |
Motion-control command (from corresponding MotionCtrl command) | |
industrial::shared_types::shared_real | data_ [MAX_DATA_CNT] |
Motion-control command data Contents of data-buffer are specific to each command. | |
industrial::shared_types::shared_int | result_ |
Command result. | |
industrial::shared_types::shared_int | robot_id_ |
Robot/group ID. 0 = 1st robot. | |
industrial::shared_types::shared_int | sequence_ |
Message-tracking number (from corresponding MotionCtrl command) | |
industrial::shared_types::shared_int | subcode_ |
Command result sub-code (more detailed status) | |
Static Private Attributes | |
static const size_t | MAX_DATA_CNT = 10 |
Maximum length (# of float elements) of data buffer. |
Class encapsulated motion control reply data. These messages are sent by the FS100 controller in response to MotionCtrl messages. These control commands are motoman-specific.
The byte representation of a motion control reply is as follows (in order lowest index to highest). The standard sizes are given, but can change based on type sizes:
member: type size robot_id (industrial::shared_types::shared_int) 4 bytes sequence (industrial::shared_types::shared_int) 4 bytes command (industrial::shared_types::shared_int) 4 bytes result (industrial::shared_types::shared_int) 4 bytes subcode (industrial::shared_types::shared_int) 4 bytes data[10] (industrial::shared_types::shared_real) 40 bytes
THIS CLASS IS NOT THREAD-SAFE
Definition at line 139 of file motoman_motion_reply.h.
Default constructor.
This method creates empty data.
Definition at line 55 of file motoman_motion_reply.cpp.
Destructor.
Definition at line 59 of file motoman_motion_reply.cpp.
unsigned int motoman::simple_message::motion_reply::MotionReply::byteLength | ( | ) | [inline, virtual] |
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 351 of file motoman_motion_reply.h.
void motoman::simple_message::motion_reply::MotionReply::clearData | ( | ) | [inline] |
Clears reply data.
Definition at line 275 of file motoman_motion_reply.h.
Copies the passed in value.
src | (value to copy) |
Definition at line 162 of file motoman_motion_reply.cpp.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::getCommand | ( | ) | const [inline] |
Returns motion-control command.
Definition at line 227 of file motoman_motion_reply.h.
industrial::shared_types::shared_real motoman::simple_message::motion_reply::MotionReply::getData | ( | size_t | idx | ) | const [inline] |
Returns reply data.
idx | data-index to get |
Definition at line 302 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::getResult | ( | ) | const [inline] |
Returns motion-control result code.
Definition at line 247 of file motoman_motion_reply.h.
std::string motoman::simple_message::motion_reply::MotionReply::getResultString | ( | industrial::shared_types::shared_int | code | ) | [static] |
Definition at line 82 of file motoman_motion_reply.cpp.
std::string motoman::simple_message::motion_reply::MotionReply::getResultString | ( | ) | const [inline] |
Definition at line 323 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::getRobotID | ( | ) | const [inline] |
Returns target robot/group # for this reply.
Definition at line 187 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::getSequence | ( | ) | const [inline] |
Returns motion-control reply's sequence number.
Definition at line 207 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::getSubcode | ( | ) | const [inline] |
Returns motion-control result sub-code.
Definition at line 267 of file motoman_motion_reply.h.
std::string motoman::simple_message::motion_reply::MotionReply::getSubcodeString | ( | industrial::shared_types::shared_int | code | ) | [static] |
Definition at line 105 of file motoman_motion_reply.cpp.
std::string motoman::simple_message::motion_reply::MotionReply::getSubcodeString | ( | ) | const [inline] |
Definition at line 331 of file motoman_motion_reply.h.
Initializes a empty motion control reply.
Definition at line 64 of file motoman_motion_reply.cpp.
void motoman::simple_message::motion_reply::MotionReply::init | ( | industrial::shared_types::shared_int | robot_id, |
industrial::shared_types::shared_int | sequence, | ||
industrial::shared_types::shared_int | command, | ||
MotionReplyResult | result, | ||
industrial::shared_types::shared_int | subcode, | ||
industrial::shared_types::shared_real | data | ||
) |
Initializes a complete motion control reply.
Definition at line 69 of file motoman_motion_reply.cpp.
bool motoman::simple_message::motion_reply::MotionReply::load | ( | industrial::byte_array::ByteArray * | buffer | ) | [virtual] |
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 187 of file motoman_motion_reply.cpp.
bool motoman::simple_message::motion_reply::MotionReply::operator== | ( | MotionReply & | rhs | ) |
== operator implementation
Definition at line 173 of file motoman_motion_reply.cpp.
void motoman::simple_message::motion_reply::MotionReply::setCommand | ( | industrial::shared_types::shared_int | command | ) | [inline] |
Sets motion-control command (for reference)
command | motion-control command value |
Definition at line 217 of file motoman_motion_reply.h.
void motoman::simple_message::motion_reply::MotionReply::setData | ( | size_t | idx, |
industrial::shared_types::shared_real | val | ||
) | [inline] |
Sets reply data.
idx | index to set |
val | data value |
Definition at line 287 of file motoman_motion_reply.h.
void motoman::simple_message::motion_reply::MotionReply::setResult | ( | industrial::shared_types::shared_int | result | ) | [inline] |
Sets motion-control result code.
result | motion-control result code |
Definition at line 237 of file motoman_motion_reply.h.
void motoman::simple_message::motion_reply::MotionReply::setRobotID | ( | industrial::shared_types::shared_int | robot_id | ) | [inline] |
Sets robot_id.
robot_id | target robot/group # for this reply |
Definition at line 177 of file motoman_motion_reply.h.
void motoman::simple_message::motion_reply::MotionReply::setSequence | ( | industrial::shared_types::shared_int | sequence | ) | [inline] |
Sets motion-control reply's sequence number.
sequence | value |
Definition at line 197 of file motoman_motion_reply.h.
void motoman::simple_message::motion_reply::MotionReply::setSubcode | ( | industrial::shared_types::shared_int | subcode | ) | [inline] |
Sets motion-control result sub-code.
result | motion-control result sub-code |
Definition at line 257 of file motoman_motion_reply.h.
bool motoman::simple_message::motion_reply::MotionReply::unload | ( | industrial::byte_array::ByteArray * | buffer | ) | [virtual] |
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 235 of file motoman_motion_reply.cpp.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::command_ [private] |
Motion-control command (from corresponding MotionCtrl command)
Definition at line 373 of file motoman_motion_reply.h.
industrial::shared_types::shared_real motoman::simple_message::motion_reply::MotionReply::data_[MAX_DATA_CNT] [private] |
Motion-control command data Contents of data-buffer are specific to each command.
Definition at line 394 of file motoman_motion_reply.h.
const size_t motoman::simple_message::motion_reply::MotionReply::MAX_DATA_CNT = 10 [static, private] |
Maximum length (# of float elements) of data buffer.
Definition at line 388 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::result_ [private] |
Command result.
Definition at line 378 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::robot_id_ [private] |
Robot/group ID. 0 = 1st robot.
Definition at line 363 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::sequence_ [private] |
Message-tracking number (from corresponding MotionCtrl command)
Definition at line 368 of file motoman_motion_reply.h.
industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::subcode_ [private] |
Command result sub-code (more detailed status)
Definition at line 383 of file motoman_motion_reply.h.