RUI3 (RAK Unified Interface 3) - RAK4631
alias

Functions

bool set (char *buf, uint32_t len)
 
bool get (char *buf, uint32_t len)
 

Detailed Description

Function Documentation

◆ set()

bool set ( char *  buf,
uint32_t  len 
)
Description
Set the alias name for device.
Syntax
api.system.alias.set(buf, len)
Parameters
bufthe buffer to set alias name
lenthe length of alias name( <= 16 bytes)
Returns
bool
Return values
TRUEfor setting alias name successfully
FALSEfor setting alias name failure
Example
     void setup()
     {
         Serial.begin(115200);
         api.system.alias.set("my device",16);
         char buf[16];
         Serial.println(api.system.alias.get(buf,16));
         Serial.println(buf);
     }
     void loop()
     {
     }

◆ get()

bool get ( char *  buf,
uint32_t  len 
)
Description
Set the alias name for device.
Syntax
api.system.alias.get(buf, len)
Parameters
bufthe buffer to get alias name
lenthe length of alias name( <= 16 bytes)
Returns
bool
Return values
TRUEfor getting alias name successfully
FALSEfor getting alias name failure
Example
     void setup()
     {
         Serial.begin(115200);
         api.system.alias.set("my device",16);
         char buf[16];
         Serial.println(api.system.alias.get(buf,16));
         Serial.println(buf);
     }
     void loop()
     {
     }