Oddělení informace o licenci
This commit is contained in:
@@ -24,13 +24,12 @@ const string cidFilePath = "";
|
||||
|
||||
struct SDCardInfo
|
||||
{
|
||||
uint32_t cardSize {};
|
||||
uint32_t serialNumber {};
|
||||
string date = "";
|
||||
string oemID = "";
|
||||
string name = "";
|
||||
string licenceFileName = "";
|
||||
bool isLoaded = false;
|
||||
uint32_t cardSize{};
|
||||
uint32_t serialNumber{};
|
||||
string date = "";
|
||||
string oemID = "";
|
||||
string name = "";
|
||||
bool isLoaded = false;
|
||||
};
|
||||
|
||||
class SDCard
|
||||
@@ -59,25 +58,22 @@ class SDCard
|
||||
bool crcCorrect = false;
|
||||
};
|
||||
|
||||
bool readSDCard();
|
||||
bool getCIDFromFile();
|
||||
bool getCSDFromFile();
|
||||
bool readSDCard();
|
||||
bool getCIDFromFile();
|
||||
bool getCSDFromFile();
|
||||
|
||||
public:
|
||||
|
||||
SDCardData cardData;
|
||||
bool isLoaded = false;
|
||||
char cid[32] = {};
|
||||
char csd[32] = {};
|
||||
string filePath = "";
|
||||
string cidString = ""; //pro předání pro starý generátor
|
||||
string csdString = ""; //pro předání pro starý generátor
|
||||
string cidString = ""; // pro předání pro starý generátor
|
||||
string csdString = ""; // pro předání pro starý generátor
|
||||
|
||||
SDCard();
|
||||
SDCard(string cid, string csd);
|
||||
SDCard(const string filesPath);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
|
||||
void createLicenceFile();
|
||||
|
||||
LicenceInfoGeneral licenceInfo {};
|
||||
LicenceInfoGeneral licenceInfoGeneral {};
|
||||
|
||||
private:
|
||||
LicenceIdentification licIdentification;
|
||||
|
||||
@@ -23,6 +23,12 @@ struct InitStructure
|
||||
string cid_csd_filePath = "";
|
||||
};
|
||||
|
||||
/// @brief struktura pro informaci o licenci
|
||||
struct LicenceInfo
|
||||
{
|
||||
string licenceFileName = "";
|
||||
};
|
||||
|
||||
class LicenceReader
|
||||
{
|
||||
|
||||
@@ -32,6 +38,7 @@ public:
|
||||
bool argumentsCorrect = false;
|
||||
ErrorMessage error;
|
||||
SDCardInfo sdCardInfo {};
|
||||
LicenceInfo licInfo {};
|
||||
|
||||
LicenceReader();
|
||||
~LicenceReader();
|
||||
@@ -39,13 +46,14 @@ public:
|
||||
bool initread(int elcType, InitStructure &initStructure);
|
||||
bool getLicenceInfo(void *returnStructure); //vrací informace o všech licenčních bodech základě předané návratové struktury
|
||||
bool getLicenceItemInfo(int protocolId, void *returnItemStructure); //vrací informace o licenčím bodu na základě id protocolu a předané návratové struktury
|
||||
LicenceInfoGeneral licenceInfo {}; //pole licencí
|
||||
|
||||
private:
|
||||
Licence2 *licence2 {}; //interní struktura pro zpracování licence ELC2
|
||||
Licence1 *licence1 {}; //interní struktura pro zpracování licence ELC1
|
||||
LicenceIdentification licIdentification {};
|
||||
string configFileName = "";
|
||||
LicenceInfoGeneral licencesInfo {}; //pole licencí
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user