modbuspp  1.1.40
C++ wrapper for the libmodbus library
Modbus::SlaveReport< T, e > Class Template Reference

For storing and manipulate server identifier datas returns by the MODBUS 17 function. More...

#include <slavereport.h>

Public Member Functions

std::string data () const
 Additional Data. More...
 
id () const
 Server ID. More...
 
uint16_t size () const
 number of bytes stored in the underlying array.
 
 SlaveReport ()
 Default constructor.
 
bool status () const
 Run Indicator Status. More...
 

Detailed Description

template<typename T, Endian e = EndianBig>
class Modbus::SlaveReport< T, e >

For storing and manipulate server identifier datas returns by the MODBUS 17 function.

Examples:
master/report-slave-id/main.cpp.

Member Function Documentation

◆ data()

template<typename T, Endian e = EndianBig>
std::string Modbus::SlaveReport< T, e >::data ( ) const
inline

Additional Data.

Returns

◆ id()

template<typename T, Endian e = EndianBig>
T Modbus::SlaveReport< T, e >::id ( ) const
inline

Server ID.

Returns
the returned value is of type T which depends on the device

References Modbus::EndianBigBig, Modbus::EndianBigLittle, Modbus::EndianLittleBig, and Modbus::EndianLittleLittle.

◆ status()

template<typename T, Endian e = EndianBig>
bool Modbus::SlaveReport< T, e >::status ( ) const
inline

Run Indicator Status.

Returns
true if ON.