32 #ifndef MOTOMAN_DRIVER_SIMPLE_MESSAGE_MOTOMAN_MOTION_REPLY_H 33 #define MOTOMAN_DRIVER_SIMPLE_MESSAGE_MOTOMAN_MOTION_REPLY_H 50 namespace simple_message
52 namespace motion_reply
78 namespace MotionReplySubcodes
181 this->robot_id_ = robot_id;
191 return this->robot_id_;
211 return this->sequence_;
231 return this->command_;
251 return this->result_;
271 return this->subcode_;
279 for (
size_t i = 0; i < MAX_DATA_CNT; ++i)
280 this->data_[i] = 0.0;
291 if (idx < MAX_DATA_CNT)
292 this->data_[idx] = val;
294 LOG_ERROR(
"MotionReply data index out-of-range (%d >= %d)",
295 static_cast<int>(idx), static_cast<int>(MAX_DATA_CNT));
306 if (idx < MAX_DATA_CNT)
308 return this->data_[idx];
312 LOG_ERROR(
"MotionReply data index out-of-range (%d >= %d)",
313 static_cast<int>(idx), static_cast<int>(MAX_DATA_CNT));
327 return getResultString(this->result_);
338 return getSubcodeString(this->subcode_);
395 static const size_t MAX_DATA_CNT = 10;
407 #endif // MOTOMAN_DRIVER_SIMPLE_MESSAGE_MOTOMAN_MOTION_REPLY_H industrial::shared_types::shared_int command_
Motion-control command (from corresponding MotionCtrl command)
industrial::shared_types::shared_int robot_id_
Robot/group ID. 0 = 1st robot.
industrial::shared_types::shared_real getData(size_t idx) const
Returns reply data.
void clearData()
Clears reply data.
industrial::shared_types::shared_int getSubcode() const
Returns motion-control result sub-code.
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.
Enumeration of motion reply result codes.
#define LOG_ERROR(format,...)
std::string getResultString() const
std::string getSubcodeString() const
float data[ROS_MAX_JOINT]
void setSequence(industrial::shared_types::shared_int sequence)
Sets motion-control reply's sequence number.
industrial::shared_types::shared_int getResult() const
Returns motion-control result code.
industrial::shared_types::shared_int sequence_
Message-tracking number (from corresponding MotionCtrl command)
void setData(size_t idx, industrial::shared_types::shared_real val)
Sets reply data.
industrial::shared_types::shared_int getSequence() const
Returns motion-control reply's sequence number.
void setCommand(industrial::shared_types::shared_int command)
Sets motion-control command (for reference)
Class encapsulated motion control reply data. These messages are sent by the FS100 controller in resp...
unsigned int byteLength()
industrial::shared_types::shared_int result_
Command result.
void setSubcode(industrial::shared_types::shared_int subcode)
Sets motion-control result sub-code.
industrial::shared_types::shared_int subcode_
Command result sub-code (more detailed status)
industrial::shared_types::shared_int getRobotID() const
Returns target robot/group # for this reply.
bool operator==(const Rotation &a, const Rotation &b)
industrial::shared_types::shared_int getCommand() const
Returns motion-control command.