template_pkg  1.0.0
A template ROS2 Package
Loading...
Searching...
No Matches
roship_io::modbus::Block Class Referenceabstract

#include <block.hpp>

Public Member Functions

virtual primitives::WordBuffer buffer ()=0
 serialize makes sure the buffer is ready to go and then returns a primitives::WordBuffer.
 
virtual size_t size ()=0
 size computes the size of the block in WORDS
 
virtual int modbusAddress ()=0
 writeAddress returns the address of the block if you want to write the values to the device
 
virtual std::string hexString ()
 hexString returns the buffer as a hex string, usefull for debugging
 

Public Attributes

std::shared_ptr< BlockSharedPtr
 

Member Function Documentation

◆ buffer()

virtual primitives::WordBuffer roship_io::modbus::Block::buffer ( )
pure virtual

serialize makes sure the buffer is ready to go and then returns a primitives::WordBuffer.

Returns
a primitives::WordBuffer ready for modbus

◆ hexString()

virtual std::string roship_io::modbus::Block::hexString ( )
inlinevirtual

hexString returns the buffer as a hex string, usefull for debugging

Returns
a std::string representing the buffer as hex

◆ modbusAddress()

virtual int roship_io::modbus::Block::modbusAddress ( )
pure virtual

writeAddress returns the address of the block if you want to write the values to the device

Returns

◆ size()

virtual size_t roship_io::modbus::Block::size ( )
pure virtual

size computes the size of the block in WORDS

Returns
the size of the block in words

Member Data Documentation

◆ SharedPtr

std::shared_ptr<Block> roship_io::modbus::Block::SharedPtr

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