Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
motoman::simple_message::motion_reply::MotionReply Class Reference

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>

Inheritance diagram for motoman::simple_message::motion_reply::MotionReply:
Inheritance graph
[legend]

Public Member Functions

unsigned int byteLength ()
 
void clearData ()
 Clears reply data. More...
 
void copyFrom (MotionReply &src)
 Copies the passed in value. More...
 
industrial::shared_types::shared_int getCommand () const
 Returns motion-control command. More...
 
industrial::shared_types::shared_real getData (size_t idx) const
 Returns reply data. More...
 
industrial::shared_types::shared_int getResult () const
 Returns motion-control result code. More...
 
std::string getResultString () const
 
industrial::shared_types::shared_int getRobotID () const
 Returns target robot/group # for this reply. More...
 
industrial::shared_types::shared_int getSequence () const
 Returns motion-control reply's sequence number. More...
 
industrial::shared_types::shared_int getSubcode () const
 Returns motion-control result sub-code. More...
 
std::string getSubcodeString () const
 
void init ()
 Initializes a empty motion control reply. More...
 
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. More...
 
bool load (industrial::byte_array::ByteArray *buffer)
 
 MotionReply (void)
 Default constructor. More...
 
bool operator== (MotionReply &rhs)
 == operator implementation More...
 
void setCommand (industrial::shared_types::shared_int command)
 Sets motion-control command (for reference) More...
 
void setData (size_t idx, industrial::shared_types::shared_real val)
 Sets reply data. More...
 
void setResult (industrial::shared_types::shared_int result)
 Sets motion-control result code. More...
 
void setRobotID (industrial::shared_types::shared_int robot_id)
 Sets robot_id. More...
 
void setSequence (industrial::shared_types::shared_int sequence)
 Sets motion-control reply's sequence number. More...
 
void setSubcode (industrial::shared_types::shared_int subcode)
 Sets motion-control result sub-code. More...
 
bool unload (industrial::byte_array::ByteArray *buffer)
 
 ~MotionReply (void)
 Destructor. More...
 

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) More...
 
industrial::shared_types::shared_real data_ [MAX_DATA_CNT]
 Motion-control command data Contents of data-buffer are specific to each command. More...
 
industrial::shared_types::shared_int result_
 Command result. More...
 
industrial::shared_types::shared_int robot_id_
 Robot/group ID. 0 = 1st robot. More...
 
industrial::shared_types::shared_int sequence_
 Message-tracking number (from corresponding MotionCtrl command) More...
 
industrial::shared_types::shared_int subcode_
 Command result sub-code (more detailed status) More...
 

Static Private Attributes

static const size_t MAX_DATA_CNT = 10
 Maximum length (# of float elements) of data buffer. More...
 

Detailed Description

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 141 of file motoman_motion_reply.h.

Constructor & Destructor Documentation

motoman::simple_message::motion_reply::MotionReply::MotionReply ( void  )

Default constructor.

This method creates empty data.

Definition at line 58 of file motoman_motion_reply.cpp.

motoman::simple_message::motion_reply::MotionReply::~MotionReply ( void  )

Destructor.

Definition at line 62 of file motoman_motion_reply.cpp.

Member Function Documentation

unsigned int motoman::simple_message::motion_reply::MotionReply::byteLength ( )
inlinevirtual
void motoman::simple_message::motion_reply::MotionReply::clearData ( )
inline

Clears reply data.

Definition at line 277 of file motoman_motion_reply.h.

void motoman::simple_message::motion_reply::MotionReply::copyFrom ( MotionReply src)

Copies the passed in value.

Parameters
src(value to copy)

Definition at line 166 of file motoman_motion_reply.cpp.

industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::getCommand ( ) const
inline

Returns motion-control command.

Returns
motion-control command value

Definition at line 229 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.

Parameters
idxdata-index to get
Returns
data value

Definition at line 304 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.

Returns
motion-control result code

Definition at line 249 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 84 of file motoman_motion_reply.cpp.

std::string motoman::simple_message::motion_reply::MotionReply::getResultString ( ) const
inline

Definition at line 325 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.

Returns
robot_id

Definition at line 189 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.

Returns
sequence number

Definition at line 209 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.

Returns
motion-control result sub-code

Definition at line 269 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 107 of file motoman_motion_reply.cpp.

std::string motoman::simple_message::motion_reply::MotionReply::getSubcodeString ( ) const
inline

Definition at line 336 of file motoman_motion_reply.h.

void motoman::simple_message::motion_reply::MotionReply::init ( )

Initializes a empty motion control reply.

Definition at line 66 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 71 of file motoman_motion_reply.cpp.

bool motoman::simple_message::motion_reply::MotionReply::load ( industrial::byte_array::ByteArray buffer)
virtual
bool motoman::simple_message::motion_reply::MotionReply::operator== ( MotionReply rhs)

== operator implementation

Returns
true if equal

Definition at line 177 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)

Parameters
commandmotion-control command value

Definition at line 219 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.

Parameters
idxindex to set
valdata value

Definition at line 289 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.

Parameters
resultmotion-control result code

Definition at line 239 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.

Parameters
robot_idtarget robot/group # for this reply

Definition at line 179 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.

Parameters
sequencevalue

Definition at line 199 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.

Parameters
resultmotion-control result sub-code

Definition at line 259 of file motoman_motion_reply.h.

bool motoman::simple_message::motion_reply::MotionReply::unload ( industrial::byte_array::ByteArray buffer)
virtual

Member Data Documentation

industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::command_
private

Motion-control command (from corresponding MotionCtrl command)

Definition at line 380 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 401 of file motoman_motion_reply.h.

const size_t motoman::simple_message::motion_reply::MotionReply::MAX_DATA_CNT = 10
staticprivate

Maximum length (# of float elements) of data buffer.

Definition at line 395 of file motoman_motion_reply.h.

industrial::shared_types::shared_int motoman::simple_message::motion_reply::MotionReply::result_
private

Command result.

Definition at line 385 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 370 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 375 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 390 of file motoman_motion_reply.h.


The documentation for this class was generated from the following files:


motoman_driver
Author(s): Jeremy Zoss (Southwest Research Institute), Ted Miller (MotoROS) (Yaskawa Motoman), Eric Marcil (MotoROS) (Yaskawa Motoman)
autogenerated on Sat May 8 2021 02:27:44