RUI3 (RAK Unified Interface 3) - RAK4631

Public Member Functions

uint8_t get ()
 
bool set (uint8_t value)
 

Detailed Description

Description
This api allows the user to access the data rate of received window 2

Member Function Documentation

◆ get()

uint8_t get ( )
Description
This api allows the user to get the data rate of received window 2
Syntax
api.lorawan.rx2dr.get()
Returns
the data rate of received window 2
Example
void setup()
{
    Serial.begin(115200);

    Serial.printf("Set the data rate of received window 2 %s\r\n", api.lorawan.rx2dr.set(5) ? "Success" : "Fail");
}

void loop()
{
    Serial.printf("The data rate of received window 2 is %d\r\n", api.lorawan.rx2dr.get());
    delay(1000);
}

◆ set()

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

      Serial.printf("Set the data rate of received window 2 %s\r\n", api.lorawan.rx2dr.set(5) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("The data rate of received window 2 is %d\r\n", api.lorawan.rx2dr.get());
      delay(1000);
  }