Public Member Functions | Private Attributes | Static Private Attributes | List of all members
prbt_hardware_support::ModbusAdapterRunPermitted Class Reference

Listens to the modbus_read topic and reacts to updated RUN_PERMITTED states. More...

#include <modbus_adapter_run_permitted.h>

Public Member Functions

 ModbusAdapterRunPermitted (UpdateRunPermittedFunc &&update_run_permitted_func, const ModbusApiSpec &api_spec)
 
void modbusMsgCallback (const ModbusMsgInStampedConstPtr &msg_raw)
 Called whenever a new modbus messages arrives. More...
 

Private Attributes

const ModbusApiSpec api_spec_
 
UpdateRunPermittedFunc update_run_permitted_
 

Static Private Attributes

static constexpr unsigned int MODBUS_API_VERSION_REQUIRED {2}
 

Detailed Description

Listens to the modbus_read topic and reacts to updated RUN_PERMITTED states.

Definition at line 37 of file modbus_adapter_run_permitted.h.

Constructor & Destructor Documentation

prbt_hardware_support::ModbusAdapterRunPermitted::ModbusAdapterRunPermitted ( UpdateRunPermittedFunc &&  update_run_permitted_func,
const ModbusApiSpec api_spec 
)

Definition at line 27 of file modbus_adapter_run_permitted.cpp.

Member Function Documentation

void prbt_hardware_support::ModbusAdapterRunPermitted::modbusMsgCallback ( const ModbusMsgInStampedConstPtr &  msg_raw)

Called whenever a new modbus messages arrives.

Note
Filters like for example the UpdateFilter can restrict the number of incoming messages.
A STOP1 is triggered in case:
  • of a disconnect from the modbus server,
  • the modbus message does not contain the expected registers,
  • the modbus API version is incorrect,
  • the RUN_PERMITTED state changes to false.

Definition at line 34 of file modbus_adapter_run_permitted.cpp.

Member Data Documentation

const ModbusApiSpec prbt_hardware_support::ModbusAdapterRunPermitted::api_spec_
private

Definition at line 59 of file modbus_adapter_run_permitted.h.

constexpr unsigned int prbt_hardware_support::ModbusAdapterRunPermitted::MODBUS_API_VERSION_REQUIRED {2}
staticprivate

Definition at line 63 of file modbus_adapter_run_permitted.h.

UpdateRunPermittedFunc prbt_hardware_support::ModbusAdapterRunPermitted::update_run_permitted_
private

Definition at line 60 of file modbus_adapter_run_permitted.h.


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


prbt_hardware_support
Author(s):
autogenerated on Tue Feb 2 2021 03:50:18