Modbus-Radio
ModbusRadio

Modbus over-the-air for devices supported by the RadioHead library. More...

Inherits Modbus.

Public Member Functions

 ModbusRadio (byte slaveId)
 Constructor.
 
void config (RHGenericDriver &radio)
 Configure ModbusRadio object. More...
 
void task ()
 Task that performs all operations on MODBUS. More...
 
void setSlaveId (byte slaveId)
 Change the value of slave identifier. More...
 
byte getSlaveId () const
 Return slave identifier.
 

Static Public Attributes

static const byte BroadcastAddress = 0
 Broadcast address.
 

Detailed Description

Modbus over-the-air for devices supported by the RadioHead library.

Member Function Documentation

◆ config()

void ModbusRadio::config ( RHGenericDriver &  radio)

Configure ModbusRadio object.

Warning
the init() function of the radio passed must be called BEFORE calling this function.
Parameters
radioreference to the radio object

◆ setSlaveId()

void ModbusRadio::setSlaveId ( byte  slaveId)
inline

Change the value of slave identifier.

Parameters
slaveIdidentifier 1-247

◆ task()

void ModbusRadio::task ( )

Task that performs all operations on MODBUS.

Call once inside loop(), all magic here !