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

Public Member Functions

uint16_t get ()
 
bool set (uint16_t value)
 

Detailed Description

Description
This api provides configuration Preamble Length for the P2P mode Note:This API will be deleted in the future

Member Function Documentation

◆ get()

uint16_t get ( )
Description
This api allows to get P2P Preamble Length (2-65535)
Syntax
api.lorawan.ppl.get()

The Preamble length

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 preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail");
}

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

    delay(1000);
}

◆ set()

bool set ( uint16_t  value)
Description
This api allows to set P2P Preamble Length (2-65535) Note:This API will be deleted in the future
Syntax
api.lorawan.ppl.set(value)
Parameters
valuethe P2P preamble length(2-65536)
Returns
bool
Return values
TRUEfor setting P2P preamble length success
FALSEfor setting preamble length 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 preamble length %s\r\n", api.lorawan.ppl.set(8) ? "Success" : "Fail");
  }

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

      delay(1000);
  }