Public Member Functions | Private Attributes | List of all members
industrial::robot_status::RobotStatus Class Reference

Class encapsulated robot status data. The robot status data is meant to mirror the industrial_msgs/RobotStatus message. More...

#include <robot_status.h>

Inheritance diagram for industrial::robot_status::RobotStatus:
Inheritance graph
[legend]

Public Member Functions

unsigned int byteLength ()
 Virtual method returns the object size when packed into a ByteArray. More...
 
void copyFrom (RobotStatus &src)
 Copies the passed in value. More...
 
TriState getDrivesPowered ()
 
industrial::shared_types::shared_int getErrorCode () const
 
TriState getEStopped ()
 
TriState getInError ()
 
TriState getInMotion ()
 
RobotMode getMode ()
 
TriState getMotionPossible ()
 
void init ()
 Initializes an empty robot status. More...
 
void init (TriState drivesPowered, TriState eStopped, industrial::shared_types::shared_int errorCode, TriState inError, TriState inMotion, RobotMode mode, TriState motionPossible)
 Initializes a full robot status message. More...
 
bool load (industrial::byte_array::ByteArray *buffer)
 Virtual method for loading an object into a ByteArray. More...
 
bool operator== (RobotStatus &rhs)
 == operator implementation More...
 
 RobotStatus (void)
 Default constructor. More...
 
void setDrivesPowered (TriState drivesPowered)
 
void setErrorCode (industrial::shared_types::shared_int errorCode)
 
void setEStopped (TriState eStopped)
 
void setInError (TriState inError)
 
void setInMotion (TriState inMotion)
 
void setMode (RobotMode mode)
 
void setMotionPossible (TriState motionPossible)
 
bool unload (industrial::byte_array::ByteArray *buffer)
 Virtual method for unloading an object from a ByteArray. More...
 
 ~RobotStatus (void)
 Destructor. More...
 

Private Attributes

industrial::shared_types::shared_int drives_powered_
 Drive power state (see TriStates::TriState) More...
 
industrial::shared_types::shared_int e_stopped_
 E-stop state (see TriStates::TriState) More...
 
industrial::shared_types::shared_int error_code_
 error code (non-zero is error) More...
 
industrial::shared_types::shared_int in_error_
 in error state (see TriStates::TriState) More...
 
industrial::shared_types::shared_int in_motion_
 in motion state (see TriStates::TriState) More...
 
industrial::shared_types::shared_int mode_
 Operating mode (see RobotModes::RobotMode) More...
 
industrial::shared_types::shared_int motion_possible_
 motion possible state (see TriStates::TriState) More...
 

Detailed Description

Class encapsulated robot status data. The robot status data is meant to mirror the industrial_msgs/RobotStatus message.

The byte representation of a robot status is as follows (in order lowest index to highest). The standard sizes are given, but can change based on type sizes:

member: type size drives_powered (industrial::shared_types::shared_int) 4 bytes e_stopped (industrial::shared_types::shared_int) 4 bytes error_code (industrial::shared_types::shared_int) 4 bytes in_error (industrial::shared_types::shared_int) 4 bytes in_motion (industrial::shared_types::shared_int) 4 bytes mode (industrial::shared_types::shared_int) 4 bytes motion_possible (industrial::shared_types::shared_int) 4 bytes

THIS CLASS IS NOT THREAD-SAFE

Definition at line 118 of file robot_status.h.

Constructor & Destructor Documentation

◆ RobotStatus()

industrial::robot_status::RobotStatus::RobotStatus ( void  )

Default constructor.

This method creates empty data.

Definition at line 115 of file robot_status.cpp.

◆ ~RobotStatus()

industrial::robot_status::RobotStatus::~RobotStatus ( void  )

Destructor.

Definition at line 119 of file robot_status.cpp.

Member Function Documentation

◆ byteLength()

unsigned int industrial::robot_status::RobotStatus::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 234 of file robot_status.h.

◆ copyFrom()

void industrial::robot_status::RobotStatus::copyFrom ( RobotStatus src)

Copies the passed in value.

Parameters
src(value to copy)

Definition at line 142 of file robot_status.cpp.

◆ getDrivesPowered()

