Public Member Functions | Private Attributes | Static Private Attributes
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]

List of all members.

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.

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

Default constructor.

This method creates empty data.

Definition at line 49 of file joint_traj.cpp.

Destructor.

Definition at line 53 of file joint_traj.cpp.


Member Function Documentation

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 ( ) [inline, virtual]

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.

Copies the passed in value.

Parameters:
src(value to copy)

Definition at line 105 of file joint_traj.cpp.

returns the maximum number of points the message holds

Returns:
max number of points

Definition at line 136 of file joint_traj.h.

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.

Initializes a empty joint data.

Definition at line 58 of file joint_traj.cpp.

returns True if buffer is full

Returns:
true if buffer is full

Definition at line 126 of file joint_traj.h.

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.

Gets a size of trajectory.

Returns:
trajectory size

Definition at line 116 of file joint_traj.h.

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

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

Definition at line 169 of file joint_traj.h.

internal data buffer

Definition at line 173 of file joint_traj.h.

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 Jun 8 2019 20:43:24