46 namespace joint_traj_pt_full
49 JointTrajPtFull::JointTrajPtFull(
void)
53 JointTrajPtFull::~JointTrajPtFull(
void)
58 void JointTrajPtFull::init()
62 this->valid_fields_ = 0;
64 this->positions_.init();
65 this->velocities_.init();
66 this->accelerations_.init();
77 this->setRobotID(robot_id);
78 this->setSequence(sequence);
80 this->setPositions(positions);
81 this->setVelocities(velocities);
82 this->setAccelerations(accelerations);
83 this->valid_fields_ = valid_fields;
99 return this->robot_id_ == rhs.
robot_id_ &&
110 LOG_COMM(
"Executing joint trajectory point load");
112 if (!buffer->
load(this->robot_id_))
114 LOG_ERROR(
"Failed to load joint traj pt. robot_id");
118 if (!buffer->
load(this->sequence_))
120 LOG_ERROR(
"Failed to load joint traj. pt. sequence number");
124 if (!buffer->
load(this->valid_fields_))
126 LOG_ERROR(
"Failed to load joint traj. pt. valid fields");
130 if (!buffer->
load(this->time_))
132 LOG_ERROR(
"Failed to load joint traj. pt. time");
136 if (!this->positions_.load(buffer))
138 LOG_ERROR(
"Failed to load joint traj. pt. positions");
142 if (!this->velocities_.load(buffer))
144 LOG_ERROR(
"Failed to load joint traj. pt. velocities");
148 if (!this->accelerations_.load(buffer))
150 LOG_ERROR(
"Failed to load joint traj. pt. accelerations");
154 LOG_COMM(
"Trajectory point successfully loaded");
160 LOG_COMM(
"Executing joint traj. pt. unload");
162 if (!this->accelerations_.unload(buffer))
164 LOG_ERROR(
"Failed to unload joint traj. pt. accelerations");
168 if (!this->velocities_.unload(buffer))
170 LOG_ERROR(
"Failed to unload joint traj. pt. velocities");
174 if (!this->positions_.unload(buffer))
176 LOG_ERROR(
"Failed to unload joint traj. pt. positions");
180 if (!buffer->
unload(this->time_))
182 LOG_ERROR(
"Failed to unload joint traj. pt. time");
186 if (!buffer->
unload(this->valid_fields_))
188 LOG_ERROR(
"Failed to unload joint traj. pt. valid fields");
192 if (!buffer->
unload(this->sequence_))
194 LOG_ERROR(
"Failed to unload joint traj. pt. sequence number");
198 if (!buffer->
unload(this->robot_id_))
200 LOG_ERROR(
"Faild to unload joint traj. pt. robot_id");
204 LOG_COMM(
"Joint traj. pt successfully unloaded");
industrial::shared_types::shared_int robot_id_
robot group # (0-based) for controllers that support multiple axis-groups
bool getTime(industrial::shared_types::shared_real &time)
Returns joint trajectory point timestamp.
void init(const M_string &remappings)
Contains platform specific type definitions that guarantee the size of primitive data types...
industrial::joint_data::JointData accelerations_
joint trajectory point acceleration data
industrial::shared_types::shared_int valid_fields_
bit-mask of (optional) fields that have been initialized with valid data
#define LOG_COMM(format,...)
bool load(industrial::shared_types::shared_bool value)
loads a boolean into the byte array
#define LOG_ERROR(format,...)
industrial::shared_types::shared_int getRobotID()
Gets robot_id. Robot group # (0-based), for controllers with multiple axis-groups.
bool getPositions(industrial::joint_data::JointData &dest)
Returns a copy of the position data.
industrial::joint_data::JointData velocities_
joint trajectory point velocity data
The byte array wraps a dynamic array of bytes (i.e. char).
Class encapsulated joint data (positions, accelerations, velocity, torque, and/or effort)...
Class encapsulated joint trajectory point data. The point data serves as a waypoint along a trajector...
bool getAccelerations(industrial::joint_data::JointData &dest)
Returns a copy of the acceleration data.
bool unload(industrial::shared_types::shared_bool &value)
unloads a boolean value from the byte array
industrial::shared_types::shared_int sequence_
trajectory sequence number
industrial::shared_types::shared_int getSequence()
Returns joint trajectory point sequence number.
industrial::shared_types::shared_real time_
joint trajectory point timestamp Typically, time_from_start of this trajectory (in seconds) ...
industrial::joint_data::JointData positions_
joint trajectory point positional data
bool getVelocities(industrial::joint_data::JointData &dest)
Returns a copy of the velocity data.