ELC2 CRC check, čištění

This commit is contained in:
2024-02-07 13:36:25 +01:00
parent 37d02abd3f
commit 2bfc662b51
27 changed files with 317 additions and 234 deletions

View File

@@ -1,3 +1,5 @@
#define CRC = 1
#ifndef LICENCE_COMMON_H_
#define LICENCE_COMMON_H_
@@ -5,7 +7,6 @@
#include <cstring>
#include <string>
#include <map>
#include <unordered_map>
#include <stdint.h>
@@ -44,6 +45,7 @@ enum class GeneralError
LicenceSizeMismatch = 52,
LicenceSizeCardMismatch = 53,
LicenceMismatch = 54,
LicenceCRCMismatch = 54,
ItemsCountMismatch = 61
};
@@ -90,9 +92,9 @@ enum class FileNameGenerationType
struct Mapping
{
std::map<string, LicenceType> licMapTypes = {{"EOV_OSV", LicenceType::EOS_EOV}, {"DDTS", LicenceType::DDTS}, {"DRT", LicenceType::DRT}};
std::map<string, EncryptionType> licMapEncryption = {{"CID_AES256", EncryptionType::CID_AES256}, {"FIX_AES256", EncryptionType::FIX_AES256}};
std::map<string, PlcType> licMapPlcType = {{"WAGO", PlcType::WAGO}, {"TECO", PlcType::TECO}};
unordered_map<string, LicenceType> licMapTypes = {{"EOV_OSV", LicenceType::EOS_EOV}, {"DDTS", LicenceType::DDTS}, {"DRT", LicenceType::DRT}};
unordered_map<string, EncryptionType> licMapEncryption = {{"CID_AES256", EncryptionType::CID_AES256}, {"FIX_AES256", EncryptionType::FIX_AES256}};
unordered_map<string, PlcType> licMapPlcType = {{"WAGO", PlcType::WAGO}, {"TECO", PlcType::TECO}};
};
struct ErrorMessage