1 #ifndef DOCUMENT_STUDIO_H
2 #define DOCUMENT_STUDIO_H
4 #include "file/file_aes.h"
5 #include "file/file_xml.h"
6 #include "interface/table_structure.h"
7 #include "channel/channel_bridge.h"
8 #include <unordered_map>
11 class EntryTableRecord;
13 class EntryTableField;
16 class EntrySignalProcessing;
17 class EntryEventChains;
19 class EntryAccessControl2;
20 class EntryEnergieSchemes;
108 m_filePath = fileName;
112 std::string m_filePath;
126 return m_currentFileType;
130 m_currentFileType = type;
135 return m_parentNodeXML;
139 auto oldParent = m_parentNodeXML;
140 m_parentNodeXML = newParent;
176 std::string versionFormat( uint32_t version );
177 tinyxml2::XMLElement *m_parentNodeXML{};
178 FileType m_currentFileType{ FileType::AES_AEL };
192 std::string m_errorText;
205 return SetupTypeName.at( setupType );
210 void SetRootDefault(
SetupType setupType );
215 std::function<
bool(
const std::string &
filePath,
const std::string & backupFilePath )> shouldCreateBackup =
nullptr,
216 std::function<
bool(
const std::string &
filePath,
const SoftwarebuildVersion & version,
const std::string & component )> downgradeInfo =
nullptr );
221 Result documentOpen_AES(
const std::string &
filePath,
bool ignoreStudioVersion,
222 std::function<
bool(
const std::string &
filePath,
const std::string & backupFilePath )> shouldCreateBackup,
223 std::function<
bool(
const std::string &
filePath,
const SoftwarebuildVersion & version,
const std::string & component )> downgradeInfo );
224 Result documentOpen_XML(
const std::string &
filePath,
bool ignoreStudioVersion,
225 std::function<
bool(
const std::string &
filePath,
const std::string & backupFilePath )> shouldCreateBackup,
226 std::function<
bool(
const std::string &
filePath,
const SoftwarebuildVersion & version,
const std::string & component )> downgradeInfo );
299 #define TT_ACCESS_CONTROL 2
Definition: document_studio.h:23
void setVersions(uint32_t studioVersion, uint32_t libraryVersion)
FileType currentFileType()
Definition: document_studio.h:124
EntryHandling & rootHandling()
std::string shouldFirmware1Version()
Sollteversion der zu verwendenden Firmware 04.01.xx.xx, um alle gewaehlten Einstellungen zu unterstue...
EntryTable * GetAccessControlTable(uint8_t num)
EntryTableField * GetListTableField(uint8_t numTable, uint8_t numField)
void setVersions(const std::string &studioVersion, const std::string &libraryVersion)
int32_t globalVariableIndex(uint8_t ucDefNum)
EntryTableField * GetRecordTableField(uint8_t numTable, uint8_t numField)
std::string studioVersion()
Studioversion mit der die Datei zuletzt abgespeichert wurde.
int32_t GetTable(uint8_t num, StructTable &table, uint8_t typeTable)
int32_t IsAnalogStatusAvailable()
EntrySignalProcessing & rootSignalProcessing()
int32_t IsCounterAvailable()
std::string shouldFirmware2Version()
Sollteversion der zu verwendenden Firmware 04.02.xx.xx, um alle gewaehlten Einstellungen zu unterstue...
EntryTable * GetListTable(uint8_t num)
uint8_t globalVariableCount()
bool supportFirmware1Version()
Wird die Version 04.01.xx der Firmware unterstützt.
uint8_t GetListTableCount()
void GetAccessControlListName(uint8_t ucNum, char *szBuf)
Result documentNew(SetupType setupType)
uint8_t GetAccessControlTableCount()
bool isAccessControlExtension()
void setFileType(FileType type)
Definition: document_studio.h:128
const char * setupPassword()
std::string minLibraryVersion()
Mindestversion der zu verwendenden DFComDLL fuer die korrekte Uebertragung der Setupdaten.
uint32_t GetFlashSetupSize4_2()
std::string fileNameListAccessControl(int32_t num)
void setFilePath(const std::string &fileName)
Definition: document_studio.h:106
EntryTableList & rootTableList()
std::string listNameAccessControl(int32_t num)
EntryTableRecord & rootTableRecord()
Result MkSetupImage(EntryDevice &root, uint32_t &setupSize)
std::string setupTypeName(SetupType setupType)
Definition: document_studio.h:203
std::string listName(int32_t num)
std::string minFirmware1Version()
Mindestversion der zu verwendenden Firmware 04.01.xx.xx, um alle gewaehlten Einstellungen zu unterstu...
std::string shouldFirmware3Version()
Sollteversion der zu verwendenden Firmware 04.03.xx.xx, um alle gewaehlten Einstellungen zu unterstue...
tinyxml2::XMLElement * xmlParentNode()
Definition: document_studio.h:133
void setFileNameExtended(int32_t num, const std::string &fileName)
const std::string & errorText()
Definition: document_studio.h:181
uint32_t GetFlashSetupSize()
uint32_t GetEntranceEKFlashSize()
ResultCodes
Definition: document_studio.h:31
@ FileAES_recommendedVersionError
@ OpenUnsupportedFileType
@ FileAES_contentChecksumError
@ OpenUnsupportedFileVersion
bool documentSaveAs(FileType fileType, const std::string &filePath)
int32_t IsSystemMessageAvailable()
Result documentOpen(const std::string &filePath, bool ignoreStudioVersion, std::function< bool(const std::string &filePath, const std::string &backupFilePath)> shouldCreateBackup=nullptr, std::function< bool(const std::string &filePath, const SoftwarebuildVersion &version, const std::string &component)> downgradeInfo=nullptr)
uint8_t m_flagsLoadSetup
Definition: document_studio.h:279
bool supportFirmware2Version()
Wird die Version 04.02.xx der Firmware unterstützt.
int32_t GetTableCount(uint8_t typeTable)
std::string shouldLibraryVersion()
Sollteversion der zu verwendenden DFComDLL fuer die korrekte Uebertragung der Setupdaten.
std::string fileNameList(int32_t num)
std::string fileNameExtended(int32_t num)
std::string minFirmware2Version()
Mindestversion der zu verwendenden Firmware 04.02.xx.xx, um alle gewaehlten Einstellungen zu unterstu...
const std::string & filePath()
Definition: document_studio.h:101
char * m_setupPassword[17]
Definition: document_studio.h:276
int32_t GetTableField(uint8_t numTable, uint8_t numField, StructTableField &field, uint8_t typeTable)
int32_t IsAnalogValueAvailable()
uint32_t GetEntrance2EKFlashSize()
Result BuildRootFromImage(SetupType setupType)
EntryIOModule & rootIOModule()
void setErrorText(const std::string &errorText)
Definition: document_studio.h:186
std::string minFirmware3Version()
Mindestversion der zu verwendenden Firmware 04.03.xx.xx, um alle gewaehlten Einstellungen zu unterstu...
EntryAccessControl2 & rootAccessControl()
uint32_t GetMDEEKFlashSize()
void SetDocumentDefault(int32_t flags=0)
void setFileNameListAccessControl(int32_t num, const std::string &fileName)
bool supportFirmware3Version()
Wird die Version 04.03.xx der Firmware unterstützt.
std::string shouldStudioVersion()
Sollteversion des einzusetzenden Studios, um alle enthaltenen Daten zu unterstuetzen.
DocumentStudio(const std::string &studioVersion, const std::string &libraryVersion)
EntryTableField * GetAccessControlTableField(uint8_t numTable, uint8_t numField)
std::string minStudioVersion()
Mindestversion des einzusetzenden Studios, um alle enthaltenen Daten zu unterstuetzen.
EntryEnergieSchemes & rootEnergieSchemes()
std::string globalVariableName(uint8_t num)
FileAES & fileAES()
Definition: document_studio.h:116
EntryEventChains & rootEventChains()
std::unordered_map< std::string, std::string > globalVariablesValueDefault()
uint8_t GetRecordTableCount()
tinyxml2::XMLElement * setXmlParentNode(tinyxml2::XMLElement *newParent)
Definition: document_studio.h:137
void GetListName(uint8_t ucNum, char *szBuf)
int32_t IsTimerInputChainAvailable()
std::list< std::string > globalVariablesName()
uint32_t GetExtendedFlashSize()
uint32_t m_flashSetupSize
Definition: document_studio.h:200
int32_t IsFunctionAvailable()
void setFileNameList(int32_t num, const std::string &fileName)
EntryTable * GetRecordTable(uint8_t num)
FileXML & fileXML()
Definition: document_studio.h:120
Definition: document_studio.h:366
int32_t field(uint8_t numTable, uint8_t numField, StructTableField &field)
Definition: document_studio.h:385
int32_t table(uint8_t num, StructTable &table)
Definition: document_studio.h:380
int32_t count()
Definition: document_studio.h:375
ListAccessControlStructure(DocumentStudio *doc)
Definition: document_studio.h:368
Definition: document_studio.h:337
int32_t field(uint8_t numTable, uint8_t numField, StructTableField &field)
Definition: document_studio.h:356
int32_t table(uint8_t num, StructTable &table)
Definition: document_studio.h:351
int32_t count()
Definition: document_studio.h:346
ListStructure(DocumentStudio *doc)
Definition: document_studio.h:339
Definition: document_studio.h:308
RecordStructure(DocumentStudio *doc)
Definition: document_studio.h:310
int32_t field(uint8_t numTable, uint8_t numField, StructTableField &field)
Definition: document_studio.h:327
int32_t table(uint8_t num, StructTable &table)
Definition: document_studio.h:322
int32_t count()
Definition: document_studio.h:317
#define TT_RECORD
Definition: document_studio.h:297
#define TT_LIST
Definition: document_studio.h:298
#define TT_ACCESS_CONTROL
Definition: document_studio.h:299
Definition: document_studio.h:55
Result(ResultCodes resCode, const std::vector< std::string > &data)
Definition: document_studio.h:70
ResultCodes code
Definition: document_studio.h:92
std::vector< std::string > additionalData
Definition: document_studio.h:93
Result(const Result &rhs)
Definition: document_studio.h:60
Result()
Definition: document_studio.h:56
Result & operator=(const Result &rhs)
Definition: document_studio.h:81
Result(ResultCodes resCode)
Definition: document_studio.h:65
Diese Struktur ist eine Übergangsstruktur von StructRecordField auf StructTable2Field.
Definition: studio_setup_structs.h:1493
Diese Struktur ist eine Übergangsstruktur von StructRecordDescription auf StructTable2.
Definition: studio_setup_structs.h:1408
SetupType
Da die Setupdateien für unterschiedliche Geräte sein können, wird ein mapping des Gerätetypes auf den...
Definition: studio_setup_structs.h:132