Public Member Functions | Private Member Functions | Static Private Member Functions | 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

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_

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 32 of file modbus_adapter_operation_mode.cpp.

◆ ~ModbusAdapterOperationMode()

virtual prbt_hardware_support::ModbusAdapterOperationMode::~ModbusAdapterOperationMode ( )

Member Function Documentation

◆ createUnknownOperationMode()

OperationModes prbt_hardware_support::ModbusAdapterOperationMode::createUnknownOperationMode ( )

Definition at line 39 of file modbus_adapter_operation_mode.cpp.

◆ modbusMsgCallback()

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

Called whenever a new modbus messages arrives.

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 47 of file modbus_adapter_operation_mode.cpp.

Member Data Documentation

◆ api_spec_

const ModbusApiSpec prbt_hardware_support::ModbusAdapterOperationMode::api_spec_

Definition at line 61 of file modbus_adapter_operation_mode.h.

◆ filter_pipeline_

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

Definition at line 62 of file modbus_adapter_operation_mode.h.

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

autogenerated on Mon Oct 19 2020 03:15:58