Public Member Functions | Private Attributes | Static Private Attributes | List of all members
industrial::joint_traj::JointTraj Class Reference

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>

Inheritance diagram for industrial::joint_traj::JointTraj:
Inheritance graph
[legend]

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

industrial::joint_traj::JointTraj::JointTraj ( void  )

Default constructor.

This method creates empty data.

Definition at line 49 of file joint_traj.cpp.

industrial::joint_traj::JointTraj::~JointTraj ( void  )

Destructor.

Definition at line 53 of file joint_traj.cpp.

Member Function Documentation

bool industrial::joint_traj::JointTraj::addPoint ( industrial::joint_traj_pt::JointTrajPt point)

Adds a point value to the end of the buffer.

Parameters
pointvalue
Returns
true if value set, otherwise false (buffer is full)

Definition at line 69 of file joint_traj.cpp.

unsigned int industrial::joint_traj::JointTraj::byteLength ( )
inlinevirtual

Virtual method returns the object size when packed into a ByteArray.

Returns
object size (in bytes)

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.

Parameters
src(value to copy)

Definition at line 105 of file joint_traj.cpp.

int industrial::joint_traj::JointTraj::getMaxNumPoints ( ) const
inline

returns the maximum number of points the message holds

Returns
max number of points

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.

Parameters
pointindex
pointvalue
Returns
true if value set, otherwise false (index greater than size)

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.

bool industrial::joint_traj::JointTraj::isFull ( )
inline

returns True if buffer is full

Returns
true if buffer is full

Definition at line 126 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

Parameters
bufferpointer to ByteArray
Returns
true on success, false otherwise (buffer not large enough)

Implements industrial::simple_serialize::SimpleSerialize.

Definition at line 149 of file joint_traj.cpp.

bool industrial::joint_traj::JointTraj::operator== ( JointTraj rhs)

== operator implementation

Returns
true if equal

Definition at line 117 of file joint_traj.cpp.

industrial::shared_types::shared_int industrial::joint_traj::JointTraj::size ( )
inline

Gets a size of trajectory.

Returns
trajectory size

Definition at line 116 of file joint_traj.h.

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)

Parameters
bufferpointer to ByteArray
Returns
true on success, false otherwise (buffer not large enough)

Implements industrial::simple_serialize::SimpleSerialize.

Definition at line 175 of file joint_traj.cpp.

Member Data Documentation

const industrial::shared_types::shared_int industrial::joint_traj::JointTraj::MAX_NUM_POINTS = 200
staticprivate

maximum number of joints positions that can be held in the message.

Definition at line 169 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 173 of file joint_traj.h.

industrial::shared_types::shared_int industrial::joint_traj::JointTraj::size_
private

size of trajectory

Definition at line 177 of file joint_traj.h.


The documentation for this class was generated from the following files:


simple_message
Author(s): Shaun Edwards
autogenerated on Sat Sep 21 2019 03:30:09