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

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

#include <modbus_adapter_sto.h>

Public Member Functions

 ModbusAdapterSto (UpdateStoFunc &&update_sto_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_
 
UpdateStoFunc update_sto_
 

Static Private Attributes

static constexpr unsigned int MODBUS_API_VERSION_REQUIRED {2}
 

Detailed Description

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

Definition at line 37 of file modbus_adapter_sto.h.

Constructor & Destructor Documentation

◆ ModbusAdapterSto()

prbt_hardware_support::ModbusAdapterSto::ModbusAdapterSto ( UpdateStoFunc &&  update_sto_func,
const ModbusApiSpec api_spec 
)

Definition at line 27 of file modbus_adapter_sto.cpp.

Member Function Documentation

◆ modbusMsgCallback()

void prbt_hardware_support::ModbusAdapterSto::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 STO state changes to false.

Definition at line 34 of file modbus_adapter_sto.cpp.

Member Data Documentation

◆ api_spec_

const ModbusApiSpec prbt_hardware_support::ModbusAdapterSto::api_spec_
private

Definition at line 59 of file modbus_adapter_sto.h.

◆ MODBUS_API_VERSION_REQUIRED

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

Definition at line 63 of file modbus_adapter_sto.h.

◆ update_sto_

UpdateStoFunc prbt_hardware_support::ModbusAdapterSto::update_sto_
private

Definition at line 60 of file modbus_adapter_sto.h.


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


prbt_hardware_support
Author(s):
autogenerated on Tue Feb 25 2020 03:19:31