Class encapsulated joint trajectory. A joint trajectory includes an array of JointTrajPt data types. The intention for this class is to be loaded into a single message for communication over a simple connection. More...
#include <joint_traj.h>
Public Member Functions | |
bool | addPoint (industrial::joint_traj_pt::JointTrajPt &point) |
Adds a point value to the end of the buffer. | |
unsigned int | byteLength () |
Virtual method returns the object size when packed into a ByteArray. | |
void | copyFrom (JointTraj &src) |
Copies the passed in value. | |
int | getMaxNumPoints () const |
returns the maximum number of points the message holds | |
bool | getPoint (industrial::shared_types::shared_int index, industrial::joint_traj_pt::JointTrajPt &point) |
Gets a point value within the buffer. | |
void | init () |
Initializes a empty joint data. | |
bool | isFull () |
returns True if buffer is full | |
JointTraj (void) | |
Default constructor. | |
bool | load (industrial::byte_array::ByteArray *buffer) |
Virtual method for loading an object into a ByteArray. | |
bool | operator== (JointTraj &rhs) |
== operator implementation | |
industrial::shared_types::shared_int | size () |
Gets a size of trajectory. | |
bool | unload (industrial::byte_array::ByteArray *buffer) |
Virtual method for unloading an object from a ByteArray. | |
~JointTraj (void) | |
Destructor. | |
Private Attributes | |
industrial::joint_traj_pt::JointTrajPt | points_ [MAX_NUM_POINTS] |
internal data buffer | |
industrial::shared_types::shared_int | size_ |
size of trajectory | |
Static Private Attributes | |
static const industrial::shared_types::shared_int | MAX_NUM_POINTS = 200 |
maximum number of joints positions that can be held in the message. |
Class encapsulated joint trajectory. A joint trajectory includes an array of JointTrajPt data types. The intention for this class is to be loaded into a single message for communication over a simple connection.
For simplicity and cross platform compliance, this is implemented as a fixed size array. The size of the trajectory cannot exceed the max size of the array.
THIS CLASS IS NOT THREAD-SAFE
Definition at line 72 of file joint_traj.h.
Destructor.
Definition at line 55 of file joint_traj.cpp.
Adds a point value to the end of the buffer.
point | value |
Definition at line 71 of file joint_traj.cpp.
unsigned int industrial::joint_traj::JointTraj::byteLength | ( | ) | [inline, virtual] |
Virtual method returns the object size when packed into a ByteArray.
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 160 of file joint_traj.h.
void industrial::joint_traj::JointTraj::copyFrom | ( | JointTraj & | src | ) |
Copies the passed in value.
src | (value to copy) |
Definition at line 107 of file joint_traj.cpp.
int industrial::joint_traj::JointTraj::getMaxNumPoints | ( | ) | const [inline] |
returns the maximum number of points the message holds
Definition at line 138 of file joint_traj.h.
bool industrial::joint_traj::JointTraj::getPoint | ( | industrial::shared_types::shared_int | index, |
industrial::joint_traj_pt::JointTrajPt & | point | ||
) |
Gets a point value within the buffer.
point | index |
point | value |
Definition at line 90 of file joint_traj.cpp.
Initializes a empty joint data.
Definition at line 60 of file joint_traj.cpp.
bool industrial::joint_traj::JointTraj::isFull | ( | ) | [inline] |
returns True if buffer is full
Definition at line 128 of file joint_traj.h.
bool industrial::joint_traj::JointTraj::load | ( | industrial::byte_array::ByteArray * | buffer | ) | [virtual] |
Virtual method for loading an object into a ByteArray.
This method should load all the required data to reconstruct the class object into the buffer
buffer | pointer to ByteArray |
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 151 of file joint_traj.cpp.
bool industrial::joint_traj::JointTraj::operator== | ( | JointTraj & | rhs | ) |
industrial::shared_types::shared_int industrial::joint_traj::JointTraj::size | ( | void | ) | [inline] |
bool industrial::joint_traj::JointTraj::unload | ( | industrial::byte_array::ByteArray * | buffer | ) | [virtual] |
Virtual method for unloading an object from a ByteArray.
This method should unload all the required data to reconstruct the class object (in place)
buffer | pointer to ByteArray |
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 177 of file joint_traj.cpp.
const industrial::shared_types::shared_int industrial::joint_traj::JointTraj::MAX_NUM_POINTS = 200 [static, private] |
maximum number of joints positions that can be held in the message.
Definition at line 171 of file joint_traj.h.
industrial::joint_traj_pt::JointTrajPt industrial::joint_traj::JointTraj::points_[MAX_NUM_POINTS] [private] |
internal data buffer
Definition at line 175 of file joint_traj.h.
industrial::shared_types::shared_int industrial::joint_traj::JointTraj::size_ [private] |
size of trajectory
Definition at line 179 of file joint_traj.h.