32 #ifndef MOTOMAN_DRIVER_SIMPLE_MESSAGE_MOTOMAN_MOTION_CTRL_H 33 #define MOTOMAN_DRIVER_SIMPLE_MESSAGE_MOTOMAN_MOTION_CTRL_H 49 namespace simple_message
129 this->robot_id_ = robot_id;
139 return this->robot_id_;
159 return this->sequence_;
179 return (MotionControlCmd)this->command_;
187 for (
size_t i = 0; i < MAX_DATA_CNT; ++i)
188 this->data_[i] = 0.0;
199 if (idx < MAX_DATA_CNT)
200 this->data_[idx] = val;
202 LOG_ERROR(
"MotionCtrl data index out-of-range (%d >= %d)",
203 static_cast<int>(idx), static_cast<int>(MAX_DATA_CNT));
214 if (idx < MAX_DATA_CNT)
216 return this->data_[idx];
220 LOG_ERROR(
"MotionCtrl data index out-of-range (%d >= %d)",
221 static_cast<int>(idx), static_cast<int>(MAX_DATA_CNT));
270 static const size_t MAX_DATA_CNT = 10;
282 #endif // MOTOMAN_DRIVER_SIMPLE_MESSAGE_MOTOMAN_MOTION_CTRL_H
industrial::shared_types::shared_int command_
Motion-control command.
void setCommand(MotionControlCmd command)
Sets motion control command.
void setSequence(industrial::shared_types::shared_int sequence)
Sets control command's sequence number.
industrial::shared_types::shared_int getRobotID()
Returns target robot/group # for this command.
unsigned int byteLength()
#define LOG_ERROR(format,...)
industrial::shared_types::shared_real getData(size_t idx)
Returns command data.
void setData(size_t idx, industrial::shared_types::shared_real val)
Sets command data.
MotionControlCmd getCommand()
Returns motion control command.
float data[ROS_MAX_JOINT]
industrial::shared_types::shared_int sequence_
Message-tracking number that will be echoed back in reply message.
Enumeration of motion control command codes.
void setRobotID(industrial::shared_types::shared_int robot_id)
Sets robot_id.
industrial::shared_types::shared_int robot_id_
Robot/group ID. 0 = 1st robot.
void clearData()
Clears command data.
bool operator==(const Rotation &a, const Rotation &b)
industrial::shared_types::shared_int getSequence()
Returns control command's sequence number.
Class encapsulated motion control data. These control messages are required to download command-traje...