Public Member Functions | Private Member Functions | List of all members
prbt_hardware_support::ModbusMsgOperationModeWrapper Class Reference

Wrapper class to add semantic to a raw ModbusMsgInStamped. More...

#include <modbus_msg_operation_mode_wrapper.h>

Inheritance diagram for prbt_hardware_support::ModbusMsgOperationModeWrapper:
Inheritance graph

Public Member Functions

virtual void checkStructuralIntegrity () const override
 Calls ModbusMsgWrapper::checkStructuralIntegrity(). More...
int8_t getOperationMode () const
 Get the operation mode field from the Modbus message. More...
pilz_msgs::OperationModes getTimeStampedOperationMode () const
 ModbusMsgOperationModeWrapper (const ModbusMsgInStampedConstPtr &modbus_msg_raw, const ModbusApiSpec &api_spec)
- Public Member Functions inherited from prbt_hardware_support::ModbusMsgWrapper
const ros::TimegetTimeStamp () const
unsigned int getVersion () const
bool isDisconnect () const
 Check if the Modbus message informs about a disconnect from the server. More...
 ModbusMsgWrapper (const ModbusMsgInStampedConstPtr &modbus_msg_raw, const ModbusApiSpec &api_spec)
 Construct a new Modbus Msg Wrapper object. More...
virtual ~ModbusMsgWrapper ()=default

Private Member Functions

bool hasOperationMode () const
 Check if the message contains a operation mode definition. More...

Additional Inherited Members

- Protected Member Functions inherited from prbt_hardware_support::ModbusMsgWrapper
const ModbusApiSpecgetApiSpec () const
uint16_t getRegister (uint32_t reg) const
bool hasRegister (uint32_t reg) const
 Check if a certain holding register is define in the Modbus message. More...
bool hasVersion () const
 Check if the modbus_msg contains the API version. More...

Detailed Description

Wrapper class to add semantic to a raw ModbusMsgInStamped.

Allows to easy access to the content behind a raw modbus message which is assumed to contain data about the operation mode.

Definition at line 38 of file modbus_msg_operation_mode_wrapper.h.

Constructor & Destructor Documentation

◆ ModbusMsgOperationModeWrapper()

prbt_hardware_support::ModbusMsgOperationModeWrapper::ModbusMsgOperationModeWrapper ( const ModbusMsgInStampedConstPtr &  modbus_msg_raw,
const ModbusApiSpec api_spec 

Definition at line 72 of file modbus_msg_operation_mode_wrapper.h.

Member Function Documentation

◆ checkStructuralIntegrity()

void prbt_hardware_support::ModbusMsgOperationModeWrapper::checkStructuralIntegrity ( ) const

Calls ModbusMsgWrapper::checkStructuralIntegrity().

ModbusMsgOperationModeWrapperExceptionif operation mode register is missing.

Reimplemented from prbt_hardware_support::ModbusMsgWrapper.

Definition at line 108 of file modbus_msg_operation_mode_wrapper.h.

◆ getOperationMode()

int8_t prbt_hardware_support::ModbusMsgOperationModeWrapper::getOperationMode ( ) const

Get the operation mode field from the Modbus message.

The current operation mode according to OperationModes.msg

Definition at line 83 of file modbus_msg_operation_mode_wrapper.h.

◆ getTimeStampedOperationMode()

pilz_msgs::OperationModes prbt_hardware_support::ModbusMsgOperationModeWrapper::getTimeStampedOperationMode ( ) const
the operation mode and the corresponding time stamp.

Definition at line 100 of file modbus_msg_operation_mode_wrapper.h.

◆ hasOperationMode()

bool prbt_hardware_support::ModbusMsgOperationModeWrapper::hasOperationMode ( ) const

Check if the message contains a operation mode definition.

true if a operation mode is defined, false otherwise.

Definition at line 78 of file modbus_msg_operation_mode_wrapper.h.

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

autogenerated on Thu Jul 22 2021 02:10:35