30 , update_run_permitted_(
std::move(update_run_permitted_func))
40 ROS_ERROR(
"A disconnect from the modbus server happend.");
58 std::ostringstream os;
59 os <<
"Received Modbus message of unsupported API Version: "
const ModbusApiSpec api_spec_
void modbusMsgCallback(const ModbusMsgInStampedConstPtr &msg_raw)
Called whenever a new modbus messages arrives.
Wrapper class to add semantic to a raw ModbusMsgInStamped.
unsigned int getVersion() const
virtual void checkStructuralIntegrity() const override
Calls ModbusMsgWrapper::checkStructuralIntegrity().
bool getRunPermitted() const
Get the RUN_PERMITTED from the Modbus message.
ModbusAdapterRunPermitted(UpdateRunPermittedFunc &&update_run_permitted_func, const ModbusApiSpec &api_spec)
std::function< void(const bool)> UpdateRunPermittedFunc
bool isDisconnect() const
Check if the Modbus message informs about a disconnect from the server.
UpdateRunPermittedFunc update_run_permitted_
static constexpr unsigned int MODBUS_API_VERSION_REQUIRED
Expection thrown upon construction of ModbusMsgWrapperBase of the message does not contain the requir...
#define ROS_ERROR_STREAM(args)
Specifies the meaning of the holding registers.