piřdání cesty k informaci o licenci

This commit is contained in:
2024-04-15 09:24:32 +02:00
parent 70e1fd9c4d
commit e4b7cb5fb7
6 changed files with 9 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ struct InitStructure
struct LicenceInfo
{
string licenceFileName = "";
string licenceFilePath = "";
};
class LicenceReader

Binary file not shown.

View File

@@ -9,7 +9,7 @@
/// @param argc
/// @param argv parametry pro generování licence
/// @return
int main7(int argc, char *argv[])
int main9(int argc, char *argv[])
{
unordered_map<string, string> arguments = getArguments(argc, argv);
try

View File

@@ -20,7 +20,7 @@ int main()
initStructure.licenceType = (int)LicenceType::DRT;
initStructure.licenceVersion = 1;
initStructure.licenceIndex = 0;
initStructure.licenceFilePath = ""; // cesta k licenčnímu souboru
initStructure.licenceFilePath = "c://_projects//sd_gen//output//"; // cesta k licenčnímu souboru
// initStructure.compatibility = 0; v případě kompatibility 0 či nezadané je výstup defaultní.
// pro ELC 1 LicenceELC1Info je to isValid, pro ELC 2 strukura { int protocolId = -1; int dataPointsCount = 0; }
initStructure.cid_csd_filePath = ""; // cesta k cidu/csd pro načtení a kontrolu licence
@@ -69,7 +69,7 @@ int main()
cout << "oemID: " << licenceReaderELC2.sdCardInfo.oemID << "\n";
cout << "název licenčního souboru: " << licenceReaderELC2.licInfo.licenceFileName << "\n";
cout << "cesta k licenčnímu souboru: " << licenceReaderELC2.licInfo.licenceFilePath << "\n";
// if (initStructure.compatibility == 1) //ukazka kompatibilita 1
@@ -129,6 +129,9 @@ int main()
{
cout << "Obecna chyba\n";
}
system("pause");
return SUCCES;
}

View File

@@ -101,6 +101,7 @@ bool LicenceReader::initread(int elcType, InitStructure &initStructure)
this->sdCardInfo.oemID = this->licence2->sdCard.cardData.oemID;
this->licInfo.licenceFileName = this->licence2->licFileName;
this->licInfo.licenceFilePath = this->licence2->licenceFilePath;
//this->licenceInfo.
//this->sdCardInfo.licenceFileName = this->licence2->licFileName;

View File

@@ -28,6 +28,7 @@ namespace Reader
string licFilePath = this->licenceFilePath + licFileName;
this->licFileName = licFileName;
this->licenceFilePath = licFilePath;
vector<char> content {};
if (readFile(licFilePath, content) == false)