Public Member Functions | Private Attributes | Static Private Attributes
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]

List of all members.

Public Member Functions

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

Private Attributes

industrial::shared_types::shared_int command_
 Motion-control 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 robot_id_
 Robot/group ID. 0 = 1st robot.
industrial::shared_types::shared_int sequence_
 Message-tracking number that will be echoed back in reply message.

Static Private Attributes

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

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 92 of file motoman_motion_ctrl.h.


Constructor & Destructor Documentation

Default constructor.

This method creates empty data.

Definition at line 52 of file motoman_motion_ctrl.cpp.

Destructor.

Definition at line 56 of file motoman_motion_ctrl.cpp.


Member Function Documentation

Clears command data.

Definition at line 186 of file motoman_motion_ctrl.h.

Copies the passed in value.

Parameters:
src(value to copy)

Definition at line 76 of file motoman_motion_ctrl.cpp.

Returns motion control command.

Returns:
motion-control command value

Definition at line 178 of file motoman_motion_ctrl.h.

Returns command data.

Parameters:
idxdata-index to get
Returns:
data value

Definition at line 213 of file motoman_motion_ctrl.h.

Returns target robot/group # for this command.

Returns:
robot_id

Definition at line 138 of file motoman_motion_ctrl.h.

Returns control command's sequence number.

Returns:
control command sequence number

Definition at line 158 of file motoman_motion_ctrl.h.

Initializes a empty motion control command.

Definition at line 61 of file motoman_motion_ctrl.cpp.

Initializes a complete motion control command.

Definition at line 66 of file motoman_motion_ctrl.cpp.

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.

Sets motion control command.

Parameters:
commandmotion-control command value

Definition at line 168 of file motoman_motion_ctrl.h.

Sets command data.

Parameters:
idxindex to set
valdata value

Definition at line 198 of file motoman_motion_ctrl.h.

Sets robot_id.

Parameters:
robot_idtarget robot/group # for this command

Definition at line 128 of file motoman_motion_ctrl.h.

Sets control command's sequence number.

Parameters:
sequencevalue

Definition at line 148 of file motoman_motion_ctrl.h.


Member Data Documentation

Motion-control command.

Definition at line 267 of file motoman_motion_ctrl.h.

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

Definition at line 278 of file motoman_motion_ctrl.h.

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

Definition at line 272 of file motoman_motion_ctrl.h.

Robot/group ID. 0 = 1st robot.

Definition at line 257 of file motoman_motion_ctrl.h.

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

Definition at line 262 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)
autogenerated on Wed Aug 26 2015 12:37:34