Class encapsulated robot status data. The robot status data is meant to mirror the industrial_msgs/RobotStatus message. More...
#include <robot_status.h>
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... | |
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 116 of file robot_status.h.
industrial::robot_status::RobotStatus::RobotStatus | ( | void | ) |
Default constructor.
This method creates empty data.
Definition at line 112 of file robot_status.cpp.
industrial::robot_status::RobotStatus::~RobotStatus | ( | void | ) |
Destructor.
Definition at line 116 of file robot_status.cpp.
|
inlinevirtual |
Virtual method returns the object size when packed into a ByteArray.
Implements industrial::simple_serialize::SimpleSerialize.
Definition at line 232 of file robot_status.h.
void industrial::robot_status::RobotStatus::copyFrom | ( | RobotStatus & | src | ) |
Copies the passed in value.
src | (value to copy) |
Definition at line 139 of file robot_status.cpp.
|
inline |
Definition at line 145 of file robot_status.h.
|
inline |
Definition at line 155 of file robot_status.h.
|
inline |
Definition at line 150 of file robot_status.h.
|
inline |
Definition at line 160 of file robot_status.h.
|
inline |
Definition at line 165 of file robot_status.h.
|
inline |
Definition at line 170 of file robot_status.h.
|
inline |
Definition at line 175 of file robot_status.h.
void industrial::robot_status::RobotStatus::init | ( | ) |
Initializes an empty robot status.
Definition at line 121 of file robot_status.cpp.
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 127 of file robot_status.cpp.
|
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 157 of file robot_status.cpp.
bool industrial::robot_status::RobotStatus::operator== | ( | RobotStatus & | rhs | ) |
|
inline |
Definition at line 180 of file robot_status.h.
|
inline |
Definition at line 190 of file robot_status.h.
|
inline |
Definition at line 185 of file robot_status.h.
|
inline |
Definition at line 195 of file robot_status.h.
|
inline |
Definition at line 200 of file robot_status.h.
|
inline |
Definition at line 205 of file robot_status.h.
|
inline |
Definition at line 210 of file robot_status.h.
|
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 180 of file robot_status.cpp.
|
private |
Drive power state (see TriStates::TriState)
Definition at line 252 of file robot_status.h.
|
private |
E-stop state (see TriStates::TriState)
Definition at line 247 of file robot_status.h.
|
private |
error code (non-zero is error)
Definition at line 272 of file robot_status.h.
|
private |
in error state (see TriStates::TriState)
Definition at line 267 of file robot_status.h.
|
private |
in motion state (see TriStates::TriState)
Definition at line 262 of file robot_status.h.
|
private |
Operating mode (see RobotModes::RobotMode)
Definition at line 242 of file robot_status.h.
|
private |
motion possible state (see TriStates::TriState)
Definition at line 257 of file robot_status.h.