48 JointData::JointData(
void)
52 JointData::~JointData(
void)
57 void JointData::init()
59 for (
int i = 0; i < this->getMaxNumJoints(); i++)
61 this->setJoint(i, 0.0);
69 if (index < this->getMaxNumJoints())
71 this->joints_[index] = value;
76 LOG_ERROR(
"Joint index: %d, is greater than size: %d", index, this->getMaxNumJoints());
86 if (index < this->getMaxNumJoints())
88 value = this->joints_[index];
93 LOG_ERROR(
"Joint index: %d, is greater than size: %d", index, this->getMaxNumJoints());
102 this->getJoint(index, rtn);
111 for (
int i = 0; i < this->getMaxNumJoints(); i++)
114 this->setJoint(i, value);
124 for (
int i = 0; i < this->getMaxNumJoints(); i++)
126 this->getJoint(i, lhsvalue);
128 if (lhsvalue != rhsvalue)
143 LOG_COMM(
"Executing joint position load");
144 for (
int i = 0; i < this->getMaxNumJoints(); i++)
146 this->getJoint(i, value);
147 rtn = buffer->
load(value);
150 LOG_ERROR(
"Failed to load joint position data");
162 LOG_COMM(
"Executing joint position unload");
163 for (
int i = this->getMaxNumJoints() - 1; i >= 0; i--)
165 rtn = buffer->
unload(value);
171 this->setJoint(i, value);
void init(const M_string &remappings)
Contains platform specific type definitions that guarantee the size of primitive data types...
#define LOG_COMM(format,...)
bool load(industrial::shared_types::shared_bool value)
loads a boolean into the byte array
#define LOG_ERROR(format,...)
bool getJoint(industrial::shared_types::shared_int index, industrial::shared_types::shared_real &value) const
Gets a joint value within the buffer.
The byte array wraps a dynamic array of bytes (i.e. char).
Class encapsulated joint data (positions, accelerations, velocity, torque, and/or effort)...
unsigned int getBufferSize()
gets current buffer size
bool unload(industrial::shared_types::shared_bool &value)
unloads a boolean value from the byte array