Public Member Functions | Private Attributes | List of all members
industrial::joint_feedback::JointFeedback Class Reference

Class encapsulated joint feedback data. This data represents the current state of each robot joint, including position/velocity/acceleration. The specific interpretation of this data (actual vs. commanded, timestamp, etc.) is up to the robot-controller implementation. More...

#include <joint_feedback.h>

Inheritance diagram for industrial::joint_feedback::JointFeedback:
Inheritance graph
[legend]

Public Member Functions

unsigned int byteLength ()
 Virtual method returns the object size when packed into a ByteArray. More...
 
void clearAccelerations ()
 Clears the acceleration data. More...
 
void clearPositions ()
 Clears the position data. More...
 
void clearTime ()
 Clears the joint feedback timestamp. More...
 
void clearVelocities ()
 Clears the velocity data. More...
 
void copyFrom (JointFeedback &src)
 Copies the passed in value. More...
 
bool getAccelerations (industrial::joint_data::JointData &dest)
 Returns a copy of the acceleration data. More...
 
bool getPositions (industrial::joint_data::JointData &dest)
 Returns a copy of the position data. More...
 
industrial::shared_types::shared_int getRobotID ()
 Gets robot_id. Robot group # (0-based), for controllers with multiple axis-groups. More...
 
bool getTime (industrial::shared_types::shared_real &time)
 Returns joint feedback timestamp. More...
 
bool getVelocities (industrial::joint_data::JointData &dest)
 Returns a copy of the velocity data. More...
 
void init ()
 Initializes a empty joint feedback. More...
 
void init (industrial::shared_types::shared_int robot_id, industrial::shared_types::shared_int valid_fields, industrial::shared_types::shared_real time, industrial::joint_data::JointData &positions, industrial::joint_data::JointData &velocities, industrial::joint_data::JointData &accelerations)
 Initializes a complete joint feedback. More...
 
bool is_valid (ValidFieldType field)
 check the validity state for a given field More...
 
 JointFeedback (void)
 Default constructor. More...
 
bool load (industrial::byte_array::ByteArray *buffer)
 Virtual method for loading an object into a ByteArray. More...
 
bool operator== (JointFeedback &rhs)
 == operator implementation More...
 
void setAccelerations (industrial::joint_data::JointData &accelerations)
 Sets joint acceleration data. More...
 
void setPositions (industrial::joint_data::JointData &positions)
 Sets joint position data. More...
 
void setRobotID (industrial::shared_types::shared_int robot_id)
 Sets robot_id. Robot group # (0-based), for controllers with multiple axis-groups. More...
 
void setTime (industrial::shared_types::shared_real time)
 Sets joint feedback timestamp. More...
 
void setVelocities (industrial::joint_data::JointData &velocities)
 Sets joint velocity data. More...
 
bool unload (industrial::byte_array::ByteArray *buffer)
 Virtual method for unloading an object from a ByteArray. More...
 
 ~JointFeedback (void)
 Destructor. More...
 

Private Attributes

industrial::joint_data::JointData accelerations_
 joint feedback acceleration data More...
 
industrial::joint_data::JointData positions_
 joint feedback positional data More...
 
industrial::shared_types::shared_int robot_id_
 robot group # (0-based) for controllers that support multiple axis-groups More...
 
industrial::shared_types::shared_real time_
 joint data timestamp Typically, time since controller booted (in seconds) More...
 
industrial::shared_types::shared_int valid_fields_
 bit-mask of (optional) fields that have been initialized with valid data More...
 
industrial::joint_data::JointData velocities_
 joint feedback velocity data More...
 

Detailed Description

Class encapsulated joint feedback data. This data represents the current state of each robot joint, including position/velocity/acceleration. The specific interpretation of this data (actual vs. commanded, timestamp, etc.) is up to the robot-controller implementation.

The message data-packet byte representation is as follows (ordered lowest index to highest). The standard sizes are given, but can change based on type sizes:

member: type size robot_id (industrial::shared_types::shared_int) 4 bytes valid_fields (industrial::shared_types::shared_int) 4 bytes time (industrial::shared_types::shared_real) 4 bytes positions (industrial::joint_data) 40 bytes velocities (industrial::joint_data) 40 bytes accelerations (industrial::joint_data) 40 bytes

THIS CLASS IS NOT THREAD-SAFE

Definition at line 83 of file joint_feedback.h.

Constructor & Destructor Documentation

industrial::joint_feedback::JointFeedback::JointFeedback ( void  )

Default constructor.

This method creates empty data.

Definition at line 49 of file joint_feedback.cpp.

industrial::joint_feedback::JointFeedback::~JointFeedback ( void  )

Destructor.

Definition at line 53 of file joint_feedback.cpp.

Member Function Documentation

unsigned int industrial::joint_feedback::JointFeedback::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 294 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::clearAccelerations ( )
inline

Clears the acceleration data.

Definition at line 260 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::clearPositions ( )
inline

Clears the position data.

Definition at line 197 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::clearTime ( )
inline

