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

Help on construction for ModbusMsgIn Messages. More...

#include <modbus_msg_in_builder.h>

Public Member Functions

ModbusMsgInStampedPtr build (const ros::Time &time) const
 
 ModbusMsgInBuilder (const ModbusApiSpec &api_spec)
 
ModbusMsgInBuildersetApiVersion (const uint16_t version)
 
ModbusMsgInBuildersetOperationMode (const uint16_t mode)
 
void setRegister (const unsigned int register_n, const uint16_t value)
 
ModbusMsgInBuildersetSto (const uint16_t sto)
 

Static Public Member Functions

static ModbusMsgInStampedPtr createDefaultModbusMsgIn (const std_msgs::MultiArrayLayout::_data_offset_type &offset, const RegCont &holding_register)
 Creates a standard ModbusMsgIn which contains default values for all essential elements of the message. More...
 
static void setDefaultLayout (std_msgs::MultiArrayLayout *layout, const std_msgs::MultiArrayLayout::_data_offset_type &offset, const RegCont::size_type &size)
 

Private Attributes

const ModbusApiSpec api_spec_
 
std::map< unsigned int, uint16_t > register_values_
 

Detailed Description

Help on construction for ModbusMsgIn Messages.

Mainly intented for usage in tests.

Definition at line 38 of file modbus_msg_in_builder.h.

Constructor & Destructor Documentation

◆ ModbusMsgInBuilder()

prbt_hardware_support::ModbusMsgInBuilder::ModbusMsgInBuilder ( const ModbusApiSpec api_spec)

Definition at line 27 of file modbus_msg_in_builder.cpp.

Member Function Documentation

◆ build()

ModbusMsgInStampedPtr prbt_hardware_support::ModbusMsgInBuilder::build ( const ros::Time time) const

Definition at line 32 of file modbus_msg_in_builder.cpp.

◆ createDefaultModbusMsgIn()

ModbusMsgInStampedPtr prbt_hardware_support::ModbusMsgInBuilder::createDefaultModbusMsgIn ( const std_msgs::MultiArrayLayout::_data_offset_type &  offset,
const RegCont holding_register 
)
static

Creates a standard ModbusMsgIn which contains default values for all essential elements of the message.

Definition at line 66 of file modbus_msg_in_builder.cpp.

◆ setApiVersion()

ModbusMsgInBuilder & prbt_hardware_support::ModbusMsgInBuilder::setApiVersion ( const uint16_t  version)
inline

Definition at line 83 of file modbus_msg_in_builder.h.

◆ setDefaultLayout()

void prbt_hardware_support::ModbusMsgInBuilder::setDefaultLayout ( std_msgs::MultiArrayLayout *  layout,
const std_msgs::MultiArrayLayout::_data_offset_type &  offset,
const RegCont::size_type &  size 
)
static

Definition at line 50 of file modbus_msg_in_builder.cpp.

◆ setOperationMode()

ModbusMsgInBuilder & prbt_hardware_support::ModbusMsgInBuilder::setOperationMode ( const uint16_t  mode)
inline

Definition at line 77 of file modbus_msg_in_builder.h.

◆ setRegister()

void prbt_hardware_support::ModbusMsgInBuilder::setRegister ( const unsigned int  register_n,
const uint16_t  value 
)
inline

Definition at line 89 of file modbus_msg_in_builder.h.

◆ setSto()

ModbusMsgInBuilder & prbt_hardware_support::ModbusMsgInBuilder::setSto ( const uint16_t  sto)
inline

Definition at line 71 of file modbus_msg_in_builder.h.

Member Data Documentation

◆ api_spec_

const ModbusApiSpec prbt_hardware_support::ModbusMsgInBuilder::api_spec_
private

Definition at line 66 of file modbus_msg_in_builder.h.

◆ register_values_

std::map<unsigned int, uint16_t> prbt_hardware_support::ModbusMsgInBuilder::register_values_
private

Definition at line 67 of file modbus_msg_in_builder.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