|
| constexpr uint16_t | tt::tt5_code (uint16_t page, uint16_t prefix, uint16_t value) |
| | Create a tt5_code.
|
| |
| constexpr uint16_t | tt::tt5_code_table_generate_entry (uint8_t c) noexcept |
| | Convert a unicode character to a tt5-code.
|
| |
|
constexpr auto | tt::tt5_code_table_generator () noexcept |
| |
|
constexpr uint64_t | tt::tt5_code_from_char (uint8_t c) noexcept |
| |
|
template<typename T > |
| constexpr ssize_t | tt::tt5_add_code (T &r, uint16_t code) noexcept |
| |
| constexpr bool | tt::tt5_want_to_lock (uint64_t ring) noexcept |
| | Check if we want to use the lock command.
|
| |
| template<typename T > |
| constexpr T | tt::tt5_encode (char const *str) |
| | Encode a UTF-8 string into an integer using TT5-encoding.
|
| |
| template<typename T > |
| constexpr T | tt::tt5_encode (std::string const &s) |
| | Encode a UTF-8 string into an integer using TT5-encoding.
|
| |
| template<typename T > |
| constexpr T | tt::tt5_reverse (T value) noexcept |
| | Reverse the character in a TT5-packet-integer.
|
| |
|
constexpr uint8_t | tt::char_from_tt5_page0 (char *&str, uint8_t code, uint8_t locked_page) noexcept |
| |
|
constexpr uint8_t | tt::char_from_tt5_page1 (char *&str, uint8_t code, uint8_t locked_page) noexcept |
| |
|
constexpr uint8_t | tt::char_from_tt5_page2 (char *&str, uint8_t code, uint8_t &locked_page) noexcept |
| |
|
constexpr uint8_t | tt::char_from_tt5_binary (char *&str, uint8_t code, uint8_t locked_page, uint8_t high_bits) noexcept |
| |
| template<typename T > |
| constexpr void | tt::fill_buffer_from_tt5 (char *str, T const &value) noexcept |
| | Convert a tt5 value to a string.
|
| |
| template<typename T > |
| std::string | tt::tt5_decode (T const &value) noexcept |
| | Decode a TT5-packed integer into a UTF-8 string.
|
| |
| constexpr auto | tt::operator""_tt5 (char const *str, size_t) noexcept |
| |
| constexpr auto | tt::operator""_tt5_64 (char const *str, size_t) noexcept |
| |
| constexpr auto | tt::operator""_tt5_128 (char const *str, size_t) noexcept |
| |
TT5 A 5 bit code designed for encoding identifiers.
| # | P0 | P1 | P2 |
| 00 | NUL | NUL | NUL |
| 01 | a | A | 0 |
| 02 | b | B | 1 |
| 03 | c | C | 2 |
| 04 | d | D | 3 |
| 05 | e | E | 4 |
| 06 | f | F | 5 |
| 07 | g | G | 6 |
| 08 | h | H | 7 |
| 09 | i | I | 8 |
| 0a | j | J | 9 |
| 0b | k | K | , |
| 0c | l | L | : |
| 0d | m | M | ; |
| 0e | n | M | / |
| 0f | o | O | LF |
| 10 | p | P | B0 |
| 11 | q | Q | B1 |
| 12 | r | R | B2 |
| 13 | s | S | B3 |
| 14 | t | T | B4 |
| 15 | u | U | B5 |
| 16 | v | V | B6 |
| 17 | w | W | B7 |
| 18 | x | X | L0 |
| 19 | y | Y | L1 |
| 1a | z | Z | L2 |
| 1b | _ | _ | _ |
| 1c | . | . | . |
| 1d | - | - | - |
| 1e | S1 | S0 | S0 |
| 1f | S2 | S2 | S1 |
Pages
There are three pages. The current- and locked page is page 0 at the start of the text.
By using the commands S0, S1 or S2 you can temporarilly switch the current page until a single character is emited, afterwards the current page is switched back to the locked page.
By using the command L0, L1 or L2 you can change the current- and locked page.
Binary
The page 2 commands B* are used to emit a single byte. The lower 3 bits of the B* command are used as the high 3-bits of the byte and the next 5 bits are used for the lower 5 bits of the byte.
End of text
End of text is denoted by the NUL character or when there is no more room in the integer that contains the text.