clean and hub

This commit is contained in:
2023-08-30 09:15:13 +02:00
parent 15de81ddf2
commit 051a13e697
4 changed files with 243 additions and 53 deletions

View File

@@ -3,7 +3,6 @@
#include "utils.h"
#include <filesystem>
#define FILEBUFFER 300
#define TWO_HOURSE_SECONDS 7200
@@ -20,22 +19,32 @@ int main(int argc, char *argv[])
const int csdLength = argumentsString["-csd"].length();
char csdArg[32] = {};
getCharsFromString(argumentsString["-csd"], csdArg, csdLength);
const int cidLength = argumentsString["-cid"].length();
char cidArg[32] = {};
getCharsFromString(argumentsString["-cid"], cidArg, cidLength);
PlcLicence plcWriteLicence = PlcLicence(cidArg, csdArg, argumentsString["-outputType"], argumentsString["-configFileName"]);
if (plcWriteLicence.CreateLicence() == false)
{
cerr << "Licence creation failed";
}
// PlcLicence plcLicence = PlcLicence();
// if (plcLicence.ReadLicence("ezlic_eovosv0_vaxvcpalxjx.lic", LidIdType::EovOsv, 0, cidArg, csdArg) == false)
// {
// cout << "Reading error: " << plcLicence.operationErrors << endl;
// }
/* READ LICENCE CODE
// arguments: -cid, -csd, -licenceFileName, -licenceType=EOV_OSV, -licenceVersion
PlcLicence plcLicence = PlcLicence();
const int fileNameLength = argumentsString["-licenceFileName"].length();
char fileNameArg[fileNameLength] = {};
getCharsFromString(argumentsString["-licenceFileName"], fileNameArg, fileNameLength);
if (plcLicence.ReadLicence(fileNameArg, argumentsString["-licenceType"], argumentsString["-licenceVersion"], cidArg, csdArg) == false)
{
cout << "Reading error: " << plcLicence.operationErrors << endl;
}
*/
return EXIT_SUCCESS;
}