TriState industrial::robot_status::RobotStatus::getDrivesPowered ( )
inline

Definition at line 147 of file robot_status.h.

◆ getErrorCode()

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::getErrorCode ( ) const
inline

Definition at line 157 of file robot_status.h.

◆ getEStopped()

TriState industrial::robot_status::RobotStatus::getEStopped ( )
inline

Definition at line 152 of file robot_status.h.

◆ getInError()

TriState industrial::robot_status::RobotStatus::getInError ( )
inline

Definition at line 162 of file robot_status.h.

◆ getInMotion()

TriState industrial::robot_status::RobotStatus::getInMotion ( )
inline

Definition at line 167 of file robot_status.h.

◆ getMode()

RobotMode industrial::robot_status::RobotStatus::getMode ( )
inline

Definition at line 172 of file robot_status.h.

◆ getMotionPossible()

TriState industrial::robot_status::RobotStatus::getMotionPossible ( )
inline

Definition at line 177 of file robot_status.h.

◆ init() [1/2]

void industrial::robot_status::RobotStatus::init ( )

Initializes an empty robot status.

Definition at line 124 of file robot_status.cpp.

◆ init() [2/2]

void industrial::robot_status::RobotStatus::init ( TriState  drivesPowered,
TriState  eStopped,
industrial::shared_types::shared_int  errorCode,
TriState  inError,
TriState  inMotion,
RobotMode  mode,
TriState  motionPossible 
)

Initializes a full robot status message.

Definition at line 130 of file robot_status.cpp.

◆ load()

bool industrial::robot_status::RobotStatus::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 160 of file robot_status.cpp.

◆ operator==()

bool industrial::robot_status::RobotStatus::operator== ( RobotStatus rhs)

== operator implementation

Returns
true if equal

Definition at line 153 of file robot_status.cpp.

◆ setDrivesPowered()

void industrial::robot_status::RobotStatus::setDrivesPowered ( TriState  drivesPowered)
inline

Definition at line 182 of file robot_status.h.

◆ setErrorCode()

void industrial::robot_status::RobotStatus::setErrorCode ( industrial::shared_types::shared_int  errorCode)
inline

Definition at line 192 of file robot_status.h.

◆ setEStopped()

void industrial::robot_status::RobotStatus::setEStopped ( TriState  eStopped)
inline

Definition at line 187 of file robot_status.h.

◆ setInError()

void industrial::robot_status::RobotStatus::setInError ( TriState  inError)
inline

Definition at line 197 of file robot_status.h.

◆ setInMotion()

void industrial::robot_status::RobotStatus::setInMotion ( TriState  inMotion)
inline

Definition at line 202 of file robot_status.h.

◆ setMode()

void industrial::robot_status::RobotStatus::setMode ( RobotMode  mode)
inline

Definition at line 207 of file robot_status.h.

◆ setMotionPossible()

void industrial::robot_status::RobotStatus::setMotionPossible ( TriState  motionPossible)
inline

Definition at line 212 of file robot_status.h.

◆ unload()

bool industrial::robot_status::RobotStatus::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 183 of file robot_status.cpp.

Member Data Documentation

◆ drives_powered_

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::drives_powered_
private

Drive power state (see TriStates::TriState)

Definition at line 254 of file robot_status.h.

◆ e_stopped_

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::e_stopped_
private

E-stop state (see TriStates::TriState)

Definition at line 249 of file robot_status.h.

◆ error_code_

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::error_code_
private

error code (non-zero is error)

Definition at line 274 of file robot_status.h.

◆ in_error_

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::in_error_
private

in error state (see TriStates::TriState)

Definition at line 269 of file robot_status.h.

◆ in_motion_

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::in_motion_
private

in motion state (see TriStates::TriState)

Definition at line 264 of file robot_status.h.

◆ mode_

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::mode_
private

Operating mode (see RobotModes::RobotMode)

Definition at line 244 of file robot_status.h.

◆ motion_possible_

industrial::shared_types::shared_int industrial::robot_status::RobotStatus::motion_possible_
private

motion possible state (see TriStates::TriState)

Definition at line 259 of file robot_status.h.


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


simple_message
Author(s): Shaun Edwards
autogenerated on Wed Mar 2 2022 00:24:53