just save

This commit is contained in:
2024-06-13 17:23:47 +02:00
parent 34fbefc138
commit 4e783ee6fd
10 changed files with 4060 additions and 19 deletions
+30
View File
@@ -0,0 +1,30 @@
#ifndef TERMINAL_UTILS_H_INCLUDED
#define TERMINAL_UTILS_H_INCLUDED
#include <cinttypes>
#include <QByteArray>
namespace TU {
enum STATUS : uint8_t {
TERMINAL_CB2_KEYS_NOT_PRESENT = 0x30,
TERMINAL_NO_BANKING_PARAMETERS_PRESENT = 0x31,
TERMINAL_IS_BLOCKED = 0x32,
TERMINAL_NOT_OPERATIVE = 0x33,
TERMINAL_IS_READY_AND_ACTIVE = 0x34,
TERMINAL_IS_READY_AND_NOT_ACTIVE = 0x35,
TERMINAL_LOG_FULL = 0x36
};
char const *terminalStatus(uint8_t status);
QByteArray int2Hex(int i);
uint16_t getNextTransactionId();
uint32_t crc32(const char *s, size_t n);
uint32_t crc32(QByteArray const &ba);
uint32_t crc32(uint32_t crc, QByteArray const &ba);
char lrc(QByteArray const &ba);
bool isBigEndian();
}
#endif // TERMINAL_UTILS_H_INCLUDED