2022-09-13 19:45:36 +00:00
|
|
|
#ifndef ProgramOptions_HELPERCLASSES_HPP
|
|
|
|
#define ProgramOptions_HELPERCLASSES_HPP
|
|
|
|
|
2022-09-20 19:11:42 +00:00
|
|
|
#include <string>
|
2022-09-13 19:45:36 +00:00
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
|
|
|
|
typedef union {
|
|
|
|
uint8_t e8[8]; /* lower 64-bit address */
|
2022-09-20 19:11:42 +00:00
|
|
|
uint8_t e32[2];
|
2022-09-13 19:45:36 +00:00
|
|
|
} eui64_t;
|
|
|
|
|
|
|
|
|
2022-09-20 19:11:42 +00:00
|
|
|
typedef uint8_t devkey_t[16];
|
|
|
|
|
|
|
|
|
2022-09-13 19:45:36 +00:00
|
|
|
/* Define a completely non-sensical class. */
|
|
|
|
class magic_number {
|
|
|
|
|
|
|
|
public:
|
|
|
|
magic_number(int n) : n(n) {}
|
|
|
|
int n;
|
|
|
|
};
|
|
|
|
|
2022-09-20 19:11:42 +00:00
|
|
|
|
2022-09-13 19:45:36 +00:00
|
|
|
class appeui {
|
|
|
|
|
|
|
|
public:
|
2022-09-20 19:11:42 +00:00
|
|
|
appeui(std::string appeui_hexstring);
|
2022-09-13 19:45:36 +00:00
|
|
|
eui64_t application_eui64;
|
2022-09-20 19:11:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class deveui {
|
|
|
|
|
|
|
|
public:
|
|
|
|
deveui(std::string deveui_hexstring);
|
|
|
|
eui64_t device_eui64;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class devkey {
|
|
|
|
|
|
|
|
public:
|
|
|
|
devkey(std::string devkey_hexstring);
|
|
|
|
devkey_t device_key;
|
|
|
|
};
|
2022-09-13 19:45:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|