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)
ModbusMsgInBuildersetRunPermitted (const uint16_t run_permitted)

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 intended for usage in tests.

Definition at line 37 of file modbus_msg_in_builder.h.

Constructor & Destructor Documentation

◆ ModbusMsgInBuilder()

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

Definition at line 26 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 30 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 

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

Definition at line 65 of file modbus_msg_in_builder.cpp.

◆ setApiVersion()

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

Definition at line 81 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 

Definition at line 48 of file modbus_msg_in_builder.cpp.

◆ setOperationMode()

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

Definition at line 75 of file modbus_msg_in_builder.h.

◆ setRegister()

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

Definition at line 87 of file modbus_msg_in_builder.h.

◆ setRunPermitted()

ModbusMsgInBuilder & prbt_hardware_support::ModbusMsgInBuilder::setRunPermitted ( const uint16_t  run_permitted)

Definition at line 69 of file modbus_msg_in_builder.h.

Member Data Documentation

◆ api_spec_

const ModbusApiSpec prbt_hardware_support::ModbusMsgInBuilder::api_spec_

Definition at line 64 of file modbus_msg_in_builder.h.

◆ register_values_

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

Definition at line 65 of file modbus_msg_in_builder.h.

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

autogenerated on Mon Oct 19 2020 03:15:58