RadioLib
Universal wireless communication library for Arduino
Loading...
Searching...
No Matches
ITA2String.h
1#if !defined(_RADIOLIB_ITA2_STRING_H)
2#define _RADIOLIB_ITA2_STRING_H
3
4#include "../../TypeDef.h"
5
6#define RADIOLIB_ITA2_FIGS 0x1B
7#define RADIOLIB_ITA2_LTRS 0x1F
8#define RADIOLIB_ITA2_LENGTH 32
9
15 public:
20 explicit ITA2String(char c);
21
26 explicit ITA2String(const char* str);
27
32 ITA2String(const ITA2String& ita2);
33
38 ITA2String& operator=(const ITA2String& ita2);
39
44
49 size_t length();
50
56 uint8_t* byteArr();
57
58#if !RADIOLIB_GODMODE
59 private:
60#endif
61 #if RADIOLIB_STATIC_ONLY
62 char strAscii[RADIOLIB_STATIC_ARRAY_SIZE];
63 #else
64 char* strAscii;
65 #endif
66 size_t asciiLen;
67 size_t ita2Len;
68
69 static uint16_t getBits(char c);
70};
71
72#endif
ITA2-encoded string.
Definition ITA2String.h:14
uint8_t * byteArr()
Gets the ITA2 representation of the ASCII string set in constructor.
Definition ITA2String.cpp:72
size_t length()
Gets the length of the ITA2 string. This number is not the same as the length of ASCII-encoded string...
Definition ITA2String.cpp:60
ITA2String & operator=(const ITA2String &ita2)
Overload for assignment operator.
Definition ITA2String.cpp:42
~ITA2String()
Default destructor.
Definition ITA2String.cpp:54