![]() |
RUI3 (RAK Unified Interface 3) - RAK4631
|
Public Member Functions | |
uint8_t | get () |
bool | set (uint8_t value) |
uint8_t get | ( | ) |
0 | Class A |
1 | Class B |
2 | Class C |
void setup() { Serial.begin(115200); Serial.printf("Set device class to Class_A %s\r\n", api.lorawan.deviceClass.set(RAK_LORA_CLASS_A) ? "Success" : "Fail"); } void loop() { switch(api.lorawan.deviceClass.get()) { case 0: Serial.println("Device is in Class A"); break; case 1: Serial.println("Device is in Class B"); break; case 2: Serial.println("Device is in Class C"); break; } delay(1000); }
bool set | ( | uint8_t | value | ) |
value | the LoRaWan class |
TRUE | for setting LoRaWan class success |
FALSE | for setting LoRaWan class failure |
void setup() { Serial.begin(115200); Serial.printf("Set device class to Class_A %s\r\n", api.lorawan.deviceClass.set(RAK_LORA_CLASS_A) ? "Success" : "Fail"); } void loop() { switch(api.lorawan.deviceClass.get()) { case 0: Serial.println("Device is in Class A"); break; case 1: Serial.println("Device is in Class B"); break; case 2: Serial.println("Device is in Class C"); break; } delay(1000); }