17 #ifndef MODBUS_MSG_OPERATION_MODE_WRAPPER_H 18 #define MODBUS_MSG_OPERATION_MODE_WRAPPER_H 20 #include <prbt_hardware_support/ModbusMsgInStamped.h> 21 #include <prbt_hardware_support/OperationModes.h> 86 return OperationModes::UNKNOWN;
88 return OperationModes::T1;
90 return OperationModes::T2;
92 return OperationModes::AUTO;
94 return OperationModes::UNKNOWN;
100 OperationModes op_mode;
118 #endif // MODBUS_MSG_OPERATION_MODE_WRAPPER_H const ModbusApiSpec & getApiSpec() const
virtual void checkStructuralIntegrity() const override
Calls ModbusMsgWrapper::checkStructuralIntegrity().
uint16_t getRegister(uint32_t reg) const
virtual void checkStructuralIntegrity() const
Checks that the Modbus messages consists of all registers needed.
bool hasRegister(uint32_t reg) const
Check if a certain holding register is define in the Modbus message.
static const std::string OPERATION_MODE
Expection thrown upon construction of ModbusMsgOperationModeWrapper of the message does not contain t...
int8_t getOperationMode() const
Get the operation mode field from the Modbus message.
OperationModes getTimeStampedOperationMode() const
bool hasOperationMode() const
Check if the message contains a operation mode definition.
Wrapper class to add semantic to a raw ModbusMsgInStamped.
const ros::Time & getTimeStamp() const
ModbusMsgOperationModeWrapper(const ModbusMsgInStampedConstPtr &modbus_msg_raw, const ModbusApiSpec &api_spec)
Wrapper class to add semantic to a raw ModbusMsgInStamped.
Specifies the meaning of the holding registers.