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. More... | |
| unsigned int | byteLength () |
| Virtual method returns the object size when packed into a ByteArray. More... | |
| void | copyFrom (JointTraj &src) |
| Copies the passed in value. More... | |
| int | getMaxNumPoints () const |
| returns the maximum number of points the message holds More... | |
| bool | getPoint (industrial::shared_types::shared_int index, industrial::joint_traj_pt::JointTrajPt &point) |
| Gets a point value within the buffer. More... | |
| void | init () |
| Initializes a empty joint data. More... | |
| bool | isFull () |
| returns True if buffer is full More... | |
| JointTraj (void) | |
| Default constructor. More... | |
| bool | load (industrial::byte_array::ByteArray *buffer) |
| Virtual method for loading an object into a ByteArray. More... | |
| bool | operator== (JointTraj &rhs) |
| == operator implementation More... | |
| industrial::shared_types::shared_int | size () |
| Gets a size of trajectory. More... | |
| bool | unload (industrial::byte_array::ByteArray *buffer) |
| Virtual method for unloading an object from a ByteArray. More... | |
| ~JointTraj (void) | |
| Destructor. More... | |
Private Attributes | |
| industrial::joint_traj_pt::JointTrajPt | points_ [MAX_NUM_POINTS] |
| internal data buffer More... | |
| industrial::shared_types::shared_int | size_ |
| size of trajectory More... | |
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. More... | |
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 70 of file joint_traj.h.
| industrial::joint_traj::JointTraj::JointTraj | ( | void | ) |
| industrial::joint_traj::JointTraj::~JointTraj | ( | void | ) |
Destructor.
Definition at line 53 of file joint_traj.cpp.
| bool industrial::joint_traj::JointTraj::addPoint | ( | industrial::joint_traj_pt::JointTrajPt & | point | ) |
Adds a point value to the end of the buffer.
| point | value |
Definition at line 69 of file joint_traj.cpp.
|
inlinevirtual |
Virtual method returns the object size when packed into a ByteArray.
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 158 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 105 of file joint_traj.cpp.
|
inline |
returns the maximum number of points the message holds
Definition at line 136 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 88 of file joint_traj.cpp.
| void industrial::joint_traj::JointTraj::init | ( | ) |
Initializes a empty joint data.
Definition at line 58 of file joint_traj.cpp.
|
inline |
returns True if buffer is full
Definition at line 126 of file joint_traj.h.
|
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 149 of file joint_traj.cpp.
| bool industrial::joint_traj::JointTraj::operator== | ( | JointTraj & | rhs | ) |
|
inline |
|
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 175 of file joint_traj.cpp.
|
staticprivate |
maximum number of joints positions that can be held in the message.
Definition at line 169 of file joint_traj.h.
|
private |
internal data buffer
Definition at line 173 of file joint_traj.h.
|
private |
size of trajectory
Definition at line 177 of file joint_traj.h.