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

Public Member Functions

uint8_t get ()
 
bool set (uint8_t value)
 

Detailed Description

Description
This api provides a configuration Spreading Factor for the P2P mode Note:This API will be deleted in the future

Member Function Documentation

◆ get()

uint8_t get ( )
Description
This api allows to get P2P Spreading Factor (6,7, 8,9, 10, 11, 12)
Syntax
api.lorawan.psf.get()
Returns
The P2P spreading factor
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 spreading factor %s\r\n", api.lorawan.psf.set(12) ? "Success" : "Fail");
}

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

    delay(1000);
}

◆ set()

bool set ( uint8_t  value)
Description
This api allows to set P2P Spreading Factor (6,7, 8,9, 10, 11, 12) Note:This API will be deleted in the future
Syntax
api.lorawan.psf.set(value)
Parameters
valuethe P2P spreading factor
Returns
bool
Return values
TRUEfor setting P2P spreading factor success
FALSEfor setting P2P spreading factor 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 spreading factor %s\r\n", api.lorawan.psf.set(12) ? "Success" : "Fail");
  }

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

      delay(1000);
  }