RUI3 (RAK Unified Interface 3) - RAK4631

Public Member Functions

bool get ()
 
bool set (bool value)
 

Detailed Description

Description
This api allows the user to access the adaptive data rate
Note
The default value of the ADR is 1 (enabled)

Member Function Documentation

◆ get()

bool get ( )
Description
This api allows the user to get the adaptive data rate
Syntax
api.lorawan.adr.get()
Returns
bool
Return values
TRUE: enable adaptive data rate
FALSE: disable adaptive data rate
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set adaptive data rate %s\r\n", api.lorawan.adr.set(1) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("Adaptive data rate is  %s\r\n", api.lorawan.adr.get() ? "Enable" : "Disable");
      delay(1000);
  }

◆ set()

bool set ( bool  value)
Description
This api allows the user to set the adaptive data rate
Syntax
api.lorawan.adr.set(value)
Parameters
valuethe status of adaptive data rate
Returns
bool
Return values
TRUEfor setting status of adr success
FALSEfor setting status of adr failure
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set adaptive data rate %s\r\n", api.lorawan.adr.set(1) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("Adaptive data rate is  %s\r\n", api.lorawan.adr.get() ? "Enable" : "Disable");
      delay(1000);
  }