Clears the joint feedback timestamp.

Definition at line 165 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::clearVelocities ( )
inline

Clears the velocity data.

Definition at line 229 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::copyFrom ( JointFeedback src)

Copies the passed in value.

Parameters
src(value to copy)

Definition at line 83 of file joint_feedback.cpp.

bool industrial::joint_feedback::JointFeedback::getAccelerations ( industrial::joint_data::JointData dest)
inline

Returns a copy of the acceleration data.

Parameters
destreturned joint acceleration
Returns
true if this field contains valid data

Definition at line 251 of file joint_feedback.h.

bool industrial::joint_feedback::JointFeedback::getPositions ( industrial::joint_data::JointData dest)
inline

Returns a copy of the position data.

Parameters
destreturned joint position
Returns
true if this field contains valid data

Definition at line 188 of file joint_feedback.h.

industrial::shared_types::shared_int industrial::joint_feedback::JointFeedback::getRobotID ( )
inline

Gets robot_id. Robot group # (0-based), for controllers with multiple axis-groups.

Returns
robot_id value

Definition at line 134 of file joint_feedback.h.

bool industrial::joint_feedback::JointFeedback::getTime ( industrial::shared_types::shared_real time)
inline

Returns joint feedback timestamp.

Parameters
timereturned time value
Returns
true if this field contains valid data

Definition at line 156 of file joint_feedback.h.

bool industrial::joint_feedback::JointFeedback::getVelocities ( industrial::joint_data::JointData dest)
inline

Returns a copy of the velocity data.

Parameters
destreturned joint velocity
Returns
true if this field contains valid data

Definition at line 220 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::init ( )

Initializes a empty joint feedback.

Definition at line 58 of file joint_feedback.cpp.

void industrial::joint_feedback::JointFeedback::init ( industrial::shared_types::shared_int  robot_id,
industrial::shared_types::shared_int  valid_fields,
industrial::shared_types::shared_real  time,
industrial::joint_data::JointData positions,
industrial::joint_data::JointData velocities,
industrial::joint_data::JointData accelerations 
)

Initializes a complete joint feedback.

Definition at line 68 of file joint_feedback.cpp.

bool industrial::joint_feedback::JointFeedback::is_valid ( ValidFieldType  field)
inline

check the validity state for a given field

Parameters
fieldfield to check
Returns
true if specified field contains valid data

Definition at line 286 of file joint_feedback.h.

bool industrial::joint_feedback::JointFeedback::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 103 of file joint_feedback.cpp.

bool industrial::joint_feedback::JointFeedback::operator== ( JointFeedback rhs)

== operator implementation

Returns
true if equal

Definition at line 93 of file joint_feedback.cpp.

void industrial::joint_feedback::JointFeedback::setAccelerations ( industrial::joint_data::JointData accelerations)
inline

Sets joint acceleration data.

Parameters
accelerationsnew joint acceleration data

Definition at line 239 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::setPositions ( industrial::joint_data::JointData positions)
inline

Sets joint position data.

Parameters
positionsnew joint position data

Definition at line 176 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::setRobotID ( industrial::shared_types::shared_int  robot_id)
inline

Sets robot_id. Robot group # (0-based), for controllers with multiple axis-groups.

Parameters
robot_idnew robot_id value

Definition at line 123 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::setTime ( industrial::shared_types::shared_real  time)
inline

Sets joint feedback timestamp.

Parameters
timenew time value

Definition at line 144 of file joint_feedback.h.

void industrial::joint_feedback::JointFeedback::setVelocities ( industrial::joint_data::JointData velocities)
inline

Sets joint velocity data.

Parameters
velocitiesnew joint velocity data

Definition at line 208 of file joint_feedback.h.

bool industrial::joint_feedback::JointFeedback::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 147 of file joint_feedback.cpp.

Member Data Documentation

industrial::joint_data::JointData industrial::joint_feedback::JointFeedback::accelerations_
private

joint feedback acceleration data

Definition at line 327 of file joint_feedback.h.

industrial::joint_data::JointData industrial::joint_feedback::JointFeedback::positions_
private

joint feedback positional data

Definition at line 320 of file joint_feedback.h.

industrial::shared_types::shared_int industrial::joint_feedback::JointFeedback::robot_id_
private

robot group # (0-based) for controllers that support multiple axis-groups

Definition at line 305 of file joint_feedback.h.

industrial::shared_types::shared_real industrial::joint_feedback::JointFeedback::time_
private

joint data timestamp Typically, time since controller booted (in seconds)

Definition at line 315 of file joint_feedback.h.

industrial::shared_types::shared_int industrial::joint_feedback::JointFeedback::valid_fields_
private

bit-mask of (optional) fields that have been initialized with valid data

See also
enum ValidFieldTypes

Definition at line 310 of file joint_feedback.h.

industrial::joint_data::JointData industrial::joint_feedback::JointFeedback::velocities_
private

joint feedback velocity data

Definition at line 324 of file joint_feedback.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