Oddělení ELC1 generatoru a readeru

This commit is contained in:
2024-01-31 14:19:23 +01:00
parent a7fc519138
commit c0b36e9068
35 changed files with 1528 additions and 81 deletions

View File

@@ -47,11 +47,9 @@ bool LicenceGenerator::processInputConfiguration()
#else
pugi::xml_parse_result result = doc.load_file(fileName);
#endif
if (result)
{
const char *dataRootName = doc.child("data") ? "data" : "licence"; // kompatibilita s verzí, která měla ještě root "data"
Mapping mapping;
if (atoi(&doc.child(dataRootName).attribute("xmlVersion").value()[0]) != XML_VERSION)
{
@@ -87,7 +85,6 @@ bool LicenceGenerator::processInputConfiguration()
{
throw LicenceException((int)GeneralError::FileOpenError, "Unable to open the config file.");
}
return true;
}
@@ -112,8 +109,8 @@ void LicenceGenerator::createLicenceFile()
void LicenceGenerator::createLicenceELC1() // přejmenvat na ELC1
{
LicenceELC11 plcWriteLicence = LicenceELC11(this->licData.cid, this->licData.csd, "file", this->configFileName);
plcWriteLicence.createLicence();
Generator::Licence1 licence = Generator::Licence1(this->licData.cid, this->licData.csd, this->configFileName);
licence.createLicence();
}
void LicenceGenerator::createLicenceELC2()
@@ -121,8 +118,13 @@ void LicenceGenerator::createLicenceELC2()
switch (this->licIdentification.licCompatibility)
{
case 1:
Generator::Licence2 licence = Generator::Licence2(licData.cid,licData.csd,licData.doc);
licence.createLicence();
/*
licence.createLicence();
// LicenceELC21 licence = LicenceELC21(this->licData);
// licence.createLicence();
*/
break;
}
}