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 public network mode

Member Function Documentation

◆ get()

bool get ( )
Description
This api allows the user to get the public network mode
Syntax
api.lorawan.pnm.get()
Returns
bool
Return values
TRUE: On
FALSE: Off
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set the public network mode  %s\r\n", api.lorawan.pnm.set(1) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("The public network mode is  %d\r\n", api.lorawan.pnm.get() ? "On" : "Off");
      delay(1000);
  }

◆ set()

bool set ( bool  value)
Description
This api allows the user to set the public network mode
Syntax
api.lorawan.pnm.set(value)
Parameters
valuethe public network mode
Returns
bool
Return values
TRUEfor setting public network mode success
FALSEfor setting public network mode failure
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set the public network mode  %s\r\n", api.lorawan.pnm.set(1) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("The public network mode is  %d\r\n", api.lorawan.pnm.get() ? "On" : "Off");
      delay(1000);
  }