Compare commits
	
		
			55 Commits
		
	
	
		
			v1.4.0
			...
			a57fa6c31e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| a57fa6c31e | |||
| c22c924e38 | |||
| bdc64920a2 | |||
| 7bc9fa0c04 | |||
| 334da1fe4a | |||
| e5054582c2 | |||
| bbd287c92b | |||
| 5c152c9dc2 | |||
| 367ffaa3a1 | |||
| 2fd004f249 | |||
| 721a156fce | |||
| b7576d04e1 | |||
| 753954ecd7 | |||
| df7cabe2c1 | |||
| cfca8d2ef4 | |||
| 829932f29d | |||
| 8968667c23 | |||
| a5e0154757 | |||
| f346390631 | |||
| c77fa097c1 | |||
| 074e60d8dc | |||
| 8eff6e5d10 | |||
| 4233ca8637 | |||
| 68fc83ba67 | |||
| 052028afe8 | |||
| a240711946 | |||
| 75fdca95d9 | |||
| 9b087f62f9 | |||
| 7d38cc1269 | |||
| f5baad16d5 | |||
| b35e6812aa | |||
| d7e709d997 | |||
| 4d93aa1392 | |||
| b0f1e0a493 | |||
| 0dffc1d1c2 | |||
| 3581dd4b1d | |||
| 8d2d7bbb15 | |||
| e2e7c0772d | |||
| 807cea1042 | |||
| 80712964ef | |||
| 978e98b2ee | |||
| 44c2820130 | |||
| 123f22cd21 | |||
| b60af1a4fc | |||
| bb3ecc4b76 | |||
| fa30fe045b | |||
| bae014822d | |||
| 6c472b542e | |||
| 854c8b9706 | |||
| d521fd977a | |||
| ebbdc2f864 | |||
| 62496c5d95 | |||
| edd606fe78 | |||
| 1748c35c45 | |||
| 4c46932a3c | 
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					tags
 | 
				
			||||||
 | 
					*.tags
 | 
				
			||||||
 | 
					*.user
 | 
				
			||||||
							
								
								
									
										3
									
								
								ATBUpdateTool.pro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								ATBUpdateTool.pro
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					TEMPLATE = subdirs
 | 
				
			||||||
 | 
					CONFIG += ordered
 | 
				
			||||||
 | 
					SUBDIRS = DownloadDCFirmware DownloadDCJsonFiles UpdatePTUDevCtrl
 | 
				
			||||||
							
								
								
									
										0
									
								
								DownloadDCFirmware/ATBDownloadDCFirmware.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								DownloadDCFirmware/ATBDownloadDCFirmware.ini
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										83
									
								
								DownloadDCFirmware/DownloadDCFirmware.pro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								DownloadDCFirmware/DownloadDCFirmware.pro
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,83 @@
 | 
				
			|||||||
 | 
					QT += core
 | 
				
			||||||
 | 
					QT += serialport network
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TARGET = ATBDownloadDCFirmware
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					VERSION="0.1.0"
 | 
				
			||||||
 | 
					win32 {
 | 
				
			||||||
 | 
					    BUILD_DATE=$$system("date /t")
 | 
				
			||||||
 | 
					    BUILD_TIME=$$system("time /t")
 | 
				
			||||||
 | 
					} else {
 | 
				
			||||||
 | 
					    BUILD_DATE=$$system("date +%d-%m-%y")
 | 
				
			||||||
 | 
					    BUILD_TIME=$$system("date +%H:%M:%S")
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CONFIG += c++17
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# keep comments, as /* fall through */
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -C
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -g
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -Wno-deprecated-copy -O
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5 ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    CONFIG += link_pkgconfig
 | 
				
			||||||
 | 
					    lessThan(QT_MAJOR_VERSION, 5):   PKGCONFIG += qextserialport
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -O2 -std=c++17   # for GCC >= 4.7
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    PTU5BASEPATH = /opt/devel/ptu5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    INCLUDEPATH += $$PTU5BASEPATH/qt/libs/devicecontroller/include
 | 
				
			||||||
 | 
					    LIBS += -L$$PTU5BASEPATH/qt/libs/devicecontroller/library
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ARCH = PTU5
 | 
				
			||||||
 | 
					    DEFINES+=PTU5
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5_YOCTO ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -std=c++17   # for GCC >= 4.7
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    PTU5BASEPATH = /opt/devel/ptu5
 | 
				
			||||||
 | 
					    ARCH = PTU5
 | 
				
			||||||
 | 
					    DEFINES+=PTU5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # add qmqtt lib
 | 
				
			||||||
 | 
					    #LIBS += -lQt5Qmqtt
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					contains( CONFIG, DesktopLinux ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    lessThan(QT_MAJOR_VERSION, 5):    CONFIG += extserialport
 | 
				
			||||||
 | 
					    # QMAKE_CC = ccache $$QMAKE_CC
 | 
				
			||||||
 | 
					    # QMAKE_CXX = ccache $$QMAKE_CXX
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -std=c++17
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    linux-clang {  QMAKE_CXXFLAGS += -Qunused-arguments   }
 | 
				
			||||||
 | 
					    ARCH = DesktopLinux
 | 
				
			||||||
 | 
					    DEFINES+=DesktopLinux
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SOURCES += \
 | 
				
			||||||
 | 
					        main.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# HEADERS +=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					OTHER_FILES += \
 | 
				
			||||||
 | 
					    ATBDownloadDCFirmware.ini
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##########################################################################################
 | 
				
			||||||
 | 
					# for running program on target through QtCreator
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5 ) {
 | 
				
			||||||
 | 
					   qnx: target.path = /tmp/$${TARGET}/bin
 | 
				
			||||||
 | 
					   else: unix:!android: target.path = /opt/app/tools/atbupdate/
 | 
				
			||||||
 | 
					   !isEmpty(target.path): INSTALLS += target
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										0
									
								
								DownloadDCFirmware/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								DownloadDCFirmware/README.md
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										8
									
								
								DownloadDCFirmware/main.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								DownloadDCFirmware/main.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					#include <QtGlobal>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main(int argc, char **argv) {
 | 
				
			||||||
 | 
					    Q_UNUSED(argc);
 | 
				
			||||||
 | 
					    Q_UNUSED(argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										0
									
								
								DownloadDCJsonFiles/ATBDownloadDCJsonFiles.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								DownloadDCJsonFiles/ATBDownloadDCJsonFiles.ini
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										93
									
								
								DownloadDCJsonFiles/DownloadDCJsonFiles.pro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								DownloadDCJsonFiles/DownloadDCJsonFiles.pro
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,93 @@
 | 
				
			|||||||
 | 
					QT += core
 | 
				
			||||||
 | 
					QT += serialport network
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TARGET = ATBDownloadDCJsonFiles
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					VERSION="0.1.0"
 | 
				
			||||||
 | 
					win32 {
 | 
				
			||||||
 | 
					    BUILD_DATE=$$system("date /t")
 | 
				
			||||||
 | 
					    BUILD_TIME=$$system("time /t")
 | 
				
			||||||
 | 
					} else {
 | 
				
			||||||
 | 
					    BUILD_DATE=$$system("date +%d-%m-%y")
 | 
				
			||||||
 | 
					    BUILD_TIME=$$system("date +%H:%M:%S")
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!contains(CONFIG, INCLUDEINTERFACES) {
 | 
				
			||||||
 | 
					    INCLUDEINTERFACES=/opt/ptu5/opt/DCLibraries/include
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					INCLUDEPATH += plugins $${INCLUDEINTERFACES}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CONFIG += c++17
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# keep comments, as /* fall through */
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -C
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -g
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -Wno-deprecated-copy -O
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5 ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    CONFIG += link_pkgconfig
 | 
				
			||||||
 | 
					    lessThan(QT_MAJOR_VERSION, 5):   PKGCONFIG += qextserialport
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -O2 -std=c++17   # for GCC >= 4.7
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    PTU5BASEPATH = /opt/devel/ptu5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    INCLUDEPATH += $$PTU5BASEPATH/qt/libs/devicecontroller/include
 | 
				
			||||||
 | 
					    LIBS += -L$$PTU5BASEPATH/qt/libs/devicecontroller/library
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ARCH = PTU5
 | 
				
			||||||
 | 
					    DEFINES+=PTU5
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5_YOCTO ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -std=c++17   # for GCC >= 4.7
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    PTU5BASEPATH = /opt/devel/ptu5
 | 
				
			||||||
 | 
					    ARCH = PTU5
 | 
				
			||||||
 | 
					    DEFINES+=PTU5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # add qmqtt lib
 | 
				
			||||||
 | 
					    #LIBS += -lQt5Qmqtt
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					contains( CONFIG, DesktopLinux ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    lessThan(QT_MAJOR_VERSION, 5):    CONFIG += extserialport
 | 
				
			||||||
 | 
					    # QMAKE_CC = ccache $$QMAKE_CC
 | 
				
			||||||
 | 
					    # QMAKE_CXX = ccache $$QMAKE_CXX
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -std=c++17
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    linux-clang {  QMAKE_CXXFLAGS += -Qunused-arguments   }
 | 
				
			||||||
 | 
					    ARCH = DesktopLinux
 | 
				
			||||||
 | 
					    DEFINES+=DesktopLinux
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SOURCES += \
 | 
				
			||||||
 | 
					        main.cpp \
 | 
				
			||||||
 | 
					        message_handler.cpp \
 | 
				
			||||||
 | 
					        process/command.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HEADERS += \
 | 
				
			||||||
 | 
					        message_handler.h \
 | 
				
			||||||
 | 
					        process/command.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					OTHER_FILES += \
 | 
				
			||||||
 | 
					    ATBDownloadDCJsonFiles.ini
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##########################################################################################
 | 
				
			||||||
 | 
					# for running program on target through QtCreator
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5 ) {
 | 
				
			||||||
 | 
					   qnx: target.path = /tmp/$${TARGET}/bin
 | 
				
			||||||
 | 
					   else: unix:!android: target.path = /opt/app/tools/atbupdate/
 | 
				
			||||||
 | 
					   !isEmpty(target.path): INSTALLS += target
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										445
									
								
								DownloadDCJsonFiles/DownloadDCJsonFiles.pro.user
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										445
									
								
								DownloadDCJsonFiles/DownloadDCJsonFiles.pro.user
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,445 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<!DOCTYPE QtCreatorProject>
 | 
				
			||||||
 | 
					<!-- Written by QtCreator 5.0.2, 2024-02-28T16:01:22. -->
 | 
				
			||||||
 | 
					<qtcreator>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>EnvironmentId</variable>
 | 
				
			||||||
 | 
					  <value type="QByteArray">{6a494cc5-6dea-4681-86fc-d47b9761a1f4}</value>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>ProjectExplorer.Project.ActiveTarget</variable>
 | 
				
			||||||
 | 
					  <value type="int">0</value>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>ProjectExplorer.Project.EditorSettings</variable>
 | 
				
			||||||
 | 
					  <valuemap type="QVariantMap">
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
 | 
				
			||||||
 | 
					    <value type="QString" key="language">Cpp</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="value">
 | 
				
			||||||
 | 
					     <value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
 | 
				
			||||||
 | 
					    <value type="QString" key="language">QmlJS</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="value">
 | 
				
			||||||
 | 
					     <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
 | 
				
			||||||
 | 
					   <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.IndentSize">4</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.PaddingMode">1</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.TabSize">8</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.UseIndenter">false</value>
 | 
				
			||||||
 | 
					   <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
 | 
				
			||||||
 | 
					   <value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
 | 
				
			||||||
 | 
					  </valuemap>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>ProjectExplorer.Project.PluginSettings</variable>
 | 
				
			||||||
 | 
					  <valuemap type="QVariantMap">
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
 | 
				
			||||||
 | 
					    <value type="bool" key="AutoTest.Framework.Boost">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="AutoTest.Framework.CTest">false</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="AutoTest.Framework.Catch">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="AutoTest.Framework.GTest">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="AutoTest.Framework.QtTest">true</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
 | 
				
			||||||
 | 
					   <value type="int" key="AutoTest.RunAfterBuild">0</value>
 | 
				
			||||||
 | 
					   <value type="bool" key="AutoTest.UseGlobal">true</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ClangTools">
 | 
				
			||||||
 | 
					    <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
 | 
				
			||||||
 | 
					    <value type="int" key="ClangTools.ParallelJobs">3</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
 | 
				
			||||||
 | 
					    <value type="bool" key="ClangTools.UseGlobalSettings">true</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					  </valuemap>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>ProjectExplorer.Project.Target.0</variable>
 | 
				
			||||||
 | 
					  <valuemap type="QVariantMap">
 | 
				
			||||||
 | 
					   <value type="QString" key="DeviceType">GenericLinuxOsType</value>
 | 
				
			||||||
 | 
					   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Yocto i.MX6-ATB-PTU5</value>
 | 
				
			||||||
 | 
					   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Yocto i.MX6-ATB-PTU5</value>
 | 
				
			||||||
 | 
					   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{804f60e1-6e88-41af-b072-9f5c6a606099}</value>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
 | 
				
			||||||
 | 
					    <value type="int" key="EnableQmlDebugging">0</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/opt/ptu5/opt/build-DownloadDCJsonFiles-Yocto_i_MX6_ATB_PTU5-Debug</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/opt/ptu5/opt/build-DownloadDCJsonFiles-Yocto_i_MX6_ATB_PTU5-Debug</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments">CONFIG+=PTU5</value>
 | 
				
			||||||
 | 
					      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand">/usr/bin/make</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand">/usr/bin/make</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 | 
				
			||||||
 | 
					    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/opt/ptu5/opt/build-DownloadDCJsonFiles-Yocto_i_MX6_ATB_PTU5-Release</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/opt/ptu5/opt/build-DownloadDCJsonFiles-Yocto_i_MX6_ATB_PTU5-Release</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 | 
				
			||||||
 | 
					      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 | 
				
			||||||
 | 
					    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
 | 
				
			||||||
 | 
					    <value type="int" key="QtQuickCompiler">0</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
 | 
				
			||||||
 | 
					    <value type="int" key="EnableQmlDebugging">0</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/opt/ptu5/opt/build-DownloadDCJsonFiles-Yocto_i_MX6_ATB_PTU5-Profile</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/opt/ptu5/opt/build-DownloadDCJsonFiles-Yocto_i_MX6_ATB_PTU5-Profile</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 | 
				
			||||||
 | 
					      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 | 
				
			||||||
 | 
					    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
 | 
				
			||||||
 | 
					    <value type="int" key="QtQuickCompiler">0</value>
 | 
				
			||||||
 | 
					    <value type="int" key="SeparateDebugInfo">0</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.CheckForFreeDiskSpaceStep</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
 | 
				
			||||||
 | 
					      <value type="QString" key="RemoteLinux.CheckForFreeDiskSpaceStep.PathToCheck">/</value>
 | 
				
			||||||
 | 
					      <value type="qlonglong" key="RemoteLinux.CheckForFreeDiskSpaceStep.RequiredSpace">5242880</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinux.KillAppStep</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedFiles"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedHosts"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedRemotePaths"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="ProjectExplorer.RunConfiguration.LastDeployedSysroots"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="RemoteLinux.LastDeployedLocalTimes"/>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="RemoteLinux.LastDeployedRemoteTimes"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">DeployToGenericLinux</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
 | 
				
			||||||
 | 
					    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="CustomOutputParsers"/>
 | 
				
			||||||
 | 
					    <value type="int" key="PE.EnvironmentAspect.Base">1</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">DownloadDCJsonFiles</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">RemoteLinuxRunConfiguration:/opt/ptu5/opt/DownloadDCJsonFiles/DownloadDCJsonFiles.pro</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/opt/ptu5/opt/DownloadDCJsonFiles/DownloadDCJsonFiles.pro</value>
 | 
				
			||||||
 | 
					    <value type="int" key="RemoteLinux.EnvironmentAspect.Version">1</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="RunConfiguration.X11Forwarding">:0</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
 | 
				
			||||||
 | 
					  </valuemap>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>ProjectExplorer.Project.Target.1</variable>
 | 
				
			||||||
 | 
					  <valuemap type="QVariantMap">
 | 
				
			||||||
 | 
					   <value type="QString" key="DeviceType">Desktop</value>
 | 
				
			||||||
 | 
					   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.12.12 GCC 64bit</value>
 | 
				
			||||||
 | 
					   <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.12.12 GCC 64bit</value>
 | 
				
			||||||
 | 
					   <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.51212.gcc_64_kit</value>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
 | 
				
			||||||
 | 
					    <value type="int" key="EnableQmlDebugging">0</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/opt/ptu5/opt/build-DownloadDCJsonFiles-Desktop_Qt_5_12_12_GCC_64bit-Debug</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/opt/ptu5/opt/build-DownloadDCJsonFiles-Desktop_Qt_5_12_12_GCC_64bit-Debug</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 | 
				
			||||||
 | 
					      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 | 
				
			||||||
 | 
					    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/opt/ptu5/opt/build-DownloadDCJsonFiles-Desktop_Qt_5_12_12_GCC_64bit-Release</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/opt/ptu5/opt/build-DownloadDCJsonFiles-Desktop_Qt_5_12_12_GCC_64bit-Release</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 | 
				
			||||||
 | 
					      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 | 
				
			||||||
 | 
					    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
 | 
				
			||||||
 | 
					    <value type="int" key="QtQuickCompiler">0</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
 | 
				
			||||||
 | 
					    <value type="int" key="EnableQmlDebugging">0</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/opt/ptu5/opt/build-DownloadDCJsonFiles-Desktop_Qt_5_12_12_GCC_64bit-Profile</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/opt/ptu5/opt/build-DownloadDCJsonFiles-Desktop_Qt_5_12_12_GCC_64bit-Profile</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
 | 
				
			||||||
 | 
					      <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
 | 
				
			||||||
 | 
					      <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
 | 
				
			||||||
 | 
					     <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
 | 
				
			||||||
 | 
					      <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
 | 
				
			||||||
 | 
					      <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
 | 
				
			||||||
 | 
					     </valuemap>
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
 | 
				
			||||||
 | 
					    <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
 | 
				
			||||||
 | 
					    <value type="int" key="QtQuickCompiler">0</value>
 | 
				
			||||||
 | 
					    <value type="int" key="SeparateDebugInfo">0</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
 | 
				
			||||||
 | 
					     <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
 | 
				
			||||||
 | 
					     <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
 | 
				
			||||||
 | 
					    </valuemap>
 | 
				
			||||||
 | 
					    <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
 | 
				
			||||||
 | 
					    <valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
 | 
				
			||||||
 | 
					    <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
 | 
				
			||||||
 | 
					   <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
 | 
				
			||||||
 | 
					    <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="CustomOutputParsers"/>
 | 
				
			||||||
 | 
					    <value type="int" key="PE.EnvironmentAspect.Base">2</value>
 | 
				
			||||||
 | 
					    <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
 | 
				
			||||||
 | 
					    <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
 | 
				
			||||||
 | 
					    <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
 | 
				
			||||||
 | 
					   </valuemap>
 | 
				
			||||||
 | 
					   <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
 | 
				
			||||||
 | 
					  </valuemap>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>ProjectExplorer.Project.TargetCount</variable>
 | 
				
			||||||
 | 
					  <value type="int">2</value>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
 | 
				
			||||||
 | 
					  <value type="int">22</value>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					 <data>
 | 
				
			||||||
 | 
					  <variable>Version</variable>
 | 
				
			||||||
 | 
					  <value type="int">22</value>
 | 
				
			||||||
 | 
					 </data>
 | 
				
			||||||
 | 
					</qtcreator>
 | 
				
			||||||
							
								
								
									
										0
									
								
								DownloadDCJsonFiles/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								DownloadDCJsonFiles/README.md
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										56
									
								
								DownloadDCJsonFiles/main.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								DownloadDCJsonFiles/main.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QtGlobal>
 | 
				
			||||||
 | 
					#include <QCoreApplication>
 | 
				
			||||||
 | 
					#include <QByteArray>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "message_handler.h"
 | 
				
			||||||
 | 
					#include <DeviceController/interfaces.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//#include <unistd.h>
 | 
				
			||||||
 | 
					//#include <errno.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef PTU5
 | 
				
			||||||
 | 
					#define SERIAL_PORT "ttymxc2"
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					#define SERIAL_PORT "ttyUSB0"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int main(int argc, char **argv) {
 | 
				
			||||||
 | 
					    QByteArray const value = qgetenv("LC_ALL");
 | 
				
			||||||
 | 
					    if (value != "C") {
 | 
				
			||||||
 | 
					        qputenv("LC_ALL", "C");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // qputenv("XDG_RUNTIME_DIR", "/var/run/user/0");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    openlog("ATB-DL-JSON", LOG_PERROR | LOG_PID | LOG_CONS, LOG_USER);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QCoreApplication a(argc, argv);
 | 
				
			||||||
 | 
					    QCoreApplication::setApplicationName("ATBDownloadDCJsonFiles");
 | 
				
			||||||
 | 
					    QCoreApplication::setApplicationVersion(APP_VERSION);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!messageHandlerInstalled()) { // change internal qt-QDebug-handling
 | 
				
			||||||
 | 
					        atbInstallMessageHandler(atbDebugOutput);
 | 
				
			||||||
 | 
					        setDebugLevel(LOG_NOTICE);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // int r = std::system("ls -l /proc/[0-9]*/fd/* 2>/dev/null | grep /dev/ttymxc2 > /tmp/slave-or-master.txt");
 | 
				
			||||||
 | 
					    // lrwx------    1 root     root            64 Oct 31 14:55 /proc/884/fd/18 -> /dev/ttymxc2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //std::ifstream ifs("/tmp/slave-or-master.txt");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //if (ifs.is_open()) {
 | 
				
			||||||
 | 
					    //    std::string line;
 | 
				
			||||||
 | 
					    //    if (std::getline(ifs, line)) {
 | 
				
			||||||
 | 
					    //        if (line.size() > 0) {
 | 
				
			||||||
 | 
					    //            std::cout << "SLAVE " << line << std::endl;
 | 
				
			||||||
 | 
					    //        }
 | 
				
			||||||
 | 
					    //    } else {
 | 
				
			||||||
 | 
					    //    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //    ifs.close();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return a.exec();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										97
									
								
								DownloadDCJsonFiles/message_handler.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										97
									
								
								DownloadDCJsonFiles/message_handler.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,97 @@
 | 
				
			|||||||
 | 
					#include "message_handler.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QDateTime>
 | 
				
			||||||
 | 
					#include <cstring>
 | 
				
			||||||
 | 
					#include <QString>
 | 
				
			||||||
 | 
					#include <QFileInfo>
 | 
				
			||||||
 | 
					#include <QMessageLogContext>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static char const *DBG_NAME[] = { "DBG  ", "WARN ", "CRIT ", "FATAL", "INFO " };
 | 
				
			||||||
 | 
					static bool installedMsgHandler = false;
 | 
				
			||||||
 | 
					static int debugLevel = LOG_NOTICE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int getDebugLevel() { return debugLevel; }
 | 
				
			||||||
 | 
					void setDebugLevel(int newDebugLevel) {
 | 
				
			||||||
 | 
					    debugLevel = newDebugLevel;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool messageHandlerInstalled() {
 | 
				
			||||||
 | 
					    return installedMsgHandler;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler) {
 | 
				
			||||||
 | 
					    installedMsgHandler = (handler != 0);
 | 
				
			||||||
 | 
					    static QtMessageHandler prevHandler = nullptr;
 | 
				
			||||||
 | 
					    if (handler) {
 | 
				
			||||||
 | 
					        prevHandler = qInstallMessageHandler(handler);
 | 
				
			||||||
 | 
					        return prevHandler;
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        return qInstallMessageHandler(prevHandler);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					/// \brief Print message according to given debug level.
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					/// \note Install this function using qInstallMsgHandler().
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					///  int main(int argc, char **argv) {
 | 
				
			||||||
 | 
					///     installMsgHandler(atbDebugOutput);
 | 
				
			||||||
 | 
					///     QApplication app(argc, argv);
 | 
				
			||||||
 | 
					///     ...
 | 
				
			||||||
 | 
					///     return app.exec();
 | 
				
			||||||
 | 
					///  }
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					#if (QT_VERSION > QT_VERSION_CHECK(5, 0, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
 | 
				
			||||||
 | 
					void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
 | 
				
			||||||
 | 
					    Q_UNUSED(context);
 | 
				
			||||||
 | 
					    QString const localMsg = QString(DBG_NAME[type]) + msg.toLocal8Bit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    switch (debugLevel) {
 | 
				
			||||||
 | 
					        case LOG_DEBUG: { // debug-level message
 | 
				
			||||||
 | 
					            syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_INFO: { // informational message
 | 
				
			||||||
 | 
					            if (type != QtDebugMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_NOTICE: { // normal, but significant, condition
 | 
				
			||||||
 | 
					            if (type != QtDebugMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_WARNING: { // warning conditions
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_ERR: { // error conditions
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_CRIT: { // critical conditions
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_ALERT: { // action must be taken immediately
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_EMERG: { // system is unusable
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        default: {
 | 
				
			||||||
 | 
					            //fprintf(stderr, "%s No ErrorLevel defined! %s\n",
 | 
				
			||||||
 | 
					            //    datetime.toStdString().c_str(), msg.toStdString().c_str());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										23
									
								
								DownloadDCJsonFiles/message_handler.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								DownloadDCJsonFiles/message_handler.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					#ifndef MESSAGE_HANDLER_H_INCLUDED
 | 
				
			||||||
 | 
					#define MESSAGE_HANDLER_H_INCLUDED
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QtGlobal>
 | 
				
			||||||
 | 
					#ifdef __linux__
 | 
				
			||||||
 | 
					#include <syslog.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int getDebugLevel();
 | 
				
			||||||
 | 
					void setDebugLevel(int newDebugLevel);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool messageHandlerInstalled();
 | 
				
			||||||
 | 
					QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
 | 
				
			||||||
 | 
					// typedef void (*QtMessageHandler)(QtMsgType, const char *);
 | 
				
			||||||
 | 
					void atbDebugOutput(QtMsgType type, const char *msg);
 | 
				
			||||||
 | 
					#elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
 | 
				
			||||||
 | 
					// typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &);
 | 
				
			||||||
 | 
					void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // MESSAGE_HANDLER_H_INCLUDED
 | 
				
			||||||
							
								
								
									
										101
									
								
								interfaces.h → DownloadDCJsonFiles/plugins/interfaces.h
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										101
									
								
								interfaces.h → DownloadDCJsonFiles/plugins/interfaces.h
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							@@ -24,7 +24,8 @@ struct T_emp
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
   // dynamic:
 | 
					   // dynamic:
 | 
				
			||||||
   uint8_t state;      // step counter of EMP (electronic coin checker) FSM (finite state machine):
 | 
					   uint8_t state;      // step counter of EMP (electronic coin checker) FSM (finite state machine):
 | 
				
			||||||
       // 0=start command
 | 
					   /*
 | 
				
			||||||
 | 
					   // 0=start command
 | 
				
			||||||
       // 1=powered, do emp ini, send reset
 | 
					       // 1=powered, do emp ini, send reset
 | 
				
			||||||
       // 2=delay
 | 
					       // 2=delay
 | 
				
			||||||
       // 3=wait for response, requesting status after response
 | 
					       // 3=wait for response, requesting status after response
 | 
				
			||||||
@@ -39,7 +40,7 @@ struct T_emp
 | 
				
			|||||||
       // 90: stop all, 1s delay
 | 
					       // 90: stop all, 1s delay
 | 
				
			||||||
       // 99: off, all stopped
 | 
					       // 99: off, all stopped
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
   uint8_t pollingRunning;
 | 
					   uint8_t pollingRunning;
 | 
				
			||||||
   uint8_t paymentRunning;
 | 
					   uint8_t paymentRunning;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -238,6 +239,7 @@ struct T_dynamicCondition
 | 
				
			|||||||
        uint8_t lastVDoorState;
 | 
					        uint8_t lastVDoorState;
 | 
				
			||||||
        uint8_t lastCBstate;
 | 
					        uint8_t lastCBstate;
 | 
				
			||||||
        char        paymentInProgress;
 | 
					        char        paymentInProgress;
 | 
				
			||||||
 | 
					        // Version Szeged:  aug2023
 | 
				
			||||||
        //	0: stopped by timeout
 | 
					        //	0: stopped by timeout
 | 
				
			||||||
        //  1: running  2: wait4lastCoin
 | 
					        //  1: running  2: wait4lastCoin
 | 
				
			||||||
        //				3: payment stopped manually, coins in Escrow
 | 
					        //				3: payment stopped manually, coins in Escrow
 | 
				
			||||||
@@ -246,6 +248,21 @@ struct T_dynamicCondition
 | 
				
			|||||||
        //			    6: coins encashed   7:coins returned
 | 
					        //			    6: coins encashed   7:coins returned
 | 
				
			||||||
        //				8: CoinChecker or MDB on Error
 | 
					        //				8: CoinChecker or MDB on Error
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // since Schoenau with bill and changer, nov2023
 | 
				
			||||||
 | 
					        //0 = no payment
 | 
				
			||||||
 | 
					        //will be set to 1 by cash_startCollection()
 | 
				
			||||||
 | 
					        //neu 1: wait for devices getting ready for payment
 | 
				
			||||||
 | 
					        //2 = payment,
 | 
				
			||||||
 | 
					        //3 = wait for last coin/bill
 | 
				
			||||||
 | 
					        //4 = Bezahlvorgang manuell beendet
 | 
				
			||||||
 | 
					        //5 = payment stopped autom, amount collected, coins in Escrow
 | 
				
			||||||
 | 
					        //6 = Bezahlvorgang beendet weil ZK voll
 | 
				
			||||||
 | 
					        //4,5,6: payment done, keep on polling, wait for cash or return command
 | 
				
			||||||
 | 
					        //7 = encash collected money from coin escrow into cash box
 | 
				
			||||||
 | 
					        //8 = return "amountToReturn", can be complete inserted amount or only overpayment
 | 
				
			||||||
 | 
					        //9 = wait for changer result
 | 
				
			||||||
 | 
					        //10= print refund receipt with "amountToReturn"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        char        res1;
 | 
					        char        res1;
 | 
				
			||||||
        uint16_t    U_Batt;
 | 
					        uint16_t    U_Batt;
 | 
				
			||||||
@@ -397,6 +414,7 @@ struct T_bna
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class DownloadThread;
 | 
				
			||||||
class hwinf
 | 
					class hwinf
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -2252,14 +2270,23 @@ public:
 | 
				
			|||||||
    virtual void bna_requestCurrentNotes() const {}
 | 
					    virtual void bna_requestCurrentNotes() const {}
 | 
				
			||||||
    // send command to DC in order to get transaction data
 | 
					    // send command to DC in order to get transaction data
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    virtual uint8_t bna_getCurrentNotes(uint16_t latestBill, uint16_t *currentNotes) const {
 | 
					    virtual uint8_t bna_getCurrentNotes(uint16_t latestBill, uint16_t *currentNotes) const
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        Q_UNUSED(latestBill);
 | 
					        Q_UNUSED(latestBill);
 | 
				
			||||||
        Q_UNUSED(currentNotes);
 | 
					        Q_UNUSED(currentNotes);
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // returns number of collected bank notes since start-command (current transaction)
 | 
					    // returns number of collected bank notes since start-command (current transaction)
 | 
				
			||||||
    //  latestBill: last accepted bank note, value in cent
 | 
					    // return value: numbers of bills or 99 in case of error
 | 
				
			||||||
    //  currentNotes an array with up to 16 (further) notes collected
 | 
					    //  latestBill: not used
 | 
				
			||||||
 | 
					    // in case of error: currentNotes[0,1,2,3] = 1..4 error number(s)
 | 
				
			||||||
 | 
					    // in normal case:
 | 
				
			||||||
 | 
					    //  currentNotes[0]: last bill in cent (e.g. 1000 = 10€)
 | 
				
			||||||
 | 
					    //  currentNotes[1]: bin 1 = bill is still in escrow   else bill is stacked
 | 
				
			||||||
 | 
					    //       note: by now (dec2023) escrow is not used, bills always go to stacker (box)
 | 
				
			||||||
 | 
					    //  currentNotes[2]: total sum of bills in cent, low word (16bit)
 | 
				
			||||||
 | 
					    //  currentNotes[3]: total sum of bills in cent, high word (16bit)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    virtual void bna_requestStackerLevel() const {}
 | 
					    virtual void bna_requestStackerLevel() const {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -2273,9 +2300,73 @@ public:
 | 
				
			|||||||
    //                                          countOfBills[1] for 10€   and so on
 | 
					    //                                          countOfBills[1] for 10€   and so on
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // download device controller
 | 
				
			||||||
 | 
					    virtual bool dcDownloadRequest(QString const &fileToDownload) const {
 | 
				
			||||||
 | 
					        Q_UNUSED(fileToDownload);
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadRequested() const { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadResetRequest() const { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadRequestAck() const { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadRunning() const { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadFinished() { return false; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    virtual bool dcDownloadReportStart() const { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadReportRunning() const { return true; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadReportFinished() { return true; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    virtual bool dcDownloadThreadStart() { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadThreadRunning() const { return true; }
 | 
				
			||||||
 | 
					    virtual void dcDownloadThreadFinalize(DownloadThread *) {}
 | 
				
			||||||
 | 
					    virtual bool dcDownloadThreadFinished() const { return true; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadReportThreadStart() { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadReportThreadRunning() const { return true; }
 | 
				
			||||||
 | 
					    virtual void dcDownloadReportThreadFinalize() {}
 | 
				
			||||||
 | 
					    virtual void dcDownloadReportThreadQuit() {}
 | 
				
			||||||
 | 
					    virtual bool dcDownloadReportThreadFinished() const { return true; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    virtual QString dcDownloadFileName() const { return ""; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadSetRequested(bool requested) {
 | 
				
			||||||
 | 
					       Q_UNUSED(requested); return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadSetRunning(bool running) {
 | 
				
			||||||
 | 
					       Q_UNUSED(running); return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadSetFinished(bool finished) {
 | 
				
			||||||
 | 
					       Q_UNUSED(finished); return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    virtual void dcDownloadSetTotalBlockNumber(uint16_t totalBlockNumber) {
 | 
				
			||||||
 | 
					       Q_UNUSED(totalBlockNumber);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    virtual void dcDownloadSetCurrentBlockNumber(uint16_t currentBlockNumber) {
 | 
				
			||||||
 | 
					       Q_UNUSED(currentBlockNumber);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadGetRequested() const { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadGetRunning() const { return false; }
 | 
				
			||||||
 | 
					    virtual bool dcDownloadGetFinished() const { return false; }
 | 
				
			||||||
 | 
					    virtual uint16_t dcDownloadGetTotalBlockNumber() const { return 0; }
 | 
				
			||||||
 | 
					    virtual uint16_t dcDownloadGetCurrentBlockNumber() const { return 0; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    virtual QObject const *getAPI() { return nullptr; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
signals:
 | 
					signals:
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
 | 
					        NOTE: the difference between a virtual Qt signal and a normal Qt signal:
 | 
				
			||||||
 | 
					        A Qt virtual signal is a connection that is established using a pointer
 | 
				
			||||||
 | 
					        or reference and is not connected to an object or data. It is therefore
 | 
				
			||||||
 | 
					        not bound to a particular object, but to a specific class (object type).
 | 
				
			||||||
 | 
					        Qt virtual signals are useful because they allow you to create
 | 
				
			||||||
 | 
					        connections without worrying about whether an object or a specific data
 | 
				
			||||||
 | 
					        element has been destroyed.
 | 
				
			||||||
 | 
					        https://www.youtube.com/watch?v=HTH3VFfqsXw
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    virtual void hwapi_reportDCDownloadStatus(QString const&) const {}
 | 
				
			||||||
 | 
					    virtual void hwapi_reportDCDownloadSuccess(QString const&) const {}
 | 
				
			||||||
 | 
					    virtual void hwapi_reportDCDownloadFailure(QString const&) const {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    virtual void hwapi_templatePrintFinished_OK(void) const=0;
 | 
					    virtual void hwapi_templatePrintFinished_OK(void) const=0;
 | 
				
			||||||
    virtual void hwapi_templatePrintFinished_Err(void) const=0;
 | 
					    virtual void hwapi_templatePrintFinished_Err(void) const=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										36
									
								
								DownloadDCJsonFiles/process/command.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								DownloadDCJsonFiles/process/command.h
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					#ifndef COMMAND_H_INCLUDED
 | 
				
			||||||
 | 
					#define COMMAND_H_INCLUDED
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QObject>
 | 
				
			||||||
 | 
					#include <QCoreApplication>
 | 
				
			||||||
 | 
					#include <QString>
 | 
				
			||||||
 | 
					#include <QStringList>
 | 
				
			||||||
 | 
					#include <QProcess>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class Command : public QObject {
 | 
				
			||||||
 | 
					    Q_OBJECT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QString m_command;
 | 
				
			||||||
 | 
					    QString m_commandResult;
 | 
				
			||||||
 | 
					    int m_waitForStartTimeout;
 | 
				
			||||||
 | 
					    int m_waitForFinishTimeout;
 | 
				
			||||||
 | 
					    int m_exitCode;
 | 
				
			||||||
 | 
					public:
 | 
				
			||||||
 | 
					    explicit Command(QString const &command,
 | 
				
			||||||
 | 
					                     int start_timeout = 100000,
 | 
				
			||||||
 | 
					                     int finish_timeout = 100000);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QString getCommandResult() const;
 | 
				
			||||||
 | 
					    QString command() const { return m_command; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    bool execute(QString workingDirectory, QStringList args = QStringList());
 | 
				
			||||||
 | 
					    int exitCode() const { return m_exitCode; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					private slots:
 | 
				
			||||||
 | 
					    void readyReadStandardOutput();
 | 
				
			||||||
 | 
					    void readyReadStandardError();
 | 
				
			||||||
 | 
					    void finished(int exitCode, QProcess::ExitStatus exitStatus);
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // COMMAND_H_INCLUDED
 | 
				
			||||||
@@ -103,8 +103,9 @@ DEFINES += QT_DEPRECATED_WARNINGS
 | 
				
			|||||||
#           Move final processing to subclass UpdateProcessRunning.
 | 
					#           Move final processing to subclass UpdateProcessRunning.
 | 
				
			||||||
#           Disable EXIT-button for the whole update-process, except for the
 | 
					#           Disable EXIT-button for the whole update-process, except for the
 | 
				
			||||||
#           checking of the ISMAS-trigger-button (aka WAIT-button).
 | 
					#           checking of the ISMAS-trigger-button (aka WAIT-button).
 | 
				
			||||||
VERSION="1.4.0"
 | 
					# 1.4.1   : Sync files in the customer repository (under ./etc) as the very
 | 
				
			||||||
 | 
					#           first step
 | 
				
			||||||
 | 
					VERSION="1.4.1"
 | 
				
			||||||
# PLANNED TODOS:
 | 
					# PLANNED TODOS:
 | 
				
			||||||
#   1:  Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
 | 
					#   1:  Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
 | 
				
			||||||
#   2:  Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu
 | 
					#   2:  Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu
 | 
				
			||||||
@@ -118,7 +119,6 @@ VERSION="1.4.0"
 | 
				
			|||||||
#       ISMAS eine entsprechende Meldung anzeigen als Teil von SEND-LAST-VERSION.
 | 
					#       ISMAS eine entsprechende Meldung anzeigen als Teil von SEND-LAST-VERSION.
 | 
				
			||||||
#       Wenn der WAIT-button aktiv ist, dann werden zumindest die opkg-commands
 | 
					#       Wenn der WAIT-button aktiv ist, dann werden zumindest die opkg-commands
 | 
				
			||||||
#       ausgefuehrt.
 | 
					#       ausgefuehrt.
 | 
				
			||||||
#   4:  rsync: immer alle Dateien soiegeln (bis auf opkg-commands)
 | 
					 | 
				
			||||||
#   5:  Falls das Tool mal abstuerzt, dann einen Signal-Handler (fuer TERM)
 | 
					#   5:  Falls das Tool mal abstuerzt, dann einen Signal-Handler (fuer TERM)
 | 
				
			||||||
#       installieren, sodass zumnidest SEND-LAST-VERSION mit rausgeht.
 | 
					#       installieren, sodass zumnidest SEND-LAST-VERSION mit rausgeht.
 | 
				
			||||||
#   6:  rsync: explizites Binary, nicht das in busybox enthaltene.
 | 
					#   6:  rsync: explizites Binary, nicht das in busybox enthaltene.
 | 
				
			||||||
@@ -134,9 +134,6 @@ VERSION="1.4.0"
 | 
				
			|||||||
#       Stellung des WAIT-Button. Grund: es koennte sein, dass andernfalls ein
 | 
					#       Stellung des WAIT-Button. Grund: es koennte sein, dass andernfalls ein
 | 
				
			||||||
#       PSA weit hiter anderen steht, und dann ploetzlich einmal alle vorher-
 | 
					#       PSA weit hiter anderen steht, und dann ploetzlich einmal alle vorher-
 | 
				
			||||||
#       gehenden Aenderungen anzieht, die gar nicht fuer ihn gemeint waren.
 | 
					#       gehenden Aenderungen anzieht, die gar nicht fuer ihn gemeint waren.
 | 
				
			||||||
#  10:  Bei einer Neuinstallation (Neuhauser) immer JSON files runterladen,
 | 
					 | 
				
			||||||
#       Tariff-Files syncen (d.h. nur wenn noch kein Repo vorhanden ist), und
 | 
					 | 
				
			||||||
#       zwar auch ohne WAIT-Button.
 | 
					 | 
				
			||||||
#  11:  Das Edit-Fenster teilen um die Anzeige zu verbessern.
 | 
					#  11:  Das Edit-Fenster teilen um die Anzeige zu verbessern.
 | 
				
			||||||
#  12:  Bei einem Update muss immer ersichtlich sein, warum es ueberhaupt
 | 
					#  12:  Bei einem Update muss immer ersichtlich sein, warum es ueberhaupt
 | 
				
			||||||
#       angestossen wurde. Steht kein "WAIT" im ISMAS-Trigger, dann kann man
 | 
					#       angestossen wurde. Steht kein "WAIT" im ISMAS-Trigger, dann kann man
 | 
				
			||||||
@@ -250,6 +247,7 @@ HEADERS += \
 | 
				
			|||||||
        process/command.h \
 | 
					        process/command.h \
 | 
				
			||||||
        message_handler.h \
 | 
					        message_handler.h \
 | 
				
			||||||
        worker.h \
 | 
					        worker.h \
 | 
				
			||||||
 | 
					        interfaces.h \
 | 
				
			||||||
        commandline_parser.h \
 | 
					        commandline_parser.h \
 | 
				
			||||||
        plugins/interfaces.h
 | 
					        plugins/interfaces.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										275
									
								
								UpdatePTUDevCtrl/UpdatePTUDevCtrl.pro
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										275
									
								
								UpdatePTUDevCtrl/UpdatePTUDevCtrl.pro
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,275 @@
 | 
				
			|||||||
 | 
					QT += core gui
 | 
				
			||||||
 | 
					QT += widgets serialport network
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TARGET = ATBUpdateTool
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# The following define makes your compiler emit warnings if you use
 | 
				
			||||||
 | 
					# any Qt feature that has been marked deprecated (the exact warnings
 | 
				
			||||||
 | 
					# depend on your compiler). Please consult the documentation of the
 | 
				
			||||||
 | 
					# deprecated API in order to know how to port your code away from it.
 | 
				
			||||||
 | 
					DEFINES += QT_DEPRECATED_WARNINGS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# You can also make your code fail to compile if it uses deprecated APIs.
 | 
				
			||||||
 | 
					# In order to do so, uncomment the following line.
 | 
				
			||||||
 | 
					# You can also select to disable deprecated APIs only up to a certain version of Qt.
 | 
				
			||||||
 | 
					#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 1.3.6 :   Do not update device-controller/json files, but have the library
 | 
				
			||||||
 | 
					#           (in a later step) do that.
 | 
				
			||||||
 | 
					#           Fixed sending messages to ISMAS.
 | 
				
			||||||
 | 
					#           Always execute contents of opkg_commands-file (even if there are no
 | 
				
			||||||
 | 
					#           changes).
 | 
				
			||||||
 | 
					# 1.3.7 :   Wait forever for git-commands to finish in QProcess executing such
 | 
				
			||||||
 | 
					#           a command.
 | 
				
			||||||
 | 
					# 1.3.8 :   Remove accessing opkg_commands under file-system-path /etc/psa_update.
 | 
				
			||||||
 | 
					#           Activate download of json-configuration files.
 | 
				
			||||||
 | 
					# 1.3.9 :   Fix sendLastVersion: use configured branch and not master branch in
 | 
				
			||||||
 | 
					#               git show origin/master -s --format="c=%h m=%s d=%cI"    ==>
 | 
				
			||||||
 | 
					#               git show origin/zg1/zone1 -s --format="c=%h m=%s d=%cI"
 | 
				
			||||||
 | 
					#           Use dynamic values for os-release and apism-version when sending
 | 
				
			||||||
 | 
					#           last version info.
 | 
				
			||||||
 | 
					# 1.3.10:   Fix premature killing opkg-commands: detected timeout of 100s was
 | 
				
			||||||
 | 
					#           too small when updating apism.
 | 
				
			||||||
 | 
					#           Fix display of UPDATE_SUCCESS when opkg_command fails. Detected when
 | 
				
			||||||
 | 
					#           updating apsim failed.
 | 
				
			||||||
 | 
					# 1.3.11:   Integrate version of ATBUpdateTool in SendLastVersion-ISMAS-message.
 | 
				
			||||||
 | 
					# 1.3.12:   Add command parameters for output of yocto-infos about ATBUpdateTool.
 | 
				
			||||||
 | 
					#           Use 'git pull' instead of 'git fetch'.
 | 
				
			||||||
 | 
					#           Use 'git clone --filter=blob:none' instead of 'git clone' to speed
 | 
				
			||||||
 | 
					#           up cloning of customer repository.
 | 
				
			||||||
 | 
					# 1.3.13:   Fix: if the customer repository is corrupted, remove it and re-clone
 | 
				
			||||||
 | 
					#           the repository (without checking the ISMAS-trigger (WAIT-)button.
 | 
				
			||||||
 | 
					# 1.3.14:   Add additional check for sanity of customer repository using
 | 
				
			||||||
 | 
					#           "git fsck".
 | 
				
			||||||
 | 
					#           Stream-lined code of update process: massive refactoring.
 | 
				
			||||||
 | 
					#           Added functionality: If WAIT button is not active, then an existing
 | 
				
			||||||
 | 
					#           customer repository will be repaired, or a not existing repository
 | 
				
			||||||
 | 
					#           will be cloned. The process stops then.
 | 
				
			||||||
 | 
					#           However, if the WAIT button is active, the at least the commands in
 | 
				
			||||||
 | 
					#           opkg_commands will be executed. Changed files in the customer
 | 
				
			||||||
 | 
					#           repository will be worked on: tariff-files will be synced with the
 | 
				
			||||||
 | 
					#           local filesystem, json-files will be downloaded to firmware.
 | 
				
			||||||
 | 
					#           The device-controller firmware will be handled in a later version.
 | 
				
			||||||
 | 
					# 1.3.15:   Bug fixes found during testing.
 | 
				
			||||||
 | 
					#           Do not disable Exit-button during update-process.
 | 
				
			||||||
 | 
					#           Removed worker-thread with an own event-loop: only the GUI thread
 | 
				
			||||||
 | 
					#           has an event loop. Tested JSON-downloads several times successfully
 | 
				
			||||||
 | 
					#           (using the slave lib where the CA helper tool was active as master).
 | 
				
			||||||
 | 
					#           Turned previous worker-object into its own thread, but without any
 | 
				
			||||||
 | 
					#           own event-loop (so it cannot block anything inside the CA-plugin).
 | 
				
			||||||
 | 
					# 1.3.16:   Bug fixes found during testing.
 | 
				
			||||||
 | 
					# 1.3.17:   Add ATBUpdateTool.ini and custom command line parser. Settings
 | 
				
			||||||
 | 
					#           given in ATBUpdateTool.ini can be overwritten on the command-line.
 | 
				
			||||||
 | 
					# 1.3.18:   Bug fixes found during testing.
 | 
				
			||||||
 | 
					# 1.3.19:   Bug fixes found during testing.
 | 
				
			||||||
 | 
					# 1.3.20:   Bug fixes found during testing.
 | 
				
			||||||
 | 
					# 1.3.21:   Bug fixes found during testing:
 | 
				
			||||||
 | 
					#           Fix directory of ATBUpdateTool.ini to be the working directory of
 | 
				
			||||||
 | 
					#           the application rather than just ".".
 | 
				
			||||||
 | 
					#           Check existance of etc-directory inside customer repository.
 | 
				
			||||||
 | 
					#           Check for valid ISMAS trigger (button) 15x (=90s).
 | 
				
			||||||
 | 
					#           NOTE: if the customer repository is cloned (or repaired and cloned
 | 
				
			||||||
 | 
					#           again), and if the settings always-download-config=true and
 | 
				
			||||||
 | 
					#           always-download-dc=true in the ATBUpdateTool.ini file, the download
 | 
				
			||||||
 | 
					#           the printer-json files and the device controller file, even without
 | 
				
			||||||
 | 
					#           an activated ISMAS trigger (button). The tariff-files are rsynced to
 | 
				
			||||||
 | 
					#           the local filesystem for such clone.
 | 
				
			||||||
 | 
					#           Set new filename for device controller: dc2c.bin.
 | 
				
			||||||
 | 
					# 1.3.22:   Bug fixes found during testing:
 | 
				
			||||||
 | 
					#           Fix the path-names of the json-files and the device-controller.
 | 
				
			||||||
 | 
					#           Set automatic download of json-file in ATBUpdateTool.ini file for
 | 
				
			||||||
 | 
					#           a fresh clone of the repository.
 | 
				
			||||||
 | 
					# 1.3.23:   Added a 'break' to prevent a possible endless loop when checking if
 | 
				
			||||||
 | 
					#           the device is alive.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# NOTE:     The versioning info has to be shifted up by one version, i.e. what
 | 
				
			||||||
 | 
					#           happened for 1.3.23 was actually done in 1.3.24.
 | 
				
			||||||
 | 
					# 1.3.24
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# 1.3._24_: Special version for szeged using a old dc-controller (4.42):
 | 
				
			||||||
 | 
					#           Changes:
 | 
				
			||||||
 | 
					#               (1) the ini-File now uses the libCAmaster.so.
 | 
				
			||||||
 | 
					# 1.3._25_: Again special version for szeged, using interface.h, version 4.4.
 | 
				
			||||||
 | 
					# 1.4.0   : Start with version at 1.4.0 (mainly to see a difference with Szeged)
 | 
				
			||||||
 | 
					#           Set hash-value in EVENT-objects. Set location (project), version
 | 
				
			||||||
 | 
					#           and info in send-last-version.
 | 
				
			||||||
 | 
					#           If the customer repository does not exist, then do not check the
 | 
				
			||||||
 | 
					#           ISMAS trigger, but proceed with the update procedure. Otherwise,
 | 
				
			||||||
 | 
					#           check the ISMAS update-trigger as first step.
 | 
				
			||||||
 | 
					#           If the current time is between 0.00 - 4.00 o'clock, then a wrong
 | 
				
			||||||
 | 
					#           trigger-value will result in an UPDATE_STEP_NOT_NECESSARY.
 | 
				
			||||||
 | 
					#           Move final processing to subclass UpdateProcessRunning.
 | 
				
			||||||
 | 
					#           Disable EXIT-button for the whole update-process, except for the
 | 
				
			||||||
 | 
					#           checking of the ISMAS-trigger-button (aka WAIT-button).
 | 
				
			||||||
 | 
					# 1.4.1   : Sync files in the customer repository (under ./etc) as the very
 | 
				
			||||||
 | 
					#           first step
 | 
				
			||||||
 | 
					# 1.4.2   : Do not check if <repo_dir>/etc/psa_tariff and /etc/psa_tariff are
 | 
				
			||||||
 | 
					#           the same after an rsync. They might be noy after a change of the
 | 
				
			||||||
 | 
					#           customer-number.
 | 
				
			||||||
 | 
					# 1.4.3   : Use global directory for device-controller interfaces.h-file.
 | 
				
			||||||
 | 
					VERSION="1.4.3"
 | 
				
			||||||
 | 
					# PLANNED TODOS:
 | 
				
			||||||
 | 
					#   1:  Das Repository wird repariert bwz. neu geklont. Unabhaengig vom WAIT.
 | 
				
			||||||
 | 
					#   2:  Wenn der WAIT-Button aktiv ist, dann wird ein Repository repariert (neu
 | 
				
			||||||
 | 
					#       geklont), aber zusaetzlich werden alle verfuegbaren Dateien als neu
 | 
				
			||||||
 | 
					#       angesehen und die entsprechenden Aktionen durchgefuehrt: tariff-files
 | 
				
			||||||
 | 
					#       spiegeln, json-files laden und dc laden. Also VORSICHT: das repository
 | 
				
			||||||
 | 
					#       muss in diesem fall wirklich in ordnung sein.
 | 
				
			||||||
 | 
					#   3:  Wurde keine Datei geaendert, kein initiales Clone und der WAIT-button
 | 
				
			||||||
 | 
					#       nicht aktiv, so (passiert natuerlich nichts) kann man davon ausgehen,
 | 
				
			||||||
 | 
					#       dass es sich um ein automatisches Update handelt. Dann koennte man im
 | 
				
			||||||
 | 
					#       ISMAS eine entsprechende Meldung anzeigen als Teil von SEND-LAST-VERSION.
 | 
				
			||||||
 | 
					#       Wenn der WAIT-button aktiv ist, dann werden zumindest die opkg-commands
 | 
				
			||||||
 | 
					#       ausgefuehrt.
 | 
				
			||||||
 | 
					#   5:  Falls das Tool mal abstuerzt, dann einen Signal-Handler (fuer TERM)
 | 
				
			||||||
 | 
					#       installieren, sodass zumnidest SEND-LAST-VERSION mit rausgeht.
 | 
				
			||||||
 | 
					#   6:  rsync: explizites Binary, nicht das in busybox enthaltene.
 | 
				
			||||||
 | 
					#   7:  Versionen der Json-Files lassen sich auslesen.
 | 
				
			||||||
 | 
					#       Problem: Einstellungen in den Json-Files lassen sich auch mittels
 | 
				
			||||||
 | 
					#       Funktionen in der CD-Library ueberschreiben. Damit ist dann wieder nicht
 | 
				
			||||||
 | 
					#       mehr so klar, was jetzt eigentlich aktiv ist.
 | 
				
			||||||
 | 
					#   8:  m_alwaysDownloadConfig und m_alwaysDownloadDC: vorbereitet: man koennte
 | 
				
			||||||
 | 
					#       es so arrangieren, dass der DC plus die Json-files im Repository immer
 | 
				
			||||||
 | 
					#       runtergeladen werden, obwohl sich im Repository gar nicts veraendert
 | 
				
			||||||
 | 
					#       hat. Eeventuell nuetzlich beim initialen Setuo eines PSA.
 | 
				
			||||||
 | 
					#   9:  Das Kunden-Repository sollte immer gezogen werden, unabhaengig von der
 | 
				
			||||||
 | 
					#       Stellung des WAIT-Button. Grund: es koennte sein, dass andernfalls ein
 | 
				
			||||||
 | 
					#       PSA weit hiter anderen steht, und dann ploetzlich einmal alle vorher-
 | 
				
			||||||
 | 
					#       gehenden Aenderungen anzieht, die gar nicht fuer ihn gemeint waren.
 | 
				
			||||||
 | 
					#  11:  Das Edit-Fenster teilen um die Anzeige zu verbessern.
 | 
				
			||||||
 | 
					#  12:  Bei einem Update muss immer ersichtlich sein, warum es ueberhaupt
 | 
				
			||||||
 | 
					#       angestossen wurde. Steht kein "WAIT" im ISMAS-Trigger, dann kann man
 | 
				
			||||||
 | 
					#       davon ausgehen, dass es sich um ein automatisches Update handelt.
 | 
				
			||||||
 | 
					#       In jedem Fall wird bei einem automatischen Update, bei dem der WAIT-
 | 
				
			||||||
 | 
					#       Button nicht gesetzt war, ein "OK" gesendet, falls sonst nichts weiter
 | 
				
			||||||
 | 
					#       zu tun ist. Beachte aber: wir haben auch noch den Fall, dass eine SD-
 | 
				
			||||||
 | 
					#       Karte gesteckt wird. In diesem Fall wird ein komplettes Update gefahren,
 | 
				
			||||||
 | 
					#       und zwar explizit auch ohne WAIT-Button.
 | 
				
			||||||
 | 
					#       Am Ende eines Updates steht im ISMAS entweder ein "OK" oder ein "FAIL".
 | 
				
			||||||
 | 
					# 13:   SendLastVersion: fuer jedes erfolgreich installierte Paket eine
 | 
				
			||||||
 | 
					#       Send-Last-Version-Nachricht an ISMAS. Dadurch entsteht im ISMAS eine
 | 
				
			||||||
 | 
					#       History (Christian darueber informieren).
 | 
				
			||||||
 | 
					# 14:   Installiert werden nur Dateien, die neu sind oder geaendert wurden.
 | 
				
			||||||
 | 
					#       Nicht etwas Dateien, die geloescht wurden: sicherstellen, dass man hier
 | 
				
			||||||
 | 
					#       immer direkt im repository arbeitet, nicht auf dem Filesystem.
 | 
				
			||||||
 | 
					#       Ferner: der DeviceController heisst dc2c.bin, auch fuer die Jsons
 | 
				
			||||||
 | 
					#       sind Dtandard-Namen vergeben. Alternativ: alle vorhandenen Jsons
 | 
				
			||||||
 | 
					#       werden runtergeladen: Thomas ist eh fuer deren Inhalte verantworlich.
 | 
				
			||||||
 | 
					#       WICHTIG: immer ueberpruefen, ob die Dateien im Customer-Repository
 | 
				
			||||||
 | 
					#       wirklich die richtigen Dateien sind.
 | 
				
			||||||
 | 
					# 15:   Der WAIT-Button laesst sich auf WAIT zuruecksetzen (etwa wenn git
 | 
				
			||||||
 | 
					#       selber Probleme hatte).
 | 
				
			||||||
 | 
					# 16:   Der Download-Thread sollte sowohl die auto-Variable auf false setzen
 | 
				
			||||||
 | 
					#       als auch den cycle-Timer stoppen, damit sichergestellt ist, dass der
 | 
				
			||||||
 | 
					#       Download des DC nicht gestoert wird.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					win32 {
 | 
				
			||||||
 | 
					    BUILD_DATE=$$system("date /t")
 | 
				
			||||||
 | 
					    BUILD_TIME=$$system("time /t")
 | 
				
			||||||
 | 
					} else {
 | 
				
			||||||
 | 
					    BUILD_DATE=$$system("date +%d-%m-%y")
 | 
				
			||||||
 | 
					    BUILD_TIME=$$system("date +%H:%M:%S")
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					INCLUDEPATH += plugins
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CONFIG += c++17
 | 
				
			||||||
 | 
					# CONFIG -= app_bundle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
 | 
				
			||||||
 | 
					DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# keep comments, as /* fall through */
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -C
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -g
 | 
				
			||||||
 | 
					QMAKE_CXXFLAGS += -Wno-deprecated-copy -O
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5 ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    CONFIG += link_pkgconfig
 | 
				
			||||||
 | 
					    lessThan(QT_MAJOR_VERSION, 5):   PKGCONFIG += qextserialport
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -O2 -std=c++17   # for GCC >= 4.7
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    PTU5BASEPATH = /opt/devel/ptu5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    INCLUDEPATH += $$PTU5BASEPATH/qt/libs/devicecontroller/include
 | 
				
			||||||
 | 
					    LIBS += -L$$PTU5BASEPATH/qt/libs/devicecontroller/library
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    ARCH = PTU5
 | 
				
			||||||
 | 
					    DEFINES+=PTU5
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5_YOCTO ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -std=c++17   # for GCC >= 4.7
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    PTU5BASEPATH = /opt/devel/ptu5
 | 
				
			||||||
 | 
					    ARCH = PTU5
 | 
				
			||||||
 | 
					    DEFINES+=PTU5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    LIBS += -lCAslave
 | 
				
			||||||
 | 
					    LIBS += -lCAmaster
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					contains( CONFIG, DesktopLinux ) {
 | 
				
			||||||
 | 
					    greaterThan(QT_MAJOR_VERSION, 4): QT += serialport
 | 
				
			||||||
 | 
					    lessThan(QT_MAJOR_VERSION, 5):    CONFIG += extserialport
 | 
				
			||||||
 | 
					    # QMAKE_CC = ccache $$QMAKE_CC
 | 
				
			||||||
 | 
					    # QMAKE_CXX = ccache $$QMAKE_CXX
 | 
				
			||||||
 | 
					    QMAKE_CXXFLAGS += -std=c++17
 | 
				
			||||||
 | 
					    # QMAKE_CXXFLAGS += -Wno-deprecated-copy
 | 
				
			||||||
 | 
					    linux-clang {  QMAKE_CXXFLAGS += -Qunused-arguments   }
 | 
				
			||||||
 | 
					    ARCH = DesktopLinux
 | 
				
			||||||
 | 
					    DEFINES+=DesktopLinux
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SOURCES += \
 | 
				
			||||||
 | 
					        main.cpp \
 | 
				
			||||||
 | 
					        progress_event.cpp \
 | 
				
			||||||
 | 
					        update_dc_event.cpp \
 | 
				
			||||||
 | 
					        mainwindow.cpp \
 | 
				
			||||||
 | 
					        utils.cpp \
 | 
				
			||||||
 | 
					        update.cpp \
 | 
				
			||||||
 | 
					        git/git_client.cpp \
 | 
				
			||||||
 | 
					        ismas/ismas_client.cpp \
 | 
				
			||||||
 | 
					        process/command.cpp \
 | 
				
			||||||
 | 
					        message_handler.cpp \
 | 
				
			||||||
 | 
					        worker.cpp \
 | 
				
			||||||
 | 
					        commandline_parser.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HEADERS += \
 | 
				
			||||||
 | 
					        update.h \
 | 
				
			||||||
 | 
					        progress_event.h \
 | 
				
			||||||
 | 
					        update_dc_event.h \
 | 
				
			||||||
 | 
					        utils.h \
 | 
				
			||||||
 | 
					        mainwindow.h \
 | 
				
			||||||
 | 
					        git/git_client.h \
 | 
				
			||||||
 | 
					        apism/ismas_data.h \
 | 
				
			||||||
 | 
					        ismas/ismas_client.h \
 | 
				
			||||||
 | 
					        process/command.h \
 | 
				
			||||||
 | 
					        message_handler.h \
 | 
				
			||||||
 | 
					        worker.h \
 | 
				
			||||||
 | 
					        commandline_parser.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					OTHER_FILES += \
 | 
				
			||||||
 | 
					    ATBUpdateTool.ini
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FORMS += \
 | 
				
			||||||
 | 
					    mainwindow.ui
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					##########################################################################################
 | 
				
			||||||
 | 
					# for running program on target through QtCreator
 | 
				
			||||||
 | 
					contains( CONFIG, PTU5 ) {
 | 
				
			||||||
 | 
					   qnx: target.path = /tmp/$${TARGET}/bin
 | 
				
			||||||
 | 
					   else: unix:!android: target.path = /opt/app/tools/atbupdate/
 | 
				
			||||||
 | 
					   !isEmpty(target.path): INSTALLS += target
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								UpdatePTUDevCtrl/doc/ATBUpdateTool.drawio-4.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								UpdatePTUDevCtrl/doc/ATBUpdateTool.drawio-4.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -9,7 +9,7 @@
 | 
				
			|||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "message_handler.h"
 | 
					#include "message_handler.h"
 | 
				
			||||||
#include "plugins/interfaces.h"
 | 
					#include <DeviceController/interfaces.h>
 | 
				
			||||||
#include "commandline_parser.h"
 | 
					#include "commandline_parser.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <unistd.h>
 | 
					#include <unistd.h>
 | 
				
			||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
#include "utils.h"
 | 
					#include "utils.h"
 | 
				
			||||||
#include "progress_event.h"
 | 
					#include "progress_event.h"
 | 
				
			||||||
#include "update_dc_event.h"
 | 
					#include "update_dc_event.h"
 | 
				
			||||||
#include "plugins/interfaces.h"
 | 
					#include <DeviceController/interfaces.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <QDateTime>
 | 
					#include <QDateTime>
 | 
				
			||||||
#include <QMessageBox>
 | 
					#include <QMessageBox>
 | 
				
			||||||
							
								
								
									
										97
									
								
								UpdatePTUDevCtrl/message_handler.cpp
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										97
									
								
								UpdatePTUDevCtrl/message_handler.cpp
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,97 @@
 | 
				
			|||||||
 | 
					#include "message_handler.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QDateTime>
 | 
				
			||||||
 | 
					#include <cstring>
 | 
				
			||||||
 | 
					#include <QString>
 | 
				
			||||||
 | 
					#include <QFileInfo>
 | 
				
			||||||
 | 
					#include <QMessageLogContext>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static char const *DBG_NAME[] = { "DBG  ", "WARN ", "CRIT ", "FATAL", "INFO " };
 | 
				
			||||||
 | 
					static bool installedMsgHandler = false;
 | 
				
			||||||
 | 
					static int debugLevel = LOG_NOTICE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int getDebugLevel() { return debugLevel; }
 | 
				
			||||||
 | 
					void setDebugLevel(int newDebugLevel) {
 | 
				
			||||||
 | 
					    debugLevel = newDebugLevel;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool messageHandlerInstalled() {
 | 
				
			||||||
 | 
					    return installedMsgHandler;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler) {
 | 
				
			||||||
 | 
					    installedMsgHandler = (handler != 0);
 | 
				
			||||||
 | 
					    static QtMessageHandler prevHandler = nullptr;
 | 
				
			||||||
 | 
					    if (handler) {
 | 
				
			||||||
 | 
					        prevHandler = qInstallMessageHandler(handler);
 | 
				
			||||||
 | 
					        return prevHandler;
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        return qInstallMessageHandler(prevHandler);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					/// \brief Print message according to given debug level.
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					/// \note Install this function using qInstallMsgHandler().
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					///  int main(int argc, char **argv) {
 | 
				
			||||||
 | 
					///     installMsgHandler(atbDebugOutput);
 | 
				
			||||||
 | 
					///     QApplication app(argc, argv);
 | 
				
			||||||
 | 
					///     ...
 | 
				
			||||||
 | 
					///     return app.exec();
 | 
				
			||||||
 | 
					///  }
 | 
				
			||||||
 | 
					///
 | 
				
			||||||
 | 
					#if (QT_VERSION > QT_VERSION_CHECK(5, 0, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
 | 
				
			||||||
 | 
					void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) {
 | 
				
			||||||
 | 
					    Q_UNUSED(context);
 | 
				
			||||||
 | 
					    QString const localMsg = QString(DBG_NAME[type]) + msg.toLocal8Bit();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    switch (debugLevel) {
 | 
				
			||||||
 | 
					        case LOG_DEBUG: { // debug-level message
 | 
				
			||||||
 | 
					            syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_INFO: { // informational message
 | 
				
			||||||
 | 
					            if (type != QtDebugMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_NOTICE: { // normal, but significant, condition
 | 
				
			||||||
 | 
					            if (type != QtDebugMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_WARNING: { // warning conditions
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_ERR: { // error conditions
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_CRIT: { // critical conditions
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_ALERT: { // action must be taken immediately
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        case LOG_EMERG: { // system is unusable
 | 
				
			||||||
 | 
					            if (type != QtInfoMsg && type != QtDebugMsg && type != QtWarningMsg) {
 | 
				
			||||||
 | 
					                syslog(LOG_DEBUG, "%s", localMsg.toStdString().c_str());
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } break;
 | 
				
			||||||
 | 
					        default: {
 | 
				
			||||||
 | 
					            //fprintf(stderr, "%s No ErrorLevel defined! %s\n",
 | 
				
			||||||
 | 
					            //    datetime.toStdString().c_str(), msg.toStdString().c_str());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										23
									
								
								UpdatePTUDevCtrl/message_handler.h
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										23
									
								
								UpdatePTUDevCtrl/message_handler.h
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,23 @@
 | 
				
			|||||||
 | 
					#ifndef MESSAGE_HANDLER_H_INCLUDED
 | 
				
			||||||
 | 
					#define MESSAGE_HANDLER_H_INCLUDED
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QtGlobal>
 | 
				
			||||||
 | 
					#ifdef __linux__
 | 
				
			||||||
 | 
					#include <syslog.h>
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int getDebugLevel();
 | 
				
			||||||
 | 
					void setDebugLevel(int newDebugLevel);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool messageHandlerInstalled();
 | 
				
			||||||
 | 
					QtMessageHandler atbInstallMessageHandler(QtMessageHandler handler);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
 | 
				
			||||||
 | 
					// typedef void (*QtMessageHandler)(QtMsgType, const char *);
 | 
				
			||||||
 | 
					void atbDebugOutput(QtMsgType type, const char *msg);
 | 
				
			||||||
 | 
					#elif QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
 | 
				
			||||||
 | 
					// typedef void (*QtMessageHandler)(QtMsgType, const QMessageLogContext &, const QString &);
 | 
				
			||||||
 | 
					void atbDebugOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#endif // MESSAGE_HANDLER_H_INCLUDED
 | 
				
			||||||
							
								
								
									
										124
									
								
								UpdatePTUDevCtrl/process/command.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								UpdatePTUDevCtrl/process/command.cpp
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,124 @@
 | 
				
			|||||||
 | 
					#include "command.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QProcess>
 | 
				
			||||||
 | 
					#include <QDebug>
 | 
				
			||||||
 | 
					#include <QDir>
 | 
				
			||||||
 | 
					#include <QRegularExpression>
 | 
				
			||||||
 | 
					#include <QDateTime>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Command::Command(QString const &command, int start_timeout, int finish_timeout)
 | 
				
			||||||
 | 
					    : m_command(command.trimmed())
 | 
				
			||||||
 | 
					    , m_commandResult("")
 | 
				
			||||||
 | 
					    , m_waitForStartTimeout(start_timeout)
 | 
				
			||||||
 | 
					    , m_waitForFinishTimeout(finish_timeout)
 | 
				
			||||||
 | 
					    , m_exitCode(-1) {
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QString Command::getCommandResult() const {
 | 
				
			||||||
 | 
					    return m_commandResult;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void Command::readyReadStandardOutput() {
 | 
				
			||||||
 | 
					    QProcess *p = (QProcess *)sender();
 | 
				
			||||||
 | 
					    m_commandResult += p->readAllStandardOutput();
 | 
				
			||||||
 | 
					    // qCritical() << m_commandResult;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void Command::readyReadStandardError() {
 | 
				
			||||||
 | 
					    QProcess *p = (QProcess *)sender();
 | 
				
			||||||
 | 
					    QByteArray buf = p->readAllStandardError();
 | 
				
			||||||
 | 
					    qCritical() << buf;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void Command::finished(int /*exitCode*/, QProcess::ExitStatus /*exitStatus*/) {
 | 
				
			||||||
 | 
					    QProcess *p = (QProcess *)sender();
 | 
				
			||||||
 | 
					    // read all remaining data sent to the process, just in case
 | 
				
			||||||
 | 
					    QString d = p->readAllStandardOutput();
 | 
				
			||||||
 | 
					    if (!d.isEmpty()) {
 | 
				
			||||||
 | 
					        m_commandResult += d;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    disconnect(p, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(readyReadStandardOutput()));
 | 
				
			||||||
 | 
					    disconnect(p, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(readyReadStandardError()));
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bool Command::execute(QString workingDirectory, QStringList args) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!QDir::setCurrent(workingDirectory)) {
 | 
				
			||||||
 | 
					        qCritical() << "SET WORKING_DIRECTORY" << workingDirectory
 | 
				
			||||||
 | 
					                    << "FAILED FOR" << m_command;
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    QScopedPointer<QProcess> p(new QProcess(this));
 | 
				
			||||||
 | 
					    p->setWorkingDirectory(workingDirectory);
 | 
				
			||||||
 | 
					    p->setProcessChannelMode(QProcess::MergedChannels);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    connect(&(*p), SIGNAL(readyReadStandardOutput()), this, SLOT(readyReadStandardOutput()));
 | 
				
			||||||
 | 
					    connect(&(*p), SIGNAL(readyReadStandardError()), this, SLOT(readyReadStandardError()));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!args.isEmpty()) {
 | 
				
			||||||
 | 
					        qDebug() << "START COMMAND" << m_command << "WITH ARGS" << args
 | 
				
			||||||
 | 
					                 << "IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					        p->start(m_command, args);
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        qDebug() << "START COMMAND" << m_command
 | 
				
			||||||
 | 
					                 << "IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					        p->start(m_command);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    qint64 const start = QDateTime::currentDateTime().toMSecsSinceEpoch();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (p->waitForStarted(m_waitForStartTimeout)) {
 | 
				
			||||||
 | 
					        qDebug() << "PROCESS" << m_command << "STARTED IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					        if (p->state() == QProcess::ProcessState::Running) {
 | 
				
			||||||
 | 
					            qDebug() << "PROCESS" << m_command << "RUNNING IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					            // wait forever for git/opkg-commands to finish
 | 
				
			||||||
 | 
					            int wait = m_waitForFinishTimeout;
 | 
				
			||||||
 | 
					            if (m_command.trimmed().startsWith("git", Qt::CaseInsensitive) ||
 | 
				
			||||||
 | 
					                m_command.trimmed().startsWith("opkg", Qt::CaseInsensitive)) {
 | 
				
			||||||
 | 
					                wait = -1;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            bool const no_timeout = p->waitForFinished(wait);
 | 
				
			||||||
 | 
					            if (no_timeout) {
 | 
				
			||||||
 | 
					                qDebug() << "PROCESS" << m_command << "FINISHED IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					                if (p->exitStatus() == QProcess::NormalExit) {
 | 
				
			||||||
 | 
					                    if ((m_exitCode = p->exitCode()) == 0) {
 | 
				
			||||||
 | 
					                        qint64 const end = QDateTime::currentDateTime().toMSecsSinceEpoch();
 | 
				
			||||||
 | 
					                        qDebug() << "EXECUTED" << m_command
 | 
				
			||||||
 | 
					                                 << QString("(runtime %1ms)").arg(end-start)
 | 
				
			||||||
 | 
					                                 << "with code" << m_exitCode
 | 
				
			||||||
 | 
					                                 << "IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					                        return true;
 | 
				
			||||||
 | 
					                    } else {
 | 
				
			||||||
 | 
					                        qint64 const end = QDateTime::currentDateTime().toMSecsSinceEpoch();
 | 
				
			||||||
 | 
					                        qCritical() << "EXECUTED" << m_command
 | 
				
			||||||
 | 
					                                    << QString("(runtime %1ms)").arg(end-start)
 | 
				
			||||||
 | 
					                                    << "with code" << m_exitCode
 | 
				
			||||||
 | 
					                                    << "IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                } else {
 | 
				
			||||||
 | 
					                    qint64 const end = QDateTime::currentDateTime().toMSecsSinceEpoch();
 | 
				
			||||||
 | 
					                    qCritical() << "PROCESS" << m_command << "CRASHED with code"
 | 
				
			||||||
 | 
					                                << p->exitCode()
 | 
				
			||||||
 | 
					                                << QString("(after %1ms)").arg(end-start)
 | 
				
			||||||
 | 
					                                << "IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                qint64 const end = QDateTime::currentDateTime().toMSecsSinceEpoch();
 | 
				
			||||||
 | 
					                qCritical() << "PROCESS" << m_command
 | 
				
			||||||
 | 
					                            << "DID NOT FINISH WITH" << wait
 | 
				
			||||||
 | 
					                            << "MS IN" << p->workingDirectory()
 | 
				
			||||||
 | 
					                            << QString("(runtime %1ms)").arg(end-start);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            qCritical() << "WRONG PROCESS STATE" << p->state()
 | 
				
			||||||
 | 
					                        << "IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					        qint64 const end = QDateTime::currentDateTime().toMSecsSinceEpoch();
 | 
				
			||||||
 | 
					        qCritical() << "PROCESS" << m_command << "TIMEOUT AT START"
 | 
				
			||||||
 | 
					                    << QString("(runtime %1ms)").arg(end-start)
 | 
				
			||||||
 | 
					                    << "IN" << p->workingDirectory();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return false;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -18,7 +18,7 @@
 | 
				
			|||||||
#include "unistd.h"
 | 
					#include "unistd.h"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "plugins/interfaces.h"
 | 
					#include <DeviceController/interfaces.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include <QSharedMemory>
 | 
					#include <QSharedMemory>
 | 
				
			||||||
#include <QScopedPointer>
 | 
					#include <QScopedPointer>
 | 
				
			||||||
@@ -98,6 +98,7 @@ bool Update::unloadDCPlugin() {
 | 
				
			|||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class hwapi;
 | 
				
			||||||
Update::Update(Worker *worker,
 | 
					Update::Update(Worker *worker,
 | 
				
			||||||
               QString customerRepository,
 | 
					               QString customerRepository,
 | 
				
			||||||
               QString customerNrStr,
 | 
					               QString customerNrStr,
 | 
				
			||||||
@@ -122,31 +123,72 @@ Update::Update(Worker *worker,
 | 
				
			|||||||
    , m_dryRun(dryRun)
 | 
					    , m_dryRun(dryRun)
 | 
				
			||||||
    , m_sys_areDCdataValid(false) {
 | 
					    , m_sys_areDCdataValid(false) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    int tries = 20;
 | 
					    if (!m_hw) {
 | 
				
			||||||
    while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == false) {
 | 
					        qCritical() << "(" << __func__ << ":" << __LINE__ << ") m_hw == nullptr -> ca-slave plugin loaded ???";
 | 
				
			||||||
        // must deliver 'true', only then are all data from hwapi valid
 | 
					    } else {
 | 
				
			||||||
        if (--tries < 0) {
 | 
					        int tries = 20;
 | 
				
			||||||
            qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
					        while ((m_sys_areDCdataValid = m_hw->sys_areDCdataValid()) == false) {
 | 
				
			||||||
            break;
 | 
					            // must deliver 'true', only then are all data from hwapi valid
 | 
				
			||||||
 | 
					            if (--tries < 0) {
 | 
				
			||||||
 | 
					                qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            m_hw->dc_autoRequest(true);
 | 
				
			||||||
 | 
					            QThread::msleep(500);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        m_hw->dc_autoRequest(true);
 | 
					
 | 
				
			||||||
        QThread::msleep(500);
 | 
					        qCritical() << "(" << __func__ << ":" << __LINE__ << ") m_sys_areDCDataValid ..."
 | 
				
			||||||
 | 
					                    << m_sys_areDCdataValid;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
 | 
					        QObject const *obj = m_hw->getAPI();
 | 
				
			||||||
 | 
					        Q_ASSERT(obj != nullptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        QDebug critical = qCritical();
 | 
				
			||||||
 | 
					        critical << "connect() to onReportDCDownloadStatus() ...";
 | 
				
			||||||
 | 
					        if (!connect(obj,
 | 
				
			||||||
 | 
					                     SIGNAL(hwapi_reportDCDownloadStatus(QString const&)),
 | 
				
			||||||
 | 
					                     this,
 | 
				
			||||||
 | 
					                     SLOT(onReportDCDownloadStatus(QString const &)))) {
 | 
				
			||||||
 | 
					            critical << "FAILED";
 | 
				
			||||||
 | 
					        } else critical << "DONE";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        critical = qCritical();
 | 
				
			||||||
 | 
					        critical << "connect() to onReportDCDownloadSuccess() ...";
 | 
				
			||||||
 | 
					        if (!connect(obj,
 | 
				
			||||||
 | 
					            SIGNAL(hwapi_reportDCDownloadSuccess(QString const&)), this,
 | 
				
			||||||
 | 
					            SLOT(onReportDCDownloadSuccess(QString const &)))) {
 | 
				
			||||||
 | 
					            critical << "FAILED";
 | 
				
			||||||
 | 
					        } else critical << "DONE";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        critical = qCritical();
 | 
				
			||||||
 | 
					        critical << "connect() to onReportDCDownloadFailure() ...";
 | 
				
			||||||
 | 
					        if (!connect(obj,
 | 
				
			||||||
 | 
					            SIGNAL(hwapi_reportDCDownloadFailure(QString const &)), this,
 | 
				
			||||||
 | 
					            SLOT(onReportDCDownloadFailure(QString const &)))) {
 | 
				
			||||||
 | 
					            critical << "FAILED";
 | 
				
			||||||
 | 
					        } else critical << "DONE";
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
    qCritical() << __PRETTY_FUNCTION__ << "m_sys_areDCDataValid ..." << m_sys_areDCdataValid;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    //qInfo() << "UPDATE: m_serialInterface    ..." << m_serialInterface;
 | 
					 | 
				
			||||||
    //qInfo() << "UPDATE: m_baudrate           ..." << m_baudrate;
 | 
					 | 
				
			||||||
    //qInfo() << "UPDATE: m_customerRepository ..." << m_customerRepository;
 | 
					 | 
				
			||||||
    //qInfo() << "UPDATE: m_customerNr ..........." << m_customerNrStr;
 | 
					 | 
				
			||||||
    //qInfo() << "UPDATE: m_branchName ..........." << m_branchName;
 | 
					 | 
				
			||||||
    //qInfo() << "UPDATE: m_pluginName ..........." << m_pluginName;
 | 
					 | 
				
			||||||
    //qInfo() << "UPDATE: m_workingDirectory ....." << m_workingDir;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Update::~Update() {
 | 
					Update::~Update() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void Update::onReportDCDownloadStatus(QString const &status) {
 | 
				
			||||||
 | 
					    emit m_worker->showStatusMessage("DL", status);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void Update::onReportDCDownloadSuccess(QString const &msg) {
 | 
				
			||||||
 | 
					    qCritical() << "msg" << msg;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void Update::onReportDCDownloadFailure(QString const &errorMsg) {
 | 
				
			||||||
 | 
					    qCritical() << "msg" << errorMsg;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// br is a index into a table, used for historical reasons.
 | 
					// br is a index into a table, used for historical reasons.
 | 
				
			||||||
bool Update::openSerial(int br, QString baudrate, QString comPort) const {
 | 
					bool Update::openSerial(int br, QString baudrate, QString comPort) const {
 | 
				
			||||||
    qDebug() << "opening serial" << br << baudrate << comPort << "...";
 | 
					    qDebug() << "opening serial" << br << baudrate << comPort << "...";
 | 
				
			||||||
@@ -266,6 +308,7 @@ bool Update::updateBinary(QString const &fileToSendToDC) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
    QFile fn(fileToSendToDC);
 | 
					    QFile fn(fileToSendToDC);
 | 
				
			||||||
    if (!fn.exists()) {
 | 
					    if (!fn.exists()) {
 | 
				
			||||||
        // output via CONSOLE() etc
 | 
					        // output via CONSOLE() etc
 | 
				
			||||||
@@ -334,6 +377,7 @@ bool Update::updateBinary(QString const &fileToSendToDC) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString Update::jsonType(enum FileTypeJson type) {
 | 
					QString Update::jsonType(enum FileTypeJson type) {
 | 
				
			||||||
@@ -372,7 +416,7 @@ bool Update::downloadJson(enum FileTypeJson type,
 | 
				
			|||||||
        QFileInfo fi(jsFileToSendToDC); // max. size of template file is 800 bytes
 | 
					        QFileInfo fi(jsFileToSendToDC); // max. size of template file is 800 bytes
 | 
				
			||||||
        if (file.exists()) {
 | 
					        if (file.exists()) {
 | 
				
			||||||
            if (file.open(QIODevice::ReadOnly)) {
 | 
					            if (file.open(QIODevice::ReadOnly)) {
 | 
				
			||||||
                if (fi.size() <= 800) {
 | 
					                if (fi.size() > 0 && fi.size() <= 800) {
 | 
				
			||||||
                    QByteArray ba = file.readAll();
 | 
					                    QByteArray ba = file.readAll();
 | 
				
			||||||
                    // kindOfFile: 1=config, 2=device, 3=cash, 4=serial, 5=time, 6=printer
 | 
					                    // kindOfFile: 1=config, 2=device, 3=cash, 4=serial, 5=time, 6=printer
 | 
				
			||||||
                    //      nrOfTemplate=1...32 if kindOfFile==6
 | 
					                    //      nrOfTemplate=1...32 if kindOfFile==6
 | 
				
			||||||
@@ -561,7 +605,7 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (jsonNr != 0) {
 | 
					        if (jsonNr != 0) {
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
            m_hw->sys_requestJsonVersions(jsonNr);
 | 
					            m_hw->sys_requestJsonVersions(jsonNr);
 | 
				
			||||||
            QThread::msleep(500);
 | 
					            QThread::msleep(500);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -579,6 +623,8 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
 | 
				
			|||||||
            if (installedVersion == fileVersion) {
 | 
					            if (installedVersion == fileVersion) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            qCritical() << "CANNOT FIND JSON-NR FOR" << jsonFileNames[i];
 | 
					            qCritical() << "CANNOT FIND JSON-NR FOR" << jsonFileNames[i];
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@@ -586,7 +632,6 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
 | 
					bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
 | 
				
			||||||
    if (m_sys_areDCdataValid == false) {
 | 
					    if (m_sys_areDCdataValid == false) {
 | 
				
			||||||
        qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
					        qCritical() << "ERROR!!! DC DATA NOT VALID -> CA-MASTER-PLUGIN NOT CONNECTED";
 | 
				
			||||||
@@ -594,30 +639,97 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool res = false;
 | 
					    bool res = false;
 | 
				
			||||||
 | 
					    bool dcDownloadPossible = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QList<QString>::const_iterator it;
 | 
					    QList<QString>::const_iterator it;
 | 
				
			||||||
    for (it = filesToWorkOn.cbegin(); it != filesToWorkOn.cend(); ++it) {
 | 
					    for (it = filesToWorkOn.cbegin(); it != filesToWorkOn.cend(); ++it) {
 | 
				
			||||||
        m_worker->startProgressLoop();
 | 
					        m_worker->startProgressLoop();
 | 
				
			||||||
 | 
					 | 
				
			||||||
        QString const &fToWorkOn = QDir::cleanPath(m_customerRepository + QDir::separator() + it->trimmed());
 | 
					        QString const &fToWorkOn = QDir::cleanPath(m_customerRepository + QDir::separator() + it->trimmed());
 | 
				
			||||||
 | 
					        if (fToWorkOn.endsWith("/dc2c.bin") && dcDownloadPossible) {
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
 | 
					            // download for dc possible only once
 | 
				
			||||||
 | 
					            // download of device-controller should always be the last step
 | 
				
			||||||
 | 
					            dcDownloadPossible = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (fToWorkOn.contains("dc2c.bin")) {
 | 
					            if (!m_hw->dcDownloadRequest(fToWorkOn)) {  // initiate download process
 | 
				
			||||||
 | 
					                qCritical() << "DOWNLOAD-REQUEST-ERROR FOR" << fToWorkOn;
 | 
				
			||||||
 | 
					                continue;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            QThread::sleep(2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            int tries = 5;
 | 
				
			||||||
 | 
					            while (!m_hw->dcDownloadRunning()) { // may take some time
 | 
				
			||||||
 | 
					                if (--tries < 0) {
 | 
				
			||||||
 | 
					                    qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
 | 
				
			||||||
 | 
					                                << "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD NOT RUNNING";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                QThread::sleep(1);
 | 
				
			||||||
 | 
					                continue;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
 | 
				
			||||||
 | 
					                        << "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD RUNNING";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            QThread::sleep(2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            tries = 5;
 | 
				
			||||||
 | 
					            while (!m_hw->dcDownloadReportThreadStart()) { // may take some time
 | 
				
			||||||
 | 
					                if (--tries < 0) {
 | 
				
			||||||
 | 
					                    qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
 | 
				
			||||||
 | 
					                                << "(" << __func__ << ":" << __LINE__ << ") REPORT THREAD NOT STARTED";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                continue;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
 | 
				
			||||||
 | 
					                        << "(" << __func__ << ":" << __LINE__ << ") REPORT THREAD STARTED";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            QThread::sleep(2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            tries = 5;
 | 
				
			||||||
 | 
					            while (!m_hw->dcDownloadReportRunning()) {     // may take some time
 | 
				
			||||||
 | 
					                if (--tries < 0) {
 | 
				
			||||||
 | 
					                    qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
 | 
				
			||||||
 | 
					                                << "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD REPORT NOT RUNNING";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                continue;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
 | 
				
			||||||
 | 
					                        << "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD REPORT RUNNING";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            tries = 1200;
 | 
				
			||||||
 | 
					            while (m_hw->dcDownloadReportRunning()) {
 | 
				
			||||||
 | 
					                QThread::msleep(1000);
 | 
				
			||||||
 | 
					                if (--tries < 0) {
 | 
				
			||||||
 | 
					                    qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
 | 
				
			||||||
 | 
					                                << "(" << __func__ << ":" << __LINE__
 | 
				
			||||||
 | 
					                                << ") DOWNLOAD REPORT STILL RUNNING AFTER 20mins";
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
            bool updateBinaryRes = true;
 | 
					            bool updateBinaryRes = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // CONSOLE()
 | 
					            // CONSOLE()
 | 
				
			||||||
 | 
					#if 0
 | 
				
			||||||
 | 
					            m_hw->dc_autoRequest(false);// default: turn auto-request setting off
 | 
				
			||||||
 | 
					            QThread::sleep(1);          // wait to be sure that there are no more
 | 
				
			||||||
 | 
					                                        // commands sent to dc-hardware
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // m_hw->dc_autoRequest(false);// default: turn auto-request setting off
 | 
					            if ((updateBinaryRes = updateBinary(fToWorkOn)) == true) {
 | 
				
			||||||
            // QThread::sleep(1);          // wait to be sure that there are no more
 | 
					 | 
				
			||||||
            //                            // commands sent to dc-hardware
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // if ((updateBinaryRes = updateBinary(fToWorkOn)) == true) {
 | 
					 | 
				
			||||||
            //
 | 
					 | 
				
			||||||
                // qCritical() << "downloaded binary" << fToWorkOn;
 | 
					                // qCritical() << "downloaded binary" << fToWorkOn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            //    ++displayIndex;
 | 
					                ++displayIndex;
 | 
				
			||||||
            //    emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(2, ' ') + QString(")")
 | 
					                emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(2, ' ') + QString(")")
 | 
				
			||||||
            //        + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
					                    + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
				
			||||||
            //        Worker::UPDATE_STEP_DONE);
 | 
					                    Worker::UPDATE_STEP_DONE);
 | 
				
			||||||
            //}
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            m_hw->dc_autoRequest(true); // turn auto-request setting on
 | 
					            m_hw->dc_autoRequest(true); // turn auto-request setting on
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -633,65 +745,65 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
 | 
				
			|||||||
                    qInfo() << "dc-firmware-version (NOT UPDATED)" << versions[1];
 | 
					                    qInfo() << "dc-firmware-version (NOT UPDATED)" << versions[1];
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
            res = updateBinaryRes;
 | 
					            res = updateBinaryRes;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        } else {
 | 
					        } else if (fToWorkOn.contains("DC2C_print", Qt::CaseInsensitive)
 | 
				
			||||||
            if (fToWorkOn.contains("DC2C_print", Qt::CaseInsensitive)
 | 
					 | 
				
			||||||
                && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
					                && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
				
			||||||
                res = true;
 | 
					            res = true;
 | 
				
			||||||
                int i = fToWorkOn.indexOf("DC2C_print", Qt::CaseInsensitive);
 | 
					            int i = fToWorkOn.indexOf("DC2C_print", Qt::CaseInsensitive);
 | 
				
			||||||
                int const templateIdx = fToWorkOn.mid(i).midRef(10, 2).toInt();
 | 
					            int const templateIdx = fToWorkOn.mid(i).midRef(10, 2).toInt();
 | 
				
			||||||
                if ((templateIdx < 1) || (templateIdx > 32)) {
 | 
					            if ((templateIdx < 1) || (templateIdx > 32)) {
 | 
				
			||||||
                    qCritical() << "WRONG TEMPLATE INDEX" << templateIdx;
 | 
					                qCritical() << "WRONG TEMPLATE INDEX" << templateIdx;
 | 
				
			||||||
                    res = false;
 | 
					 | 
				
			||||||
                } else {
 | 
					 | 
				
			||||||
                    if ((res = updatePrinterTemplate(templateIdx, fToWorkOn))) {
 | 
					 | 
				
			||||||
                        Utils::printInfoMsg(
 | 
					 | 
				
			||||||
                            QString("DOWNLOADED PRINTER TEMPLATE %1 WITH INDEX=%2")
 | 
					 | 
				
			||||||
                                .arg(fToWorkOn)
 | 
					 | 
				
			||||||
                                .arg(templateIdx));
 | 
					 | 
				
			||||||
                        ++displayIndex;
 | 
					 | 
				
			||||||
                        emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
					 | 
				
			||||||
                              + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
					 | 
				
			||||||
                                Worker::UPDATE_STEP_DONE);
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            } else if (fToWorkOn.contains("DC2C_cash", Qt::CaseInsensitive)
 | 
					 | 
				
			||||||
                    && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
					 | 
				
			||||||
                res = true;
 | 
					 | 
				
			||||||
                if ((res = updateCashConf(fToWorkOn))) {
 | 
					 | 
				
			||||||
                    Utils::printInfoMsg(QString("DOWNLOADED CASH TEMPLATE %1").arg(fToWorkOn));
 | 
					 | 
				
			||||||
                    ++displayIndex;
 | 
					 | 
				
			||||||
                    emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
					 | 
				
			||||||
                          + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
					 | 
				
			||||||
                            Worker::UPDATE_STEP_DONE);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            } else if (fToWorkOn.contains("DC2C_conf", Qt::CaseInsensitive)
 | 
					 | 
				
			||||||
                    && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
					 | 
				
			||||||
                res = true;
 | 
					 | 
				
			||||||
                if ((res= updateConfig(fToWorkOn))) {
 | 
					 | 
				
			||||||
                    Utils::printInfoMsg(QString("DOWNLOADED CONFIG TEMPLATE %1").arg(fToWorkOn));
 | 
					 | 
				
			||||||
                    ++displayIndex;
 | 
					 | 
				
			||||||
                    emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
					 | 
				
			||||||
                          + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
					 | 
				
			||||||
                            Worker::UPDATE_STEP_DONE);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            } else if (fToWorkOn.contains("DC2C_device", Qt::CaseInsensitive)
 | 
					 | 
				
			||||||
                    && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
					 | 
				
			||||||
                res = true;
 | 
					 | 
				
			||||||
                if ((res = updateDeviceConf(fToWorkOn))) {
 | 
					 | 
				
			||||||
                    Utils::printInfoMsg(QString("DOWNLOADED DEVICE TEMPLATE %1").arg(fToWorkOn));
 | 
					 | 
				
			||||||
                    ++displayIndex;
 | 
					 | 
				
			||||||
                    emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
					 | 
				
			||||||
                          + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
					 | 
				
			||||||
                            Worker::UPDATE_STEP_DONE);
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
                qCritical() << "UNKNOWN JSON FILE NAME" << fToWorkOn;
 | 
					 | 
				
			||||||
                res = false;
 | 
					                res = false;
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
 | 
					                if ((res = updatePrinterTemplate(templateIdx, fToWorkOn))) {
 | 
				
			||||||
 | 
					                    Utils::printInfoMsg(
 | 
				
			||||||
 | 
					                        QString("DOWNLOADED PRINTER TEMPLATE %1 WITH INDEX=%2")
 | 
				
			||||||
 | 
					                            .arg(fToWorkOn)
 | 
				
			||||||
 | 
					                            .arg(templateIdx));
 | 
				
			||||||
 | 
					                    ++displayIndex;
 | 
				
			||||||
 | 
					                    emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
				
			||||||
 | 
					                          + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
				
			||||||
 | 
					                            Worker::UPDATE_STEP_DONE);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					        } else if (fToWorkOn.contains("DC2C_cash", Qt::CaseInsensitive)
 | 
				
			||||||
 | 
					                && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
				
			||||||
 | 
					            res = true;
 | 
				
			||||||
 | 
					            if ((res = updateCashConf(fToWorkOn))) {
 | 
				
			||||||
 | 
					                Utils::printInfoMsg(QString("DOWNLOADED CASH TEMPLATE %1").arg(fToWorkOn));
 | 
				
			||||||
 | 
					                ++displayIndex;
 | 
				
			||||||
 | 
					                emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
				
			||||||
 | 
					                      + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
				
			||||||
 | 
					                        Worker::UPDATE_STEP_DONE);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else if (fToWorkOn.contains("DC2C_conf", Qt::CaseInsensitive)
 | 
				
			||||||
 | 
					                && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
				
			||||||
 | 
					            res = true;
 | 
				
			||||||
 | 
					            if ((res= updateConfig(fToWorkOn))) {
 | 
				
			||||||
 | 
					                Utils::printInfoMsg(QString("DOWNLOADED CONFIG TEMPLATE %1").arg(fToWorkOn));
 | 
				
			||||||
 | 
					                ++displayIndex;
 | 
				
			||||||
 | 
					                emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
				
			||||||
 | 
					                      + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
				
			||||||
 | 
					                        Worker::UPDATE_STEP_DONE);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else if (fToWorkOn.contains("DC2C_device", Qt::CaseInsensitive)
 | 
				
			||||||
 | 
					                && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
 | 
				
			||||||
 | 
					            res = true;
 | 
				
			||||||
 | 
					            if ((res = updateDeviceConf(fToWorkOn))) {
 | 
				
			||||||
 | 
					                Utils::printInfoMsg(QString("DOWNLOADED DEVICE TEMPLATE %1").arg(fToWorkOn));
 | 
				
			||||||
 | 
					                ++displayIndex;
 | 
				
			||||||
 | 
					                emit m_worker->appendText(QString("\n(") + QString("%1").arg(displayIndex).rightJustified(3, ' ') + QString(")")
 | 
				
			||||||
 | 
					                      + QString(" Update ") + QFileInfo(fToWorkOn).fileName(),
 | 
				
			||||||
 | 
					                        Worker::UPDATE_STEP_DONE);
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					            qCritical() << "UNKNOWN JSON FILE NAME" << fToWorkOn;
 | 
				
			||||||
 | 
					            res = false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        // m_worker->stopProgressLoop();
 | 
				
			||||||
 | 
					        // m_worker->setProgress(100);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (res == false) {
 | 
					        if (res == false) {
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
#include <QProcess>
 | 
					#include <QProcess>
 | 
				
			||||||
#include <QPluginLoader>
 | 
					#include <QPluginLoader>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "plugins/interfaces.h"
 | 
					#include <DeviceController/interfaces.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef PTU5
 | 
					#ifdef PTU5
 | 
				
			||||||
#define SERIAL_PORT "ttymxc2"
 | 
					#define SERIAL_PORT "ttymxc2"
 | 
				
			||||||
@@ -94,6 +94,8 @@ private slots:
 | 
				
			|||||||
    void readyReadStandardOutput();
 | 
					    void readyReadStandardOutput();
 | 
				
			||||||
    void readyReadStandardError();
 | 
					    void readyReadStandardError();
 | 
				
			||||||
    void finished(int exitCode, QProcess::ExitStatus exitStatus);
 | 
					    void finished(int exitCode, QProcess::ExitStatus exitStatus);
 | 
				
			||||||
 | 
					    void onReportDCDownloadStatus(QString const &status);
 | 
				
			||||||
 | 
					    void onReportDCDownloadSuccess(QString const &msg);
 | 
				
			||||||
 | 
					    void onReportDCDownloadFailure(QString const &errorMsg);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
#endif // UPDATE_H_INCLUDED
 | 
					#endif // UPDATE_H_INCLUDED
 | 
				
			||||||
@@ -19,7 +19,7 @@
 | 
				
			|||||||
#include <QScopedPointer>
 | 
					#include <QScopedPointer>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "message_handler.h"
 | 
					#include "message_handler.h"
 | 
				
			||||||
#include "plugins/interfaces.h"
 | 
					#include <DeviceController/interfaces.h>
 | 
				
			||||||
#include "ismas/ismas_client.h"
 | 
					#include "ismas/ismas_client.h"
 | 
				
			||||||
#include "progress_event.h"
 | 
					#include "progress_event.h"
 | 
				
			||||||
#include "mainwindow.h"
 | 
					#include "mainwindow.h"
 | 
				
			||||||
@@ -165,8 +165,14 @@ Worker::Worker(int customerNr,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // TODO: turn object into singleton
 | 
					    // TODO: turn object into singleton
 | 
				
			||||||
    instance = this;
 | 
					    instance = this;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    m_lastFailedUpdateStep = UPDATE_STEP::NONE;
 | 
					    m_lastFailedUpdateStep = UPDATE_STEP::NONE;
 | 
				
			||||||
 | 
					    m_update = new Update(this,
 | 
				
			||||||
 | 
					                          QDir::cleanPath(m_workingDirectory + QDir::separator() + m_customerNrStr),
 | 
				
			||||||
 | 
					                          m_customerNrStr,
 | 
				
			||||||
 | 
					                          m_branchName,
 | 
				
			||||||
 | 
					                          m_pluginDir,
 | 
				
			||||||
 | 
					                          m_pluginName,
 | 
				
			||||||
 | 
					                          m_workingDirectory);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    this->setObjectName("worker-object");
 | 
					    this->setObjectName("worker-object");
 | 
				
			||||||
    QDir::setCurrent(m_workingDirectory);
 | 
					    QDir::setCurrent(m_workingDirectory);
 | 
				
			||||||
@@ -175,6 +181,10 @@ Worker::Worker(int customerNr,
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Worker::~Worker() {
 | 
					Worker::~Worker() {
 | 
				
			||||||
 | 
					    if (m_update != nullptr) {
 | 
				
			||||||
 | 
					        delete m_update;
 | 
				
			||||||
 | 
					        m_update = nullptr;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void Worker::displayProgressInMainWindow(int progress) {
 | 
					void Worker::displayProgressInMainWindow(int progress) {
 | 
				
			||||||
@@ -358,9 +368,7 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
                setProgress(i);             // and switch to branch
 | 
					                setProgress(i);             // and switch to branch
 | 
				
			||||||
                if (m_gc.gitCloneAndCheckoutBranch()) {
 | 
					                if (m_gc.gitCloneAndCheckoutBranch()) {
 | 
				
			||||||
                    if (!isRepositoryCorrupted()) {
 | 
					                    if (!isRepositoryCorrupted()) {
 | 
				
			||||||
                        if (m_versionInfo.size() == 0) {
 | 
					                        m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
				
			||||||
                            m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        GUI() << (ISMAS() << (CONSOLE() << UPDATE_STEP::CLONE_REPOSITORY_SUCCESS));
 | 
					                        GUI() << (ISMAS() << (CONSOLE() << UPDATE_STEP::CLONE_REPOSITORY_SUCCESS));
 | 
				
			||||||
                        continueUpdate = true;
 | 
					                        continueUpdate = true;
 | 
				
			||||||
                        m_clone = true;
 | 
					                        m_clone = true;
 | 
				
			||||||
@@ -390,10 +398,7 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
				
			||||||
    if (m_versionInfo.size() == 0) {
 | 
					 | 
				
			||||||
        m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    CONSOLE() << UPDATE_STEP::CHECK_REPOSITORY_SUCCESS;
 | 
					    CONSOLE() << UPDATE_STEP::CHECK_REPOSITORY_SUCCESS;
 | 
				
			||||||
    setProgress(_CHECKOUT_REPOSITORY_SUCCESS);
 | 
					    setProgress(_CHECKOUT_REPOSITORY_SUCCESS);
 | 
				
			||||||
@@ -411,9 +416,6 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    qCritical() << "**** m_ismasTriggerActive:" << m_ismasTriggerActive;
 | 
					 | 
				
			||||||
    qCritical() << "****              m_clone:" << m_clone;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if (m_ismasTriggerActive == false) {// make it explicit again: only if the
 | 
					    if (m_ismasTriggerActive == false) {// make it explicit again: only if the
 | 
				
			||||||
                                        // ismas trigger is active ('WAIT'),
 | 
					                                        // ismas trigger is active ('WAIT'),
 | 
				
			||||||
                                        // then proceed
 | 
					                                        // then proceed
 | 
				
			||||||
@@ -432,10 +434,22 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
    if ((continueUpdate = customerEnvironment()) == false) {
 | 
					    if ((continueUpdate = customerEnvironment()) == false) {
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
				
			||||||
    lst = QStringList(QString(smap[UPDATE_STEP::CHECKOUT_BRANCH_SUCCESS]));
 | 
					    lst = QStringList(QString(smap[UPDATE_STEP::CHECKOUT_BRANCH_SUCCESS]));
 | 
				
			||||||
    ISMAS(lst) << (CONSOLE(lst) << UPDATE_STEP::CHECKOUT_BRANCH);
 | 
					    ISMAS(lst) << (CONSOLE(lst) << UPDATE_STEP::CHECKOUT_BRANCH);
 | 
				
			||||||
    setProgress(_CHECKOUT_BRANCH_SUCCESS);
 | 
					    setProgress(_CHECKOUT_BRANCH_SUCCESS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    //             (R)SYNC THE REPOSITORY WITH THE LOCAL FILEYSTEM
 | 
				
			||||||
 | 
					    //
 | 
				
			||||||
 | 
					    ////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					    if ((continueUpdate = syncCustomerRepositoryAndFS()) == false) {
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    lst = QStringList(QString(smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS]));
 | 
				
			||||||
 | 
					    ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS));
 | 
				
			||||||
 | 
					    setProgress(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ////////////////////////////////////////////////////////////////////////////
 | 
					    ////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
    //
 | 
					    //
 | 
				
			||||||
@@ -445,6 +459,7 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
    if ((continueUpdate = filesToUpdate()) == false) {
 | 
					    if ((continueUpdate = filesToUpdate()) == false) {
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    m_versionInfo = m_gc.gitShowReason(m_branchName);
 | 
				
			||||||
    lst = QStringList(QString(smap[UPDATE_STEP::UPDATE_REPOSITORY_SUCCESS]));
 | 
					    lst = QStringList(QString(smap[UPDATE_STEP::UPDATE_REPOSITORY_SUCCESS]));
 | 
				
			||||||
    ISMAS() << (GUI() << (CONSOLE() << UPDATE_STEP::UPDATE_REPOSITORY));
 | 
					    ISMAS() << (GUI() << (CONSOLE() << UPDATE_STEP::UPDATE_REPOSITORY));
 | 
				
			||||||
    setProgress(_UPDATE_REPOSITORY_SUCCESS);
 | 
					    setProgress(_UPDATE_REPOSITORY_SUCCESS);
 | 
				
			||||||
@@ -475,19 +490,6 @@ void Worker::privateUpdate() {
 | 
				
			|||||||
    ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE));
 | 
					    ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::DOWNLOAD_FILES_TO_PSA_HARDWARE));
 | 
				
			||||||
    setProgress(_DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS);
 | 
					    setProgress(_DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
    ////////////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
    //
 | 
					 | 
				
			||||||
    //             (R)SYNC THE REPOSITORY WITH THE LOCAL FILEYSTEM
 | 
					 | 
				
			||||||
    //
 | 
					 | 
				
			||||||
    ////////////////////////////////////////////////////////////////////////////
 | 
					 | 
				
			||||||
    if ((continueUpdate = syncCustomerRepositoryAndFS()) == false) {
 | 
					 | 
				
			||||||
        return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    lst = QStringList(QString(smap[UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS]));
 | 
					 | 
				
			||||||
    ISMAS(lst) << (GUI(lst) << (CONSOLE(lst) << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS));
 | 
					 | 
				
			||||||
    setProgress(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    ////////////////////////////////////////////////////////////////////////////
 | 
					    ////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
    //
 | 
					    //
 | 
				
			||||||
    //                            FUTURE: SAVE LOG FILES
 | 
					    //                            FUTURE: SAVE LOG FILES
 | 
				
			||||||
@@ -759,7 +761,7 @@ bool Worker::filesToUpdate() {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        m_filesToUpdate.removeDuplicates();
 | 
					        m_filesToUpdate.removeDuplicates();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        qCritical() << __PRETTY_FUNCTION__ << "FILES-TO-UPDATE" << m_filesToUpdate;
 | 
					        qCritical() << "(" << __func__ << ":" << __LINE__ << ") FILES-TO-UPDATE" << m_filesToUpdate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        GUI(m_filesToUpdate) << (CONSOLE(m_filesToUpdate) << UPDATE_STEP::FILES_TO_UPDATE);
 | 
					        GUI(m_filesToUpdate) << (CONSOLE(m_filesToUpdate) << UPDATE_STEP::FILES_TO_UPDATE);
 | 
				
			||||||
        setProgress(_FILES_TO_UPDATE);
 | 
					        setProgress(_FILES_TO_UPDATE);
 | 
				
			||||||
@@ -896,15 +898,7 @@ bool Worker::downloadFilesToPSAHardware() {
 | 
				
			|||||||
            QStringList lst = m_filesToDownload;
 | 
					            QStringList lst = m_filesToDownload;
 | 
				
			||||||
            ISMAS(lst) << (CONSOLE(lst) << UPDATE_STEP::FILES_TO_DOWNLOAD);
 | 
					            ISMAS(lst) << (CONSOLE(lst) << UPDATE_STEP::FILES_TO_DOWNLOAD);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Update update(this,
 | 
					            if (m_update && m_update->doUpdate(m_displayIndex, m_filesToDownload)) {
 | 
				
			||||||
                          QDir::cleanPath(m_workingDirectory + QDir::separator() + m_customerNrStr),
 | 
					 | 
				
			||||||
                          m_customerNrStr,
 | 
					 | 
				
			||||||
                          m_branchName,
 | 
					 | 
				
			||||||
                          m_pluginDir,
 | 
					 | 
				
			||||||
                          m_pluginName,
 | 
					 | 
				
			||||||
                          m_workingDirectory);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            if (update.doUpdate(m_displayIndex, m_filesToDownload)) {
 | 
					 | 
				
			||||||
                // prepared for use: at the moment, the dc-library does not work
 | 
					                // prepared for use: at the moment, the dc-library does not work
 | 
				
			||||||
                // as expected.
 | 
					                // as expected.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -997,10 +991,12 @@ bool Worker::syncCustomerRepositoryAndFS() {
 | 
				
			|||||||
                QDir dir1(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/psa_tariff"));
 | 
					                QDir dir1(QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/psa_tariff"));
 | 
				
			||||||
                QDir dir2("/etc/psa_tariff");
 | 
					                QDir dir2("/etc/psa_tariff");
 | 
				
			||||||
                if (Utils::sameFilesInDirs(dir1, dir2)) {
 | 
					                if (Utils::sameFilesInDirs(dir1, dir2)) {
 | 
				
			||||||
                    CONSOLE() << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS;
 | 
					                    CONSOLE() <<  QDir::cleanPath(m_customerRepository + QDir::separator() + "etc/psa_tariff")
 | 
				
			||||||
                    setProgress(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
 | 
					                              << "AND /etc/psa_tariff ARE DIFFERENT: CHANGED CUSTOMER-NUMBER?";
 | 
				
			||||||
                    return true;
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                CONSOLE() << UPDATE_STEP::SYNC_CUSTOMER_REPOSITORY_SUCCESS;
 | 
				
			||||||
 | 
					                setProgress(_SYNC_CUSTOMER_REPOSITORY_SUCCESS);
 | 
				
			||||||
 | 
					                return true;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -1037,7 +1033,7 @@ QString Worker::getATBUpdateToolYoctoVersion() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
QString Worker::getAPISMYoctoVersion() {
 | 
					QString Worker::getAPISMYoctoVersion() {
 | 
				
			||||||
    if (QFile::exists("/var/lib/opkg/status")) {
 | 
					    if (QFile::exists("/var/lib/opkg/status")) {
 | 
				
			||||||
        QString const cmd = QString("echo -n $(cat /var/lib/opkg/status | grep -A1 apism | tail -n 1 | cut -d':' -f2 | cut -d' ' -f2)");
 | 
					        QString const cmd = QString("echo -n $(cat /var/lib/opkg/status | grep -A1 -e apism[[:space:]]*$ | tail -n 1 | cut -d':' -f2 | cut -d' ' -f2)");
 | 
				
			||||||
        Command c("bash");
 | 
					        Command c("bash");
 | 
				
			||||||
        if (c.execute("/tmp", QStringList() << "-c" << cmd)) {
 | 
					        if (c.execute("/tmp", QStringList() << "-c" << cmd)) {
 | 
				
			||||||
            return c.getCommandResult(); // 1.4.1.0-r4
 | 
					            return c.getCommandResult(); // 1.4.1.0-r4
 | 
				
			||||||
@@ -1068,6 +1064,17 @@ QString Worker::getAPISMYoctoInstallationStatus()  {
 | 
				
			|||||||
    return "N/A";
 | 
					    return "N/A";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					QString Worker::getDCVersionPreparedForDownload(QString const &filename) {
 | 
				
			||||||
 | 
					    if (QFile::exists(filename)) {  // <customer-repo/etc/dc/dc2c.bin>
 | 
				
			||||||
 | 
					        QString const cmd = QString("strings %1 | grep -e DC2[Cc]\\. | head -n1").arg(filename);
 | 
				
			||||||
 | 
					        Command c("bash");
 | 
				
			||||||
 | 
					        if (c.execute("/tmp", QStringList() << "-c" << cmd)) {
 | 
				
			||||||
 | 
					            return c.getCommandResult(); // DC2c.04.42  14.09.2023
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    return "N/A";
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QString Worker::getATBQTVersion() const {
 | 
					QString Worker::getATBQTVersion() const {
 | 
				
			||||||
    QString const cmd = QString("echo -n $(/opt/app/ATBAPP/ATBQT -v | head -n 2 | cut -d':' -f2)");
 | 
					    QString const cmd = QString("echo -n $(/opt/app/ATBAPP/ATBQT -v | head -n 2 | cut -d':' -f2)");
 | 
				
			||||||
@@ -1190,7 +1197,11 @@ PSAInstalled Worker::getPSAInstalled() {
 | 
				
			|||||||
    psaInstalled.versionInfo.created = "N/A";
 | 
					    psaInstalled.versionInfo.created = "N/A";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (m_versionInfo.size() == 3) {
 | 
					    if (m_versionInfo.size() == 3) {
 | 
				
			||||||
        psaInstalled.versionInfo.lastCommit = m_versionInfo.at(0);
 | 
					        qCritical() << QString("***** %1:%2").arg(__func__).arg(__LINE__)
 | 
				
			||||||
 | 
					                    << "m_versionInfo" << m_versionInfo << "*****";
 | 
				
			||||||
 | 
					        psaInstalled.versionInfo.lastCommit = QString("%1-%2")
 | 
				
			||||||
 | 
					                .arg(QCoreApplication::applicationPid())
 | 
				
			||||||
 | 
					                .arg(m_versionInfo.at(0));
 | 
				
			||||||
        psaInstalled.versionInfo.reason = m_versionInfo.at(1);
 | 
					        psaInstalled.versionInfo.reason = m_versionInfo.at(1);
 | 
				
			||||||
        psaInstalled.versionInfo.created = m_versionInfo.at(2);
 | 
					        psaInstalled.versionInfo.created = m_versionInfo.at(2);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -61,9 +61,12 @@
 | 
				
			|||||||
#define _UPDATE_REPOSITORY_SUCCESS                  (27)
 | 
					#define _UPDATE_REPOSITORY_SUCCESS                  (27)
 | 
				
			||||||
#define _CHECK_FOR_REPOSITORY_CHANGES               (28)
 | 
					#define _CHECK_FOR_REPOSITORY_CHANGES               (28)
 | 
				
			||||||
#define _CHECK_FOR_REPOSITORY_CHANGES_SUCCESS       (29)
 | 
					#define _CHECK_FOR_REPOSITORY_CHANGES_SUCCESS       (29)
 | 
				
			||||||
#define _FILES_TO_UPDATE                            (30)
 | 
					#define _SYNC_CUSTOMER_REPOSITORY                   (30)
 | 
				
			||||||
#define _CHECK_FOR_REPOSITORY_CHANGES_FAILURE       (31)
 | 
					#define _SYNC_CUSTOMER_REPOSITORY_FAILURE           (31)
 | 
				
			||||||
#define _FILES_TO_DOWNLOAD                          (32)
 | 
					#define _SYNC_CUSTOMER_REPOSITORY_SUCCESS           (32)
 | 
				
			||||||
 | 
					#define _FILES_TO_UPDATE                            (33)
 | 
				
			||||||
 | 
					#define _CHECK_FOR_REPOSITORY_CHANGES_FAILURE       (34)
 | 
				
			||||||
 | 
					#define _FILES_TO_DOWNLOAD                          (35)
 | 
				
			||||||
#define _EXEC_OPKG_COMMANDS                         (41)
 | 
					#define _EXEC_OPKG_COMMANDS                         (41)
 | 
				
			||||||
#define _EXEC_OPKG_COMMAND_1                        (42)
 | 
					#define _EXEC_OPKG_COMMAND_1                        (42)
 | 
				
			||||||
#define _EXEC_OPKG_COMMAND_2                        (43)
 | 
					#define _EXEC_OPKG_COMMAND_2                        (43)
 | 
				
			||||||
@@ -86,9 +89,6 @@
 | 
				
			|||||||
#define _DOWNLOAD_DEVICE_CONTROLLER_FAILURE         (86)
 | 
					#define _DOWNLOAD_DEVICE_CONTROLLER_FAILURE         (86)
 | 
				
			||||||
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE     (87)
 | 
					#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_FAILURE     (87)
 | 
				
			||||||
#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS     (88)
 | 
					#define _DOWNLOAD_FILES_TO_PSA_HARDWARE_SUCCESS     (88)
 | 
				
			||||||
#define _SYNC_CUSTOMER_REPOSITORY                   (89)
 | 
					 | 
				
			||||||
#define _SYNC_CUSTOMER_REPOSITORY_FAILURE           (90)
 | 
					 | 
				
			||||||
#define _SYNC_CUSTOMER_REPOSITORY_SUCCESS           (91)
 | 
					 | 
				
			||||||
#define _SAVE_LOGS                                  (92)
 | 
					#define _SAVE_LOGS                                  (92)
 | 
				
			||||||
#define _SAVE_LOGS_FAILURE                          (93)
 | 
					#define _SAVE_LOGS_FAILURE                          (93)
 | 
				
			||||||
#define _SAVE_LOGS_SUCCESS                          (94)
 | 
					#define _SAVE_LOGS_SUCCESS                          (94)
 | 
				
			||||||
@@ -249,7 +249,6 @@ class Worker : public QThread{
 | 
				
			|||||||
                                     << UPDATE_STEP::SEND_LAST_VERSION));
 | 
					                                     << UPDATE_STEP::SEND_LAST_VERSION));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            m_worker->stopProgressLoop();
 | 
					            m_worker->stopProgressLoop();
 | 
				
			||||||
 | 
					 | 
				
			||||||
            m_worker->m_updateProcessRunning = false;
 | 
					            m_worker->m_updateProcessRunning = false;
 | 
				
			||||||
            emit m_worker->enableExit();
 | 
					            emit m_worker->enableExit();
 | 
				
			||||||
            emit m_worker->restartExitTimer();
 | 
					            emit m_worker->restartExitTimer();
 | 
				
			||||||
@@ -370,6 +369,7 @@ public:
 | 
				
			|||||||
    static QString getATBUpdateToolYoctoInstallationStatus();
 | 
					    static QString getATBUpdateToolYoctoInstallationStatus();
 | 
				
			||||||
    static QString getAPISMYoctoVersion();
 | 
					    static QString getAPISMYoctoVersion();
 | 
				
			||||||
    static QString getAPISMYoctoInstallationStatus();
 | 
					    static QString getAPISMYoctoInstallationStatus();
 | 
				
			||||||
 | 
					    static QString getDCVersionPreparedForDownload(QString const &filename);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    static const QString UPDATE_STEP_OK;
 | 
					    static const QString UPDATE_STEP_OK;
 | 
				
			||||||
    static const QString UPDATE_STEP_DONE;
 | 
					    static const QString UPDATE_STEP_DONE;
 | 
				
			||||||
							
								
								
									
										2372
									
								
								plugins/interfaces.h
									
									
									
									
									
								
							
							
						
						
									
										2372
									
								
								plugins/interfaces.h
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user