RUI3 (RAK Unified Interface 3) - RAK4631
RAKLorawan::pbw

Public Member Functions

uint32_t get ()
 
bool set (uint32_t value)
 

Detailed Description

Description
This api provides configuration Bandwidth for the P2P mode

Member Function Documentation

◆ get()

uint32_t get ( )
Description
This api allows to get P2P Bandwidth(125,250,500) Note:This API will be deleted in the future
Syntax
api.lorawan.pbw.get()
Returns
The P2P bandwidth
Example
void setup()
{
    Serial.begin(115200);

    Serial.printf("Set Node device work mode %s\r\n", api.lorawan.nwm.set(0) ? "Success" : "Fail");
    Serial.printf("Set P2P mode bandwidth %s\r\n", api.lorawan.pbw.set(125) ? "Success" : "Fail");
}

void loop()
{
    Serial.printf("P2P mode bandwith = %d\r\n", api.lorawan.pbw.get());

    delay(1000);
}

◆ set()

bool set ( uint32_t  value)
Description
This api allow to set P2P Bandwidth(125,250,500) Note:This API will be deleted in the future
Syntax
api.lorawan.pbw.set(value)
Parameters
valuethe P2P bandwidth
Returns
bool
Return values
TRUEfor setting P2P bandwidth success
FALSEfor setting P2P bandwidth failure
Example
  void setup()
  {
      Serial.begin(115200);

      Serial.printf("Set Node device work mode %s\r\n", api.lorawan.nwm.set(0) ? "Success" : "Fail");
      Serial.printf("Set P2P mode bandwidth %s\r\n", api.lorawan.pbw.set(125) ? "Success" : "Fail");
  }

  void loop()
  {
      Serial.printf("P2P mode bandwith = %d\r\n", api.lorawan.pbw.get());

      delay(1000);
  }