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

Listens to the modbus_read topic and offers a service informing about the active operation mode. More...

#include <modbus_adapter_operation_mode.h>

Inheritance diagram for prbt_hardware_support::ModbusAdapterOperationMode:
Inheritance graph
[legend]

Public Member Functions

 ModbusAdapterOperationMode (ros::NodeHandle &nh, const ModbusApiSpec &api_spec)
 
virtual ~ModbusAdapterOperationMode ()=default
 
- Public Member Functions inherited from prbt_hardware_support::AdapterOperationMode
 AdapterOperationMode (ros::NodeHandle &nh)
 
virtual ~AdapterOperationMode ()=default
 

Private Member Functions

void modbusMsgCallback (const ModbusMsgInStampedConstPtr &msg_raw)
 Called whenever a new modbus messages arrives. More...
 

Static Private Member Functions

static OperationModes createUnknownOperationMode ()
 

Private Attributes

const ModbusApiSpec api_spec_
 
std::unique_ptr< FilterPipelinefilter_pipeline_
 

Static Private Attributes

static constexpr unsigned int MODBUS_API_VERSION_REQUIRED { 2 }
 

Additional Inherited Members

- Protected Member Functions inherited from prbt_hardware_support::AdapterOperationMode
void updateOperationMode (const OperationModes &mode)
 Stores the operation mode and publishes it, if it has changed. More...
 

Detailed Description

Listens to the modbus_read topic and offers a service informing about the active operation mode.

Definition at line 37 of file modbus_adapter_operation_mode.h.

Constructor & Destructor Documentation

◆ ModbusAdapterOperationMode()

prbt_hardware_support::ModbusAdapterOperationMode::ModbusAdapterOperationMode ( ros::NodeHandle nh,
const ModbusApiSpec api_spec 
)

Definition at line 29 of file modbus_adapter_operation_mode.cpp.

◆ ~ModbusAdapterOperationMode()

virtual prbt_hardware_support::ModbusAdapterOperationMode::~ModbusAdapterOperationMode ( )
virtualdefault

Member Function Documentation

◆ createUnknownOperationMode()

OperationModes prbt_hardware_support::ModbusAdapterOperationMode::createUnknownOperationMode ( )
staticprivate

Definition at line 36 of file modbus_adapter_operation_mode.cpp.

◆ modbusMsgCallback()

void prbt_hardware_support::ModbusAdapterOperationMode::modbusMsgCallback ( const ModbusMsgInStampedConstPtr &  msg_raw)
private

Called whenever a new modbus messages arrives.

Note
Filters like for example the UpdateFilter can restrict the number of incoming messages.
The operation mode gets unknown in case:
  • of a disconnect from the modbus server,
  • the modbus message does not contain the expected registers,
  • the modbus API version is incorrect.

Definition at line 44 of file modbus_adapter_operation_mode.cpp.

Member Data Documentation

◆ api_spec_

const ModbusApiSpec prbt_hardware_support::ModbusAdapterOperationMode::api_spec_
private

Definition at line 61 of file modbus_adapter_operation_mode.h.

◆ filter_pipeline_

std::unique_ptr<FilterPipeline> prbt_hardware_support::ModbusAdapterOperationMode::filter_pipeline_
private

Definition at line 62 of file modbus_adapter_operation_mode.h.

◆ MODBUS_API_VERSION_REQUIRED

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

Definition at line 65 of file modbus_adapter_operation_mode.h.


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


prbt_hardware_support
Author(s):
autogenerated on Thu May 28 2020 03:13:50