RUI3 (RAK Unified Interface 3) - RAK4631

Public Member Functions

bool get ()
 
bool set (uint8_t dutyCycle)
 

Detailed Description

Description
This api allows the user to access the duty cycle parameter

Member Function Documentation

◆ get()

bool get ( )
Description
This api allows the user to get the duty cycle parameter
Syntax
api.lorawan.dcs.get()
Returns
bool
Return values
TRUE: enable duty cycle
FALSE: disable duty cycle
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Enable duty cycle  %s\r\n", api.lorawan.dcs.set(1) ? "Success" : "Fail");
  }

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

◆ set()

bool set ( uint8_t  dutyCycle)
Description
This api allows the user to set the duty cycle paramter
Syntax
api.lorawan.dcs.set(dutyCycle)
Parameters
dutyCyclethe LoRaWan duty cycle
Returns
bool
Return values
TRUEfor setting duty cycle success
FALSEfor setting duty cycle failure
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Enable duty cycle  %s\r\n", api.lorawan.dcs.set(1) ? "Success" : "Fail");
  }

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