49 JointTraj::JointTraj(
void)
53 JointTraj::~JointTraj(
void)
58 void JointTraj::init()
63 for (
shared_int i = 0; i < this->getMaxNumPoints(); i++)
75 this->points_[this->size()].copyFrom(point);
82 LOG_ERROR(
"Failed to add point, buffer is full");
92 if (index < this->size())
94 point.
copyFrom(this->points_[index]);
99 LOG_ERROR(
"Point index: %d, is greater than size: %d", index, this->size());
109 this->size_ = src.
size();
113 this->points_[i].copyFrom(value);
121 if(this->size() == rhs.
size())
127 if(!(this->points_[i] == value))
129 LOG_DEBUG(
"Joint trajectory point different");
141 LOG_DEBUG(
"Joint trajectory compare failed, size mismatch");
154 LOG_COMM(
"Executing joint trajectory load");
157 this->getPoint(i, value);
158 rtn = buffer->
load(value);
161 LOG_ERROR(
"Failed to load joint traj.pt. data");
170 rtn = buffer->
load(this->size());
180 LOG_COMM(
"Executing joint trajectory unload");
182 rtn = buffer->
unload(this->size_);
186 for (
int i = this->size() - 1; i >= 0; i--)
188 rtn = buffer->
unload(value);
194 this->points_[i].copyFrom(value);
199 LOG_ERROR(
"Failed to unload trajectory size");
void init(const M_string &remappings)
Contains platform specific type definitions that guarantee the size of primitive data types...
bool getPoint(industrial::shared_types::shared_int index, industrial::joint_traj_pt::JointTrajPt &point)
Gets a point value within the buffer.
#define LOG_COMM(format,...)
bool load(industrial::shared_types::shared_bool value)
loads a boolean into the byte array
#define LOG_ERROR(format,...)
Class encapsulated joint trajectory point data. The point data serves as a waypoint along a trajector...
The byte array wraps a dynamic array of bytes (i.e. char).
void copyFrom(JointTrajPt &src)
Copies the passed in value.
Class encapsulated joint trajectory. A joint trajectory includes an array of JointTrajPt data types...
#define LOG_DEBUG(format,...)
unsigned int getBufferSize()
gets current buffer size
bool unload(industrial::shared_types::shared_bool &value)
unloads a boolean value from the byte array
industrial::shared_types::shared_int size()
Gets a size of trajectory.