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

Class encapsulated motion control data. These control messages are required to download command-trajectories to the FS100 controller. Trajectory data is provided in a separate JointTrajPtFull message. These control commands are motoman-specific. More...

#include <motoman_motion_ctrl.h>

Inheritance diagram for motoman::simple_message::motion_ctrl::MotionCtrl:
Inheritance graph
[legend]

Public Member Functions

unsigned int byteLength ()
 
void clearData ()
 Clears command data. More...
 
void copyFrom (MotionCtrl &src)
 Copies the passed in value. More...
 
MotionControlCmd getCommand ()
 Returns motion control command. More...
 
industrial::shared_types::shared_real getData (size_t idx)
 Returns command data. More...
 
industrial::shared_types::shared_int getRobotID ()
 Returns target robot/group # for this command. More...
 
industrial::shared_types::shared_int getSequence ()
 Returns control command's sequence number. More...
 
void init ()
 Initializes a empty motion control command. More...
 
void init (industrial::shared_types::shared_int robot_id, industrial::shared_types::shared_int sequence, MotionControlCmd command, industrial::shared_types::shared_real data)
 Initializes a complete motion control command. More...
 
bool load (industrial::byte_array::ByteArray *buffer)
 
 MotionCtrl (void)
 Default constructor. More...
 
bool operator== (MotionCtrl &rhs)
 == operator implementation More...
 
void setCommand (MotionControlCmd command)
 Sets motion control command. More...
 
void setData (size_t idx, industrial::shared_types::shared_real val)
 Sets command data. More...
 
void setRobotID (industrial::shared_types::shared_int robot_id)
 Sets robot_id. More...
 
void setSequence (industrial::shared_types::shared_int sequence)
 Sets control command's sequence number. More...
 
bool unload (industrial::byte_array::ByteArray *buffer)
 
 ~MotionCtrl (void)
 Destructor. More...
 

Private Attributes

industrial::shared_types::shared_int command_
 Motion-control 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 robot_id_
 Robot/group ID. 0 = 1st robot. More...
 
industrial::shared_types::shared_int sequence_
 Message-tracking number that will be echoed back in reply message. 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 data. These control messages are required to download command-trajectories to the FS100 controller. Trajectory data is provided in a separate JointTrajPtFull message. These control commands are motoman-specific.

The byte representation of a motion control command 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 data[10] (industrial::shared_types::shared_real) 40 bytes

THIS CLASS IS NOT THREAD-SAFE

Definition at line 91 of file motoman_motion_ctrl.h.

Constructor & Destructor Documentation

motoman::simple_message::motion_ctrl::MotionCtrl::MotionCtrl ( void  )

Default constructor.

This method creates empty data.

Definition at line 53 of file motoman_motion_ctrl.cpp.

motoman::simple_message::motion_ctrl::MotionCtrl::~MotionCtrl ( void  )

Destructor.

Definition at line 57 of file motoman_motion_ctrl.cpp.

Member Function Documentation

unsigned int motoman::simple_message::motion_ctrl::MotionCtrl::byteLength ( )
inlinevirtual
void motoman::simple_message::motion_ctrl::MotionCtrl::clearData ( )
inline

Clears command data.

Definition at line 185 of file motoman_motion_ctrl.h.

void motoman::simple_message::motion_ctrl::MotionCtrl::copyFrom ( MotionCtrl src)

Copies the passed in value.

Parameters
src(value to copy)

Definition at line 76 of file motoman_motion_ctrl.cpp.

MotionControlCmd motoman::simple_message::motion_ctrl::MotionCtrl::getCommand ( )
inline

Returns motion control command.

Returns
motion-control command value

Definition at line 177 of file motoman_motion_ctrl.h.

industrial::shared_types::shared_real motoman::simple_message::motion_ctrl::MotionCtrl::getData ( size_t  idx)
inline

Returns command data.

Parameters
idxdata-index to get
Returns
data value

Definition at line 212 of file motoman_motion_ctrl.h.

industrial::shared_types::shared_int motoman::simple_message::motion_ctrl::MotionCtrl::getRobotID ( )
inline

Returns target robot/group # for this command.

Returns
robot_id

Definition at line 137 of file motoman_motion_ctrl.h.

industrial::shared_types::shared_int motoman::simple_message::motion_ctrl::MotionCtrl::getSequence ( )
inline

Returns control command's sequence number.

Returns
control command sequence number

Definition at line 157 of file motoman_motion_ctrl.h.

void motoman::simple_message::motion_ctrl::MotionCtrl::init ( )

Initializes a empty motion control command.

Definition at line 61 of file motoman_motion_ctrl.cpp.

void motoman::simple_message::motion_ctrl::MotionCtrl::init ( industrial::shared_types::shared_int  robot_id,
industrial::shared_types::shared_int  sequence,
MotionControlCmd  command,
industrial::shared_types::shared_real  data 
)

Initializes a complete motion control command.

Definition at line 66 of file motoman_motion_ctrl.cpp.

bool motoman::simple_message::motion_ctrl::MotionCtrl::load ( industrial::byte_array::ByteArray buffer)
virtual
bool motoman::simple_message::motion_ctrl::MotionCtrl::operator== ( MotionCtrl rhs)

== operator implementation

Returns
true if equal

Definition at line 85 of file motoman_motion_ctrl.cpp.

void motoman::simple_message::motion_ctrl::MotionCtrl::setCommand ( MotionControlCmd  command)
inline

Sets motion control command.

Parameters
commandmotion-control command value

Definition at line 167 of file motoman_motion_ctrl.h.

void motoman::simple_message::motion_ctrl::MotionCtrl::setData ( size_t  idx,
industrial::shared_types::shared_real  val 
)
inline

Sets command data.

Parameters
idxindex to set
valdata value

Definition at line 197 of file motoman_motion_ctrl.h.

void motoman::simple_message::motion_ctrl::MotionCtrl::setRobotID ( industrial::shared_types::shared_int  robot_id)
inline

Sets robot_id.

Parameters
robot_idtarget robot/group # for this command

Definition at line 127 of file motoman_motion_ctrl.h.

void motoman::simple_message::motion_ctrl::MotionCtrl::setSequence ( industrial::shared_types::shared_int  sequence)
inline

Sets control command's sequence number.

Parameters
sequencevalue

Definition at line 147 of file motoman_motion_ctrl.h.

bool motoman::simple_message::motion_ctrl::MotionCtrl::unload ( industrial::byte_array::ByteArray buffer)
virtual

Member Data Documentation

industrial::shared_types::shared_int motoman::simple_message::motion_ctrl::MotionCtrl::command_
private

Motion-control command.

Definition at line 265 of file motoman_motion_ctrl.h.

industrial::shared_types::shared_real motoman::simple_message::motion_ctrl::MotionCtrl::data_[MAX_DATA_CNT]
private

Motion-control command data Contents of data-buffer are specific to each command.

Definition at line 276 of file motoman_motion_ctrl.h.

const size_t motoman::simple_message::motion_ctrl::MotionCtrl::MAX_DATA_CNT = 10
staticprivate

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

Definition at line 270 of file motoman_motion_ctrl.h.

industrial::shared_types::shared_int motoman::simple_message::motion_ctrl::MotionCtrl::robot_id_
private

Robot/group ID. 0 = 1st robot.

Definition at line 255 of file motoman_motion_ctrl.h.

industrial::shared_types::shared_int motoman::simple_message::motion_ctrl::MotionCtrl::sequence_
private

Message-tracking number that will be echoed back in reply message.

Definition at line 260 of file motoman_motion_ctrl.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