Dev
This commit is contained in:
parent
ea4c6769f4
commit
d2a37c3b5f
@ -33,7 +33,11 @@ SOURCES += \
|
||||
Sources/CableTestEngine.cpp \
|
||||
Sources/OptionsPage.cpp \
|
||||
Sources/CableTestBenchDefs.cpp \
|
||||
Sources/IOModulesInterface.cpp
|
||||
Sources/IOModulesInterface.cpp \
|
||||
Sources/InputConnector.cpp \
|
||||
Sources/OutputConnector.cpp \
|
||||
Sources/CableParametersData.cpp \
|
||||
Sources/AutomatedTestReport.cpp
|
||||
|
||||
HEADERS += \
|
||||
Sources/MainWindow.h \
|
||||
@ -53,7 +57,12 @@ HEADERS += \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableTestEngine.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/IOModulesInterface.h
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/AutomatedTestReport.h
|
||||
|
||||
FORMS += \
|
||||
Sources/CMainPage.ui \
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by Qt Creator 2.6.2, 2019-05-03T13:46:28. -->
|
||||
<!-- Written by Qt Creator 2.6.2, 2019-05-08T14:15:28. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||
|
||||
2
Makefile
2
Makefile
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: CableTestBench
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Fri May 3 13:12:37 2019
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed May 8 14:10:10 2019
|
||||
# Project: CableTestBench.pro
|
||||
# Template: app
|
||||
# Command: c:\Qt\4.8.1\bin\qmake.exe -spec ..\..\Qt\4.8.1\mkspecs\win32-g++ CONFIG+=declarative_debug -o Makefile CableTestBench.pro
|
||||
|
||||
150
Makefile.Debug
150
Makefile.Debug
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: CableTestBench
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Fri May 3 13:12:37 2019
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed May 8 14:10:10 2019
|
||||
# Project: CableTestBench.pro
|
||||
# Template: app
|
||||
#############################################################################
|
||||
@ -58,7 +58,11 @@ SOURCES = Sources\MainWindow.cpp \
|
||||
Sources\CableTestEngine.cpp \
|
||||
Sources\OptionsPage.cpp \
|
||||
Sources\CableTestBenchDefs.cpp \
|
||||
Sources\IOModulesInterface.cpp debug\moc_MainWindow.cpp \
|
||||
Sources\IOModulesInterface.cpp \
|
||||
Sources\InputConnector.cpp \
|
||||
Sources\OutputConnector.cpp \
|
||||
Sources\CableParametersData.cpp \
|
||||
Sources\AutomatedTestReport.cpp debug\moc_MainWindow.cpp \
|
||||
debug\moc_MainPage.cpp \
|
||||
debug\moc_CableTestBench.cpp \
|
||||
debug\moc_VisualInspectionPage.cpp \
|
||||
@ -67,7 +71,10 @@ SOURCES = Sources\MainWindow.cpp \
|
||||
debug\moc_ConnectorClickZoneWidget.cpp \
|
||||
debug\moc_ONOFFStatusWidget.cpp \
|
||||
debug\moc_ConnectorTestVisualizationWidget.cpp \
|
||||
debug\moc_OptionsPage.cpp
|
||||
debug\moc_CableTestEngine.cpp \
|
||||
debug\moc_OptionsPage.cpp \
|
||||
debug\moc_IOModulesInterface.cpp \
|
||||
debug\moc_AutomatedTestReport.cpp
|
||||
OBJECTS = debug/MainWindow.o \
|
||||
debug/main.o \
|
||||
debug/MainPage.o \
|
||||
@ -86,6 +93,10 @@ OBJECTS = debug/MainWindow.o \
|
||||
debug/OptionsPage.o \
|
||||
debug/CableTestBenchDefs.o \
|
||||
debug/IOModulesInterface.o \
|
||||
debug/InputConnector.o \
|
||||
debug/OutputConnector.o \
|
||||
debug/CableParametersData.o \
|
||||
debug/AutomatedTestReport.o \
|
||||
debug/moc_MainWindow.o \
|
||||
debug/moc_MainPage.o \
|
||||
debug/moc_CableTestBench.o \
|
||||
@ -95,7 +106,10 @@ OBJECTS = debug/MainWindow.o \
|
||||
debug/moc_ConnectorClickZoneWidget.o \
|
||||
debug/moc_ONOFFStatusWidget.o \
|
||||
debug/moc_ConnectorTestVisualizationWidget.o \
|
||||
debug/moc_OptionsPage.o
|
||||
debug/moc_CableTestEngine.o \
|
||||
debug/moc_OptionsPage.o \
|
||||
debug/moc_IOModulesInterface.o \
|
||||
debug/moc_AutomatedTestReport.o
|
||||
DIST =
|
||||
QMAKE_TARGET = CableTestBench
|
||||
DESTDIR = debug\ #avoid trailing-slash linebreak
|
||||
@ -133,7 +147,7 @@ dist:
|
||||
$(ZIP) CableTestBench.zip $(SOURCES) $(DIST) CableTestBench.pro ..\..\Qt\4.8.1\mkspecs\qconfig.pri ..\..\Qt\4.8.1\mkspecs\modules\qt_webkit_version.pri ..\..\Qt\4.8.1\mkspecs\features\qt_functions.prf ..\..\Qt\4.8.1\mkspecs\features\qt_config.prf ..\..\Qt\4.8.1\mkspecs\features\exclusive_builds.prf ..\..\Qt\4.8.1\mkspecs\features\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\debug.prf ..\..\Qt\4.8.1\mkspecs\features\debug_and_release.prf ..\..\Qt\4.8.1\mkspecs\features\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\build_pass.prf ..\..\Qt\4.8.1\mkspecs\features\declarative_debug.prf ..\..\Qt\4.8.1\mkspecs\features\win32\rtti.prf ..\..\Qt\4.8.1\mkspecs\features\win32\exceptions.prf ..\..\Qt\4.8.1\mkspecs\features\win32\stl.prf ..\..\Qt\4.8.1\mkspecs\features\shared.prf ..\..\Qt\4.8.1\mkspecs\features\warn_on.prf ..\..\Qt\4.8.1\mkspecs\features\qt.prf ..\..\Qt\4.8.1\mkspecs\features\win32\thread.prf ..\..\Qt\4.8.1\mkspecs\features\moc.prf ..\..\Qt\4.8.1\mkspecs\features\win32\windows.prf ..\..\Qt\4.8.1\mkspecs\features\resources.prf ..\..\Qt\4.8.1\mkspecs\features\uic.prf ..\..\Qt\4.8.1\mkspecs\features\yacc.prf ..\..\Qt\4.8.1\mkspecs\features\lex.prf ..\..\Qt\4.8.1\mkspecs\features\include_source_dir.prf c:\Qt\4.8.1\lib\qtmaind.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES
|
||||
|
||||
clean: compiler_clean
|
||||
-$(DEL_FILE) debug\MainWindow.o debug\main.o debug\MainPage.o debug\CableTestBench.o debug\VisualInspectionPage.o debug\ConnectorSelectWidget.o debug\CableTestPage.o debug\ConnectorClickZoneWidget.o debug\ONOFFStatusWidget.o debug\ConnectorTestVisualizationWidget.o debug\Connector.o debug\Cable.o debug\VisualInspectionResult.o debug\TestReport.o debug\CableTestEngine.o debug\OptionsPage.o debug\CableTestBenchDefs.o debug\IOModulesInterface.o debug\moc_MainWindow.o debug\moc_MainPage.o debug\moc_CableTestBench.o debug\moc_VisualInspectionPage.o debug\moc_ConnectorSelectWidget.o debug\moc_CableTestPage.o debug\moc_ConnectorClickZoneWidget.o debug\moc_ONOFFStatusWidget.o debug\moc_ConnectorTestVisualizationWidget.o debug\moc_OptionsPage.o
|
||||
-$(DEL_FILE) debug\MainWindow.o debug\main.o debug\MainPage.o debug\CableTestBench.o debug\VisualInspectionPage.o debug\ConnectorSelectWidget.o debug\CableTestPage.o debug\ConnectorClickZoneWidget.o debug\ONOFFStatusWidget.o debug\ConnectorTestVisualizationWidget.o debug\Connector.o debug\Cable.o debug\VisualInspectionResult.o debug\TestReport.o debug\CableTestEngine.o debug\OptionsPage.o debug\CableTestBenchDefs.o debug\IOModulesInterface.o debug\InputConnector.o debug\OutputConnector.o debug\CableParametersData.o debug\AutomatedTestReport.o debug\moc_MainWindow.o debug\moc_MainPage.o debug\moc_CableTestBench.o debug\moc_VisualInspectionPage.o debug\moc_ConnectorSelectWidget.o debug\moc_CableTestPage.o debug\moc_ConnectorClickZoneWidget.o debug\moc_ONOFFStatusWidget.o debug\moc_ConnectorTestVisualizationWidget.o debug\moc_CableTestEngine.o debug\moc_OptionsPage.o debug\moc_IOModulesInterface.o debug\moc_AutomatedTestReport.o
|
||||
|
||||
distclean: clean
|
||||
-$(DEL_FILE) $(DESTDIR_TARGET)
|
||||
@ -145,9 +159,9 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
|
||||
|
||||
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
|
||||
|
||||
compiler_moc_header_make_all: debug/moc_MainWindow.cpp debug/moc_MainPage.cpp debug/moc_CableTestBench.cpp debug/moc_VisualInspectionPage.cpp debug/moc_ConnectorSelectWidget.cpp debug/moc_CableTestPage.cpp debug/moc_ConnectorClickZoneWidget.cpp debug/moc_ONOFFStatusWidget.cpp debug/moc_ConnectorTestVisualizationWidget.cpp debug/moc_OptionsPage.cpp
|
||||
compiler_moc_header_make_all: debug/moc_MainWindow.cpp debug/moc_MainPage.cpp debug/moc_CableTestBench.cpp debug/moc_VisualInspectionPage.cpp debug/moc_ConnectorSelectWidget.cpp debug/moc_CableTestPage.cpp debug/moc_ConnectorClickZoneWidget.cpp debug/moc_ONOFFStatusWidget.cpp debug/moc_ConnectorTestVisualizationWidget.cpp debug/moc_CableTestEngine.cpp debug/moc_OptionsPage.cpp debug/moc_IOModulesInterface.cpp debug/moc_AutomatedTestReport.cpp
|
||||
compiler_moc_header_clean:
|
||||
-$(DEL_FILE) debug\moc_MainWindow.cpp debug\moc_MainPage.cpp debug\moc_CableTestBench.cpp debug\moc_VisualInspectionPage.cpp debug\moc_ConnectorSelectWidget.cpp debug\moc_CableTestPage.cpp debug\moc_ConnectorClickZoneWidget.cpp debug\moc_ONOFFStatusWidget.cpp debug\moc_ConnectorTestVisualizationWidget.cpp debug\moc_OptionsPage.cpp
|
||||
-$(DEL_FILE) debug\moc_MainWindow.cpp debug\moc_MainPage.cpp debug\moc_CableTestBench.cpp debug\moc_VisualInspectionPage.cpp debug\moc_ConnectorSelectWidget.cpp debug\moc_CableTestPage.cpp debug\moc_ConnectorClickZoneWidget.cpp debug\moc_ONOFFStatusWidget.cpp debug\moc_ConnectorTestVisualizationWidget.cpp debug\moc_CableTestEngine.cpp debug\moc_OptionsPage.cpp debug\moc_IOModulesInterface.cpp debug\moc_AutomatedTestReport.cpp
|
||||
debug/moc_MainWindow.cpp: Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
@ -170,8 +184,14 @@ debug/moc_CableTestBench.cpp: Sources/MainWindow.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h \
|
||||
Sources/CableTestBench.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestBench.h -o debug\moc_CableTestBench.cpp
|
||||
|
||||
@ -198,9 +218,29 @@ debug/moc_ConnectorTestVisualizationWidget.cpp: Sources/Widgets/ONOFFStatusWidge
|
||||
Sources/Widgets/ConnectorTestVisualizationWidget.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\Widgets\ConnectorTestVisualizationWidget.h -o debug\moc_ConnectorTestVisualizationWidget.cpp
|
||||
|
||||
debug/moc_CableTestEngine.cpp: Sources/Cable.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestEngine.h -o debug\moc_CableTestEngine.cpp
|
||||
|
||||
debug/moc_OptionsPage.cpp: Sources/OptionsPage.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\OptionsPage.h -o debug\moc_OptionsPage.cpp
|
||||
|
||||
debug/moc_IOModulesInterface.cpp: Sources/IOModulesInterface.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\IOModulesInterface.h -o debug\moc_IOModulesInterface.cpp
|
||||
|
||||
debug/moc_AutomatedTestReport.cpp: Sources/AutomatedTestReport.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\AutomatedTestReport.h -o debug\moc_AutomatedTestReport.cpp
|
||||
|
||||
compiler_rcc_make_all:
|
||||
compiler_rcc_clean:
|
||||
compiler_image_collection_make_all: qmake_image_collection.cpp
|
||||
@ -245,8 +285,14 @@ debug/MainWindow.o: Sources/MainWindow.cpp Sources/MainWindow.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\MainWindow.o Sources\MainWindow.cpp
|
||||
|
||||
debug/main.o: Sources/main.cpp Sources/CableTestBench.h \
|
||||
@ -259,8 +305,14 @@ debug/main.o: Sources/main.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\main.o Sources\main.cpp
|
||||
|
||||
debug/MainPage.o: Sources/MainPage.cpp Sources/MainPage.h \
|
||||
@ -277,8 +329,14 @@ debug/CableTestBench.o: Sources/CableTestBench.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableTestBench.o Sources\CableTestBench.cpp
|
||||
|
||||
debug/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualInspectionPage.h \
|
||||
@ -292,8 +350,14 @@ debug/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualIns
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\VisualInspectionPage.o Sources\VisualInspectionPage.cpp
|
||||
|
||||
debug/ConnectorSelectWidget.o: Sources/Widgets/ConnectorSelectWidget.cpp Sources/Widgets/ConnectorSelectWidget.h \
|
||||
@ -311,8 +375,14 @@ debug/CableTestPage.o: Sources/CableTestPage.cpp Sources/CableTestPage.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableTestPage.o Sources\CableTestPage.cpp
|
||||
|
||||
debug/ConnectorClickZoneWidget.o: Sources/Widgets/ConnectorClickZoneWidget.cpp Sources/Widgets/ConnectorClickZoneWidget.h
|
||||
@ -327,12 +397,16 @@ debug/ConnectorTestVisualizationWidget.o: Sources/Widgets/ConnectorTestVisualiza
|
||||
|
||||
debug/Connector.o: Sources/Connector.cpp Sources/Connector.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\Connector.o Sources\Connector.cpp
|
||||
|
||||
debug/Cable.o: Sources/Cable.cpp Sources/Cable.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\Cable.o Sources\Cable.cpp
|
||||
|
||||
@ -342,14 +416,29 @@ debug/VisualInspectionResult.o: Sources/VisualInspectionResult.cpp Sources/Visua
|
||||
|
||||
debug/TestReport.o: Sources/TestReport.cpp Sources/TestReport.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/VisualInspectionResult.h
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\TestReport.o Sources\TestReport.cpp
|
||||
|
||||
debug/CableTestEngine.o: Sources/CableTestEngine.cpp Sources/CableTestEngine.h \
|
||||
Sources/Cable.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/GlobalDefine.h
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/MainWindow.h \
|
||||
Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/OptionsPage.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableTestEngine.o Sources\CableTestEngine.cpp
|
||||
|
||||
debug/OptionsPage.o: Sources/OptionsPage.cpp Sources/OptionsPage.h \
|
||||
@ -359,9 +448,31 @@ debug/OptionsPage.o: Sources/OptionsPage.cpp Sources/OptionsPage.h \
|
||||
debug/CableTestBenchDefs.o: Sources/CableTestBenchDefs.cpp Sources/CableTestBenchDefs.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableTestBenchDefs.o Sources\CableTestBenchDefs.cpp
|
||||
|
||||
debug/IOModulesInterface.o: Sources/IOModulesInterface.cpp Sources/IOModulesInterface.h
|
||||
debug/IOModulesInterface.o: Sources/IOModulesInterface.cpp Sources/IOModulesInterface.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\IOModulesInterface.o Sources\IOModulesInterface.cpp
|
||||
|
||||
debug/InputConnector.o: Sources/InputConnector.cpp Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/IOModulesInterface.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\InputConnector.o Sources\InputConnector.cpp
|
||||
|
||||
debug/OutputConnector.o: Sources/OutputConnector.cpp Sources/OutputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\OutputConnector.o Sources\OutputConnector.cpp
|
||||
|
||||
debug/CableParametersData.o: Sources/CableParametersData.cpp Sources/CableParametersData.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableParametersData.o Sources\CableParametersData.cpp
|
||||
|
||||
debug/AutomatedTestReport.o: Sources/AutomatedTestReport.cpp Sources/AutomatedTestReport.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\AutomatedTestReport.o Sources\AutomatedTestReport.cpp
|
||||
|
||||
debug/moc_MainWindow.o: debug/moc_MainWindow.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_MainWindow.o debug\moc_MainWindow.cpp
|
||||
|
||||
@ -389,9 +500,18 @@ debug/moc_ONOFFStatusWidget.o: debug/moc_ONOFFStatusWidget.cpp
|
||||
debug/moc_ConnectorTestVisualizationWidget.o: debug/moc_ConnectorTestVisualizationWidget.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_ConnectorTestVisualizationWidget.o debug\moc_ConnectorTestVisualizationWidget.cpp
|
||||
|
||||
debug/moc_CableTestEngine.o: debug/moc_CableTestEngine.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_CableTestEngine.o debug\moc_CableTestEngine.cpp
|
||||
|
||||
debug/moc_OptionsPage.o: debug/moc_OptionsPage.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_OptionsPage.o debug\moc_OptionsPage.cpp
|
||||
|
||||
debug/moc_IOModulesInterface.o: debug/moc_IOModulesInterface.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_IOModulesInterface.o debug\moc_IOModulesInterface.cpp
|
||||
|
||||
debug/moc_AutomatedTestReport.o: debug/moc_AutomatedTestReport.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\moc_AutomatedTestReport.o debug\moc_AutomatedTestReport.cpp
|
||||
|
||||
####### Install
|
||||
|
||||
install: FORCE
|
||||
|
||||
150
Makefile.Release
150
Makefile.Release
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: CableTestBench
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Fri May 3 13:12:37 2019
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Wed May 8 14:10:10 2019
|
||||
# Project: CableTestBench.pro
|
||||
# Template: app
|
||||
#############################################################################
|
||||
@ -58,7 +58,11 @@ SOURCES = Sources\MainWindow.cpp \
|
||||
Sources\CableTestEngine.cpp \
|
||||
Sources\OptionsPage.cpp \
|
||||
Sources\CableTestBenchDefs.cpp \
|
||||
Sources\IOModulesInterface.cpp release\moc_MainWindow.cpp \
|
||||
Sources\IOModulesInterface.cpp \
|
||||
Sources\InputConnector.cpp \
|
||||
Sources\OutputConnector.cpp \
|
||||
Sources\CableParametersData.cpp \
|
||||
Sources\AutomatedTestReport.cpp release\moc_MainWindow.cpp \
|
||||
release\moc_MainPage.cpp \
|
||||
release\moc_CableTestBench.cpp \
|
||||
release\moc_VisualInspectionPage.cpp \
|
||||
@ -67,7 +71,10 @@ SOURCES = Sources\MainWindow.cpp \
|
||||
release\moc_ConnectorClickZoneWidget.cpp \
|
||||
release\moc_ONOFFStatusWidget.cpp \
|
||||
release\moc_ConnectorTestVisualizationWidget.cpp \
|
||||
release\moc_OptionsPage.cpp
|
||||
release\moc_CableTestEngine.cpp \
|
||||
release\moc_OptionsPage.cpp \
|
||||
release\moc_IOModulesInterface.cpp \
|
||||
release\moc_AutomatedTestReport.cpp
|
||||
OBJECTS = release/MainWindow.o \
|
||||
release/main.o \
|
||||
release/MainPage.o \
|
||||
@ -86,6 +93,10 @@ OBJECTS = release/MainWindow.o \
|
||||
release/OptionsPage.o \
|
||||
release/CableTestBenchDefs.o \
|
||||
release/IOModulesInterface.o \
|
||||
release/InputConnector.o \
|
||||
release/OutputConnector.o \
|
||||
release/CableParametersData.o \
|
||||
release/AutomatedTestReport.o \
|
||||
release/moc_MainWindow.o \
|
||||
release/moc_MainPage.o \
|
||||
release/moc_CableTestBench.o \
|
||||
@ -95,7 +106,10 @@ OBJECTS = release/MainWindow.o \
|
||||
release/moc_ConnectorClickZoneWidget.o \
|
||||
release/moc_ONOFFStatusWidget.o \
|
||||
release/moc_ConnectorTestVisualizationWidget.o \
|
||||
release/moc_OptionsPage.o
|
||||
release/moc_CableTestEngine.o \
|
||||
release/moc_OptionsPage.o \
|
||||
release/moc_IOModulesInterface.o \
|
||||
release/moc_AutomatedTestReport.o
|
||||
DIST =
|
||||
QMAKE_TARGET = CableTestBench
|
||||
DESTDIR = release\ #avoid trailing-slash linebreak
|
||||
@ -133,7 +147,7 @@ dist:
|
||||
$(ZIP) CableTestBench.zip $(SOURCES) $(DIST) CableTestBench.pro ..\..\Qt\4.8.1\mkspecs\qconfig.pri ..\..\Qt\4.8.1\mkspecs\modules\qt_webkit_version.pri ..\..\Qt\4.8.1\mkspecs\features\qt_functions.prf ..\..\Qt\4.8.1\mkspecs\features\qt_config.prf ..\..\Qt\4.8.1\mkspecs\features\exclusive_builds.prf ..\..\Qt\4.8.1\mkspecs\features\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_pre.prf ..\..\Qt\4.8.1\mkspecs\features\release.prf ..\..\Qt\4.8.1\mkspecs\features\debug_and_release.prf ..\..\Qt\4.8.1\mkspecs\features\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\win32\default_post.prf ..\..\Qt\4.8.1\mkspecs\features\build_pass.prf ..\..\Qt\4.8.1\mkspecs\features\declarative_debug.prf ..\..\Qt\4.8.1\mkspecs\features\win32\rtti.prf ..\..\Qt\4.8.1\mkspecs\features\win32\exceptions.prf ..\..\Qt\4.8.1\mkspecs\features\win32\stl.prf ..\..\Qt\4.8.1\mkspecs\features\shared.prf ..\..\Qt\4.8.1\mkspecs\features\warn_on.prf ..\..\Qt\4.8.1\mkspecs\features\qt.prf ..\..\Qt\4.8.1\mkspecs\features\win32\thread.prf ..\..\Qt\4.8.1\mkspecs\features\moc.prf ..\..\Qt\4.8.1\mkspecs\features\win32\windows.prf ..\..\Qt\4.8.1\mkspecs\features\resources.prf ..\..\Qt\4.8.1\mkspecs\features\uic.prf ..\..\Qt\4.8.1\mkspecs\features\yacc.prf ..\..\Qt\4.8.1\mkspecs\features\lex.prf ..\..\Qt\4.8.1\mkspecs\features\include_source_dir.prf c:\Qt\4.8.1\lib\qtmain.prl HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES
|
||||
|
||||
clean: compiler_clean
|
||||
-$(DEL_FILE) release\MainWindow.o release\main.o release\MainPage.o release\CableTestBench.o release\VisualInspectionPage.o release\ConnectorSelectWidget.o release\CableTestPage.o release\ConnectorClickZoneWidget.o release\ONOFFStatusWidget.o release\ConnectorTestVisualizationWidget.o release\Connector.o release\Cable.o release\VisualInspectionResult.o release\TestReport.o release\CableTestEngine.o release\OptionsPage.o release\CableTestBenchDefs.o release\IOModulesInterface.o release\moc_MainWindow.o release\moc_MainPage.o release\moc_CableTestBench.o release\moc_VisualInspectionPage.o release\moc_ConnectorSelectWidget.o release\moc_CableTestPage.o release\moc_ConnectorClickZoneWidget.o release\moc_ONOFFStatusWidget.o release\moc_ConnectorTestVisualizationWidget.o release\moc_OptionsPage.o
|
||||
-$(DEL_FILE) release\MainWindow.o release\main.o release\MainPage.o release\CableTestBench.o release\VisualInspectionPage.o release\ConnectorSelectWidget.o release\CableTestPage.o release\ConnectorClickZoneWidget.o release\ONOFFStatusWidget.o release\ConnectorTestVisualizationWidget.o release\Connector.o release\Cable.o release\VisualInspectionResult.o release\TestReport.o release\CableTestEngine.o release\OptionsPage.o release\CableTestBenchDefs.o release\IOModulesInterface.o release\InputConnector.o release\OutputConnector.o release\CableParametersData.o release\AutomatedTestReport.o release\moc_MainWindow.o release\moc_MainPage.o release\moc_CableTestBench.o release\moc_VisualInspectionPage.o release\moc_ConnectorSelectWidget.o release\moc_CableTestPage.o release\moc_ConnectorClickZoneWidget.o release\moc_ONOFFStatusWidget.o release\moc_ConnectorTestVisualizationWidget.o release\moc_CableTestEngine.o release\moc_OptionsPage.o release\moc_IOModulesInterface.o release\moc_AutomatedTestReport.o
|
||||
|
||||
distclean: clean
|
||||
-$(DEL_FILE) $(DESTDIR_TARGET)
|
||||
@ -145,9 +159,9 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
|
||||
|
||||
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
|
||||
|
||||
compiler_moc_header_make_all: release/moc_MainWindow.cpp release/moc_MainPage.cpp release/moc_CableTestBench.cpp release/moc_VisualInspectionPage.cpp release/moc_ConnectorSelectWidget.cpp release/moc_CableTestPage.cpp release/moc_ConnectorClickZoneWidget.cpp release/moc_ONOFFStatusWidget.cpp release/moc_ConnectorTestVisualizationWidget.cpp release/moc_OptionsPage.cpp
|
||||
compiler_moc_header_make_all: release/moc_MainWindow.cpp release/moc_MainPage.cpp release/moc_CableTestBench.cpp release/moc_VisualInspectionPage.cpp release/moc_ConnectorSelectWidget.cpp release/moc_CableTestPage.cpp release/moc_ConnectorClickZoneWidget.cpp release/moc_ONOFFStatusWidget.cpp release/moc_ConnectorTestVisualizationWidget.cpp release/moc_CableTestEngine.cpp release/moc_OptionsPage.cpp release/moc_IOModulesInterface.cpp release/moc_AutomatedTestReport.cpp
|
||||
compiler_moc_header_clean:
|
||||
-$(DEL_FILE) release\moc_MainWindow.cpp release\moc_MainPage.cpp release\moc_CableTestBench.cpp release\moc_VisualInspectionPage.cpp release\moc_ConnectorSelectWidget.cpp release\moc_CableTestPage.cpp release\moc_ConnectorClickZoneWidget.cpp release\moc_ONOFFStatusWidget.cpp release\moc_ConnectorTestVisualizationWidget.cpp release\moc_OptionsPage.cpp
|
||||
-$(DEL_FILE) release\moc_MainWindow.cpp release\moc_MainPage.cpp release\moc_CableTestBench.cpp release\moc_VisualInspectionPage.cpp release\moc_ConnectorSelectWidget.cpp release\moc_CableTestPage.cpp release\moc_ConnectorClickZoneWidget.cpp release\moc_ONOFFStatusWidget.cpp release\moc_ConnectorTestVisualizationWidget.cpp release\moc_CableTestEngine.cpp release\moc_OptionsPage.cpp release\moc_IOModulesInterface.cpp release\moc_AutomatedTestReport.cpp
|
||||
release/moc_MainWindow.cpp: Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
@ -170,8 +184,14 @@ release/moc_CableTestBench.cpp: Sources/MainWindow.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h \
|
||||
Sources/CableTestBench.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestBench.h -o release\moc_CableTestBench.cpp
|
||||
|
||||
@ -198,9 +218,29 @@ release/moc_ConnectorTestVisualizationWidget.cpp: Sources/Widgets/ONOFFStatusWid
|
||||
Sources/Widgets/ConnectorTestVisualizationWidget.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\Widgets\ConnectorTestVisualizationWidget.h -o release\moc_ConnectorTestVisualizationWidget.cpp
|
||||
|
||||
release/moc_CableTestEngine.cpp: Sources/Cable.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\CableTestEngine.h -o release\moc_CableTestEngine.cpp
|
||||
|
||||
release/moc_OptionsPage.cpp: Sources/OptionsPage.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\OptionsPage.h -o release\moc_OptionsPage.cpp
|
||||
|
||||
release/moc_IOModulesInterface.cpp: Sources/IOModulesInterface.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\IOModulesInterface.h -o release\moc_IOModulesInterface.cpp
|
||||
|
||||
release/moc_AutomatedTestReport.cpp: Sources/AutomatedTestReport.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\AutomatedTestReport.h -o release\moc_AutomatedTestReport.cpp
|
||||
|
||||
compiler_rcc_make_all:
|
||||
compiler_rcc_clean:
|
||||
compiler_image_collection_make_all: qmake_image_collection.cpp
|
||||
@ -245,8 +285,14 @@ release/MainWindow.o: Sources/MainWindow.cpp Sources/MainWindow.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\MainWindow.o Sources\MainWindow.cpp
|
||||
|
||||
release/main.o: Sources/main.cpp Sources/CableTestBench.h \
|
||||
@ -259,8 +305,14 @@ release/main.o: Sources/main.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\main.o Sources\main.cpp
|
||||
|
||||
release/MainPage.o: Sources/MainPage.cpp Sources/MainPage.h \
|
||||
@ -277,8 +329,14 @@ release/CableTestBench.o: Sources/CableTestBench.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableTestBench.o Sources\CableTestBench.cpp
|
||||
|
||||
release/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualInspectionPage.h \
|
||||
@ -292,8 +350,14 @@ release/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualI
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\VisualInspectionPage.o Sources\VisualInspectionPage.cpp
|
||||
|
||||
release/ConnectorSelectWidget.o: Sources/Widgets/ConnectorSelectWidget.cpp Sources/Widgets/ConnectorSelectWidget.h \
|
||||
@ -311,8 +375,14 @@ release/CableTestPage.o: Sources/CableTestPage.cpp Sources/CableTestPage.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
Sources/TestReport.h
|
||||
Sources/InputConnector.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableTestPage.o Sources\CableTestPage.cpp
|
||||
|
||||
release/ConnectorClickZoneWidget.o: Sources/Widgets/ConnectorClickZoneWidget.cpp Sources/Widgets/ConnectorClickZoneWidget.h
|
||||
@ -327,12 +397,16 @@ release/ConnectorTestVisualizationWidget.o: Sources/Widgets/ConnectorTestVisuali
|
||||
|
||||
release/Connector.o: Sources/Connector.cpp Sources/Connector.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\Connector.o Sources\Connector.cpp
|
||||
|
||||
release/Cable.o: Sources/Cable.cpp Sources/Cable.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\Cable.o Sources\Cable.cpp
|
||||
|
||||
@ -342,14 +416,29 @@ release/VisualInspectionResult.o: Sources/VisualInspectionResult.cpp Sources/Vis
|
||||
|
||||
release/TestReport.o: Sources/TestReport.cpp Sources/TestReport.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/VisualInspectionResult.h
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\TestReport.o Sources\TestReport.cpp
|
||||
|
||||
release/CableTestEngine.o: Sources/CableTestEngine.cpp Sources/CableTestEngine.h \
|
||||
Sources/Cable.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/GlobalDefine.h
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/OutputConnector.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/TestReport.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/MainWindow.h \
|
||||
Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/OptionsPage.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableTestEngine.o Sources\CableTestEngine.cpp
|
||||
|
||||
release/OptionsPage.o: Sources/OptionsPage.cpp Sources/OptionsPage.h \
|
||||
@ -359,9 +448,31 @@ release/OptionsPage.o: Sources/OptionsPage.cpp Sources/OptionsPage.h \
|
||||
release/CableTestBenchDefs.o: Sources/CableTestBenchDefs.cpp Sources/CableTestBenchDefs.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableTestBenchDefs.o Sources\CableTestBenchDefs.cpp
|
||||
|
||||
release/IOModulesInterface.o: Sources/IOModulesInterface.cpp Sources/IOModulesInterface.h
|
||||
release/IOModulesInterface.o: Sources/IOModulesInterface.cpp Sources/IOModulesInterface.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\IOModulesInterface.o Sources\IOModulesInterface.cpp
|
||||
|
||||
release/InputConnector.o: Sources/InputConnector.cpp Sources/InputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/IOModulesInterface.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\InputConnector.o Sources\InputConnector.cpp
|
||||
|
||||
release/OutputConnector.o: Sources/OutputConnector.cpp Sources/OutputConnector.h \
|
||||
Sources/Connector.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\OutputConnector.o Sources\OutputConnector.cpp
|
||||
|
||||
release/CableParametersData.o: Sources/CableParametersData.cpp Sources/CableParametersData.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableParametersData.o Sources\CableParametersData.cpp
|
||||
|
||||
release/AutomatedTestReport.o: Sources/AutomatedTestReport.cpp Sources/AutomatedTestReport.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\AutomatedTestReport.o Sources\AutomatedTestReport.cpp
|
||||
|
||||
release/moc_MainWindow.o: release/moc_MainWindow.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_MainWindow.o release\moc_MainWindow.cpp
|
||||
|
||||
@ -389,9 +500,18 @@ release/moc_ONOFFStatusWidget.o: release/moc_ONOFFStatusWidget.cpp
|
||||
release/moc_ConnectorTestVisualizationWidget.o: release/moc_ConnectorTestVisualizationWidget.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_ConnectorTestVisualizationWidget.o release\moc_ConnectorTestVisualizationWidget.cpp
|
||||
|
||||
release/moc_CableTestEngine.o: release/moc_CableTestEngine.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_CableTestEngine.o release\moc_CableTestEngine.cpp
|
||||
|
||||
release/moc_OptionsPage.o: release/moc_OptionsPage.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_OptionsPage.o release\moc_OptionsPage.cpp
|
||||
|
||||
release/moc_IOModulesInterface.o: release/moc_IOModulesInterface.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_IOModulesInterface.o release\moc_IOModulesInterface.cpp
|
||||
|
||||
release/moc_AutomatedTestReport.o: release/moc_AutomatedTestReport.cpp
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\moc_AutomatedTestReport.o release\moc_AutomatedTestReport.cpp
|
||||
|
||||
####### Install
|
||||
|
||||
install: FORCE
|
||||
|
||||
94
Sources/AutomatedTestReport.cpp
Normal file
94
Sources/AutomatedTestReport.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
#include "AutomatedTestReport.h"
|
||||
#include "GlobalDefine.h"
|
||||
|
||||
CAutomatedTestReport::CAutomatedTestReport(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
int CAutomatedTestReport::ClearAutomatedTestReport()
|
||||
{
|
||||
mTestPinsResult.clear();
|
||||
mPinCount = 0;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CAutomatedTestReport::SetPinCount(int Pincount)
|
||||
{
|
||||
mPinCount = Pincount;
|
||||
mTestPinsResult.clear();
|
||||
for(int i = 0; i < Pincount; i++)
|
||||
{
|
||||
mTestPinsResult.append(CPinTestResult(i+1));
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CAutomatedTestReport::SetPinResult(int PinNumber, bool ContinuityPassed, bool IsolationPassed)
|
||||
{
|
||||
int ZeroBasedPinIndex = PinNumber - 1;
|
||||
if(ZeroBasedPinIndex < 0 || ZeroBasedPinIndex >= mPinCount) //Try not to crash.
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
mTestPinsResult[ZeroBasedPinIndex].mIsolationTestPass = IsolationPassed;
|
||||
mTestPinsResult[ZeroBasedPinIndex].mContinuityTestPass = ContinuityPassed;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
int CAutomatedTestReport::SetPinContinuityResult(int PinNumber,bool ContinuityPassed)
|
||||
{
|
||||
int ZeroBasedPinIndex = PinNumber - 1;
|
||||
if(ZeroBasedPinIndex < 0 || ZeroBasedPinIndex >= mPinCount) //Try not to crash.
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
mTestPinsResult[ZeroBasedPinIndex].mContinuityTestPass = ContinuityPassed;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CAutomatedTestReport::SetPinIsolationResult(int PinNumber, bool IsolationPassed)
|
||||
{
|
||||
int ZeroBasedPinIndex = PinNumber - 1;
|
||||
if(ZeroBasedPinIndex < 0 || ZeroBasedPinIndex >= mPinCount) //Try not to crash.
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
mTestPinsResult[ZeroBasedPinIndex].mIsolationTestPass = IsolationPassed;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CAutomatedTestReport::SetPinSecondTestResult(int PinNumber, bool SecondTestPassed)
|
||||
{
|
||||
int ZeroBasedPinIndex = PinNumber - 1;
|
||||
if(ZeroBasedPinIndex < 0 || ZeroBasedPinIndex >= mPinCount) //Try not to crash.
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
mTestPinsResult[ZeroBasedPinIndex].mSecondTestPass = SecondTestPassed;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
CPinTestResult::CPinTestResult(int PinNumber)
|
||||
{
|
||||
mPinNumber = PinNumber;
|
||||
mContinuityTestPass = PIN_TEST_RESULT_UNKNOWN;
|
||||
mIsolationTestPass = PIN_TEST_RESULT_UNKNOWN;
|
||||
mSecondTestPass = PIN_TEST_RESULT_UNKNOWN;
|
||||
mShortedPinsList.clear();
|
||||
}
|
||||
|
||||
CPinTestResult::~CPinTestResult()
|
||||
{
|
||||
mShortedPinsList.clear();
|
||||
}
|
||||
55
Sources/AutomatedTestReport.h
Normal file
55
Sources/AutomatedTestReport.h
Normal file
@ -0,0 +1,55 @@
|
||||
#ifndef AUTOMATEDTESTREPORT_H
|
||||
#define AUTOMATEDTESTREPORT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QList>
|
||||
|
||||
class CPinTestResult;
|
||||
|
||||
class CAutomatedTestReport : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CAutomatedTestReport(QObject *parent = 0);
|
||||
|
||||
int ClearAutomatedTestReport();
|
||||
int SetPinCount(int Pincount);
|
||||
|
||||
int SetPinResult(int PinNumber,bool ContinuityPassed, bool IsolationPassed);
|
||||
int SetPinContinuityResult(int PinNumber,bool ContinuityPassed);
|
||||
int SetPinIsolationResult(int PinNumber, bool IsolationPassed);
|
||||
int SetPinSecondTestResult(int PinNumber, bool SecondTestPassed);
|
||||
|
||||
private:
|
||||
QList<CPinTestResult> mTestPinsResult;
|
||||
int mPinCount;
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
};
|
||||
|
||||
class CPinTestResult
|
||||
{
|
||||
public:
|
||||
enum ePinTestResultDef
|
||||
{
|
||||
PIN_TEST_FAILED,
|
||||
PIN_TEST_SUCCESS,
|
||||
PIN_TEST_RESULT_UNKNOWN
|
||||
};
|
||||
|
||||
explicit CPinTestResult(int PinNumber);
|
||||
~CPinTestResult();
|
||||
|
||||
int mPinNumber;
|
||||
int mContinuityTestPass;
|
||||
int mIsolationTestPass;
|
||||
int mSecondTestPass;
|
||||
|
||||
QList<int> mShortedPinsList;
|
||||
|
||||
};
|
||||
|
||||
#endif // AUTOMATEDTESTREPORT_H
|
||||
@ -1,14 +1,20 @@
|
||||
#include "Cable.h"
|
||||
|
||||
CCable::CCable(CConnectorDefs::eConnectorType InputConnectorType)
|
||||
CCable::CCable(CConnectorDefs::eConnectorType InputConnectorType, CIOModulesInterface *IOInterface)
|
||||
{
|
||||
mInputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE);
|
||||
mOutputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE);
|
||||
|
||||
mInputConnector.SetIOInterface(IOInterface);
|
||||
mOutputConnector.SetIOInterface(IOInterface);
|
||||
DefineCableByInputConnector(InputConnectorType);
|
||||
// mInputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE);
|
||||
// mOutputConnector.SetConnectorType(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE);
|
||||
mCableDefined = false;
|
||||
mIOInterfaceHandle = IOInterface;
|
||||
}
|
||||
|
||||
int CCable::DefineCableByInputConnector(CConnectorDefs::eConnectorType InputConnectorType)
|
||||
{
|
||||
mOutputPinsBuffer.clear();
|
||||
switch(InputConnectorType)
|
||||
{
|
||||
case CConnectorDefs::INPUT_6_PINS_CONNECTOR_TYPE:
|
||||
@ -54,6 +60,7 @@ int CCable::DefineCableByInputConnector(CConnectorDefs::eConnectorType InputConn
|
||||
|
||||
}
|
||||
|
||||
mOutputPinsBuffer = QBitArray(mOutputConnector.GetPinCount());
|
||||
mCableDefined = true;
|
||||
return RET_OK;
|
||||
|
||||
@ -64,12 +71,20 @@ bool CCable::IsCableDefined()
|
||||
return mCableDefined;
|
||||
}
|
||||
|
||||
CConnector *CCable::GetInputConnector()
|
||||
CInputConnector *CCable::GetInputConnector()
|
||||
{
|
||||
return &mInputConnector;
|
||||
}
|
||||
|
||||
CConnector *CCable::GetOutputConnector()
|
||||
COutputConnector *CCable::GetOutputConnector()
|
||||
{
|
||||
return &mOutputConnector;
|
||||
}
|
||||
|
||||
int CCable::ClearAllOutputConnectorPins()
|
||||
{
|
||||
mOutputPinsBuffer.fill(false);
|
||||
|
||||
return mOutputConnector.SetOutputPins(mOutputPinsBuffer);
|
||||
|
||||
}
|
||||
|
||||
@ -2,24 +2,32 @@
|
||||
#define CABLE_H
|
||||
|
||||
#include "CableTestBenchDefs.h"
|
||||
#include "Connector.h"
|
||||
#include "InputConnector.h"
|
||||
#include "OutputConnector.h"
|
||||
#include "GlobalDefine.h"
|
||||
#include "IOModulesInterface.h"
|
||||
|
||||
class CCable
|
||||
{
|
||||
public:
|
||||
CCable(CConnectorDefs::eConnectorType InputConnectorType);
|
||||
CCable(CConnectorDefs::eConnectorType InputConnectorType,CIOModulesInterface *IOInterface);
|
||||
|
||||
int DefineCableByInputConnector(CConnectorDefs::eConnectorType InputConnectorType);
|
||||
CConnector *GetInputConnector();
|
||||
CConnector *GetOutputConnector();
|
||||
CInputConnector *GetInputConnector();
|
||||
COutputConnector *GetOutputConnector();
|
||||
|
||||
bool IsCableDefined();
|
||||
|
||||
int ClearAllOutputConnectorPins();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
CConnector mInputConnector, mOutputConnector;
|
||||
CInputConnector mInputConnector;
|
||||
COutputConnector mOutputConnector;
|
||||
bool mCableDefined;
|
||||
CIOModulesInterface *mIOInterfaceHandle;
|
||||
QBitArray mOutputPinsBuffer;
|
||||
|
||||
};
|
||||
|
||||
|
||||
37
Sources/CableParametersData.cpp
Normal file
37
Sources/CableParametersData.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
#include "CableParametersData.h"
|
||||
#include "GlobalDefine.h"
|
||||
|
||||
CCableParametersData::CCableParametersData()
|
||||
{
|
||||
ResetData();
|
||||
}
|
||||
|
||||
int CCableParametersData::ResetData()
|
||||
{
|
||||
mStationName.clear();
|
||||
mCableIdentification.clear();
|
||||
mCableType.clear();
|
||||
mTestOperatorName.clear();
|
||||
|
||||
mInputConnectorType.clear();
|
||||
mOutputConnectorType.clear();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableParametersData::SetCableParams(QString StationName, QString CableIdentification, QString CableType, QString OperatorName)
|
||||
{
|
||||
mStationName = StationName;
|
||||
mCableIdentification = CableIdentification;
|
||||
mCableType = CableType;
|
||||
mTestOperatorName = OperatorName;
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableParametersData::SetCableType(QString InputConnectortype, QString OutputConnectorType)
|
||||
{
|
||||
mInputConnectorType = InputConnectortype;
|
||||
mOutputConnectorType = OutputConnectorType;
|
||||
return RET_OK;
|
||||
}
|
||||
29
Sources/CableParametersData.h
Normal file
29
Sources/CableParametersData.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef CABLEPARAMETERSDATA_H
|
||||
#define CABLEPARAMETERSDATA_H
|
||||
|
||||
#include <QString>
|
||||
#include <Connector.h>
|
||||
|
||||
class CCableParametersData
|
||||
{
|
||||
public:
|
||||
CCableParametersData();
|
||||
|
||||
int ResetData();
|
||||
|
||||
int SetCableParams(QString StationName, QString CableIdentification, QString CableType, QString OperatorName);
|
||||
int SetCableType(QString InputConnectortype, QString OutputConnectorType);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
QString mStationName;
|
||||
QString mCableIdentification; //Cable name
|
||||
QString mCableType; //permanent or temporary
|
||||
QString mTestOperatorName;
|
||||
|
||||
QString mInputConnectorType;
|
||||
QString mOutputConnectorType;
|
||||
};
|
||||
|
||||
#endif // CABLEPARAMETERSDATA_H
|
||||
@ -1,9 +1,10 @@
|
||||
#include "CableTestBench.h"
|
||||
#include <QDateTime>
|
||||
#include "CableTestBenchDefs.h"
|
||||
|
||||
CCableTestBench::CCableTestBench(QObject *parent) :
|
||||
QObject(parent),
|
||||
mActualCable(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE)
|
||||
mActualCable(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE,&mIOInterface)
|
||||
{
|
||||
w = new MainWindow(0,this);
|
||||
}
|
||||
@ -23,11 +24,20 @@ int CCableTestBench::Start()
|
||||
mVisualInspPageHandle = w->mVisualInspPage;
|
||||
mCableTestPageHandle = w->mCableTestPage;
|
||||
|
||||
|
||||
mCableTestEngine.InitCableTestEngine(this);
|
||||
|
||||
mIOInterface.OpenIOModules();
|
||||
|
||||
mCableTestPageHandle->mGuiRefreshTimer.start();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
CCable * CCableTestBench::GetActualCable()
|
||||
{
|
||||
return &mActualCable;
|
||||
}
|
||||
|
||||
quint8 CCableTestBench::DecToBCDByte(const quint8 byte)
|
||||
{
|
||||
@ -73,6 +83,8 @@ CCable* CCableTestBench::SetSelectedConnector(CConnectorDefs::eConnectorType Con
|
||||
return 0;
|
||||
}
|
||||
|
||||
CheckIfReadyForTesting();
|
||||
|
||||
return &mActualCable;
|
||||
}
|
||||
|
||||
@ -90,5 +102,140 @@ int CCableTestBench::VisualInspectionQuitRequest()
|
||||
|
||||
w->ShowCableTestPage();
|
||||
|
||||
CheckIfReadyForTesting();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestBench::StartPauseAutomaticTestRequest()
|
||||
{
|
||||
if(mCableTestEngine.GetTestEngineCurrentMode() == CCableTestEngine::CABLE_TEST_STBY_MODE)
|
||||
{
|
||||
mCableTestPageHandle->FillReportCableParametersData(mCableTestReport.GetReportCableParameters());
|
||||
mCableTestReport.GetReportCableParameters()->SetCableType(CConnectorDefs::GetConnectorDescription(mActualCable.GetInputConnector()->GetConnectorType()),
|
||||
CConnectorDefs::GetConnectorDescription(mActualCable.GetOutputConnector()->GetConnectorType()));
|
||||
mCableTestReport.GetAutomatedTestReport()->SetPinCount(mActualCable.mOutputConnector.GetPinCount());
|
||||
|
||||
mCableTestEngine.StartAutomatedTest();
|
||||
return RET_OK;
|
||||
}
|
||||
if(mCableTestEngine.GetTestEngineCurrentMode() == CCableTestEngine::CABLE_AUTO_TEST_RUNNING_MODE)
|
||||
{
|
||||
mCableTestEngine.PauseAutomatedTest();
|
||||
return RET_OK;
|
||||
}
|
||||
if(mCableTestEngine.GetTestEngineCurrentMode() == CCableTestEngine::CABLE_AUTO_TEST_PAUSED_MODE)
|
||||
{
|
||||
mCableTestEngine.ResumeAutomatedTest();
|
||||
return RET_OK;
|
||||
}
|
||||
else //Button shouldn't be used in manual mode...
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestBench::StartStopManualTestRequest()
|
||||
{
|
||||
if(mCableTestEngine.GetTestEngineCurrentMode() == CCableTestEngine::CABLE_TEST_STBY_MODE)
|
||||
{
|
||||
mCableTestEngine.StartManualTest();
|
||||
return RET_OK;
|
||||
}
|
||||
if(mCableTestEngine.GetTestEngineCurrentMode() == CCableTestEngine::CABLE_TEST_MANUAL_MODE)
|
||||
{
|
||||
mCableTestEngine.StopManualTest();
|
||||
return RET_OK;
|
||||
}
|
||||
else //Button shouldn't be used in Automatic mode...
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
int CCableTestBench::NewCableRequest()
|
||||
{
|
||||
mActualCable.DefineCableByInputConnector(CConnectorDefs::UNKNOWN_CONNECTOR_TYPE);
|
||||
mVisualInspPageHandle->ResetForm();
|
||||
mCableTestPageHandle->ResetCable();
|
||||
mCableTestPageHandle->DisableStartTestBtn();
|
||||
mCableTestReport.CreateNewTestReport();
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestBench::CheckIfReadyForTesting()
|
||||
{
|
||||
bool VisualInspectionDone = false, ConnectorSelected = false, CableConfigured = true;
|
||||
|
||||
mVisualInspPageHandle->FillVisualInspectionResultReport(mCableTestReport.GetInspectionResult());
|
||||
if(mCableTestReport.GetInspectionResult()->IsVisualInspectionResultComplete() == true)
|
||||
{
|
||||
VisualInspectionDone = true;
|
||||
}
|
||||
//todo, use the options flag to bypass visual inspection
|
||||
VisualInspectionDone = true;
|
||||
|
||||
ConnectorSelected = mActualCable.IsCableDefined();
|
||||
|
||||
if(VisualInspectionDone && ConnectorSelected && CableConfigured)
|
||||
{
|
||||
mCableTestPageHandle->EnableStartTestBtn();
|
||||
}
|
||||
else
|
||||
{
|
||||
mCableTestPageHandle->DisableStartTestBtn();
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestBench::CableEngineModeChanged(CCableTestEngine::eCableTestEngineMode Mode)
|
||||
{
|
||||
switch(Mode)
|
||||
{
|
||||
case CCableTestEngine::CABLE_TEST_STBY_MODE:
|
||||
{
|
||||
mCableTestPageHandle->CableTestEnded();
|
||||
break;
|
||||
}
|
||||
case CCableTestEngine::CABLE_AUTO_TEST_RUNNING_MODE:
|
||||
{
|
||||
mCableTestPageHandle->CableAutomaticTestStarted();
|
||||
break;
|
||||
}
|
||||
case CCableTestEngine::CABLE_AUTO_TEST_PAUSED_MODE:
|
||||
{
|
||||
mCableTestPageHandle->CableAutomaticTestPaused();
|
||||
break;
|
||||
}
|
||||
case CCableTestEngine::CABLE_TEST_MANUAL_MODE:
|
||||
{
|
||||
mCableTestPageHandle->CableManualTestStarted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestBench::ResetAutomaticTestRequest()
|
||||
{
|
||||
return mCableTestEngine.StopAutomatedTest();
|
||||
|
||||
}
|
||||
|
||||
int CCableTestBench::ManualPinToggleRequest(int ConnectorPinNbr)
|
||||
{
|
||||
return mCableTestEngine.ManualPinToggle(ConnectorPinNbr);
|
||||
}
|
||||
|
||||
int CCableTestBench::RefreshConnectorsStateRequest()
|
||||
{
|
||||
mCableTestPageHandle->SetInputConnectorState(mActualCable.GetInputConnector()->GetInputPinsStates());
|
||||
mCableTestPageHandle->SetOutputConnectorState(mActualCable.GetOutputConnector()->GetOutputPinsStates());
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
@ -8,12 +8,14 @@
|
||||
#include "Cable.h"
|
||||
#include "TestReport.h"
|
||||
#include "IOModulesInterface.h"
|
||||
#include "CableTestEngine.h"
|
||||
|
||||
|
||||
class CMainPage;
|
||||
class CVisualInspectionPage;
|
||||
class CCableTestPage;
|
||||
|
||||
|
||||
class CCableTestBench : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -28,21 +30,33 @@ public:
|
||||
CVisualInspectionPage *mVisualInspPageHandle;
|
||||
CCableTestPage *mCableTestPageHandle;
|
||||
CCable mActualCable;
|
||||
CCableTestEngine mCableTestEngine;
|
||||
|
||||
CIOModulesInterface mIOInterface;
|
||||
|
||||
int ExecVisualInspectionRequest();
|
||||
int VisualInspectionQuitRequest();
|
||||
int StartPauseAutomaticTestRequest();
|
||||
int NewCableRequest();
|
||||
int ResetAutomaticTestRequest();
|
||||
int StartStopManualTestRequest();
|
||||
int ManualPinToggleRequest(int ConnectorPinNbr);
|
||||
int RefreshConnectorsStateRequest();
|
||||
|
||||
|
||||
CCable *SetSelectedConnector(CConnectorDefs::eConnectorType ConType);
|
||||
|
||||
CCable *GetActualCable();
|
||||
|
||||
int CableEngineModeChanged(CCableTestEngine::eCableTestEngineMode Mode);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
quint16 DecToBCDWord(const quint16 word);
|
||||
quint8 DecToBCDByte(const quint8 byte);
|
||||
int CheckIfReadyForTesting();
|
||||
|
||||
CTestReport mCableTestReport;
|
||||
|
||||
|
||||
@ -1,23 +1,37 @@
|
||||
#include "CableTestBenchDefs.h"
|
||||
|
||||
const int CConnectorDefs::ConnIOMapping[CConnectorDefs::NB_CONNECTOR_TYPE][2] = {
|
||||
const int CConnectorDefs::ConnIOMapping[CConnectorDefs::NB_CONNECTOR_TYPE][2] = { //Connectors pins mapping (zero based index)
|
||||
{0,0}, //Unknown
|
||||
{97,102}, //in 6 pins
|
||||
{91,104}, //in 14 pins
|
||||
{73,96}, //in 24 pins
|
||||
{1,72}, //in 72 pins
|
||||
{1,90}, //in 90 pins
|
||||
{1,108}, //in 108 pins
|
||||
{1,108}, //in 120 pins
|
||||
{97,102}, //out 6 pins
|
||||
{91,104}, //out 14 pins
|
||||
{73,96}, //out 24 pins
|
||||
{1,72}, //out 72 pins
|
||||
{1,108}, //out 108 pins
|
||||
{96,101}, //in 6 pins
|
||||
{90,103}, //in 14 pins
|
||||
{72,95}, //in 24 pins
|
||||
{0,71}, //in 72 pins
|
||||
{0,89}, //in 90 pins
|
||||
{0,107}, //in 108 pins
|
||||
{0,107}, //in 120 pins
|
||||
{96,101}, //out 6 pins
|
||||
{90,103}, //out 14 pins
|
||||
{72,95}, //out 24 pins
|
||||
{0,71}, //out 72 pins
|
||||
{0,107}, //out 108 pins
|
||||
};
|
||||
|
||||
const int CConnectorDefs::ConnPinCount[NB_CONNECTOR_TYPE] = {0, 6, 14, 24, 72, 90, 108, 120, 6, 14, 24, 72, 108};
|
||||
|
||||
const char* CConnectorDefs::ConnectorDescription[NB_CONNECTOR_TYPE] = {"Connecteur inconnu ou invalide",
|
||||
"Connecteur circulaire 6 contacts",
|
||||
"Connecteur circulair 14 contacts",
|
||||
"Connecteur Amphenol rectangulaire 24 contacts",
|
||||
"Connecteur Amphenol rectangulaire 72 contacts",
|
||||
"Connecteur Souriau rectangulaire 90 contacts",
|
||||
"Connecteur Amphenol rectangulaire 108 contacts",
|
||||
"Connecteur Souriau rectangulaire 120 contacts",
|
||||
"Connecteur circulaire 6 contacts",
|
||||
"Connecteur circulair 14 contacts",
|
||||
"Connecteur Amphenol rectangulaire 24 contacts",
|
||||
"Connecteur Amphenol rectangulaire 72 contacts",
|
||||
"Connecteur Amphenol rectangulaire 108 contacts"};
|
||||
|
||||
|
||||
|
||||
const int CConnectorDefs::GetPinCount(eConnectorType type)
|
||||
@ -59,3 +73,13 @@ const int * CConnectorDefs::GetConnectorIOMapping(eConnectorType type)
|
||||
|
||||
return ConnIOMapping[type];
|
||||
}
|
||||
|
||||
const char * CConnectorDefs::GetConnectorDescription(eConnectorType type)
|
||||
{
|
||||
if(type < 0 || type >= NB_CONNECTOR_TYPE)
|
||||
{
|
||||
return ConnectorDescription[UNKNOWN_CONNECTOR_TYPE];
|
||||
}
|
||||
|
||||
return ConnectorDescription[type];
|
||||
}
|
||||
|
||||
@ -29,12 +29,15 @@ public:
|
||||
|
||||
static const int ConnIOMapping[NB_CONNECTOR_TYPE][2];
|
||||
static const int ConnPinCount[NB_CONNECTOR_TYPE];
|
||||
static const char* ConnectorDescription[NB_CONNECTOR_TYPE];
|
||||
|
||||
static const int GetPinCount(eConnectorType type);
|
||||
static const int GetConnectorIOMappingStart(eConnectorType type);
|
||||
static const int GetConnectorIOMappingEnd(eConnectorType type);
|
||||
static const int* GetConnectorIOMapping(eConnectorType type);
|
||||
|
||||
static const char* GetConnectorDescription(eConnectorType type);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -1,5 +1,354 @@
|
||||
#include "CableTestEngine.h"
|
||||
#include "CableTestBench.h"
|
||||
|
||||
CCableTestEngine::CCableTestEngine()
|
||||
{
|
||||
|
||||
mCableTestSMState = CABLE_TEST_INIT_STATE;
|
||||
}
|
||||
|
||||
CCableTestEngine::~CCableTestEngine()
|
||||
{
|
||||
delete mCableTestSMTimer;
|
||||
}
|
||||
|
||||
int CCableTestEngine::InitCableTestEngine(CCableTestBench *ProgramHandle)
|
||||
{
|
||||
mProgramHandle = ProgramHandle;
|
||||
mTestCable = ProgramHandle->GetActualCable();
|
||||
mTestInputConnectorHandle = mTestCable->GetInputConnector();
|
||||
mTestOutputConnectorHandle = mTestCable->GetOutputConnector();
|
||||
|
||||
|
||||
mCableTestSMTimer = new QTimer();
|
||||
mCableTestSMTimer->setSingleShot(false);
|
||||
mCableTestSMTimer->setInterval(TEST_ENGINE_SM_TIMEOUT);
|
||||
mCableTestSMTimer->stop();
|
||||
connect(mCableTestSMTimer,SIGNAL(timeout()),this,SLOT(SMTimerExpired()));
|
||||
|
||||
//TODO: Get this from the options page...
|
||||
mPinHoldTime = 500; //ms
|
||||
|
||||
CableTestEngineStateMachine(CABLE_TEST_TICK_SM_EVENT);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
{
|
||||
switch(mCableTestSMState)
|
||||
{
|
||||
case CABLE_TEST_INIT_STATE:
|
||||
{
|
||||
mCableTestSMState = CABLE_TEST_STBY_STATE;
|
||||
mCableTestSMTimer->start();
|
||||
break;
|
||||
}//case CABLE_TEST_INIT_STATE
|
||||
|
||||
case CABLE_TEST_STBY_STATE:
|
||||
{
|
||||
switch(Event)
|
||||
{
|
||||
case CABLE_TEST_START_AUTO_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_TEST_START_AUTOMATED_TEST_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_START_MANUAL_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_TEST_START_MANUAL_TEST_STATE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}// case CABLE_TEST_STBY_STATE
|
||||
|
||||
case CABLE_TEST_START_AUTOMATED_TEST_STATE:
|
||||
{
|
||||
mTestOutputConnectorHandle->ClearAllPins();
|
||||
mCableTestSMState = CABLE_AUTO_TEST_SELF_TEST_STATE;
|
||||
|
||||
mCableTestGPTimer.start();
|
||||
|
||||
qDebug("Test automatique démarré...");
|
||||
break;
|
||||
}//case CABLE_TEST_START_AUTOMATED_TEST_STATE
|
||||
|
||||
case CABLE_AUTO_TEST_SELF_TEST_STATE:
|
||||
{
|
||||
if(mCableTestGPTimer.elapsed() < mPinHoldTime)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mTestOutputConnectorHandle->GetOutputPinsStates().count(true) != 0)
|
||||
{
|
||||
//TODO: Manage this failure mode
|
||||
qDebug("Échec de l'auto test des modules de sortie");
|
||||
}
|
||||
else
|
||||
{
|
||||
mCurPinUnderTest = 1;
|
||||
mTestOutputConnectorHandle->SetSinglePin(mCurPinUnderTest);
|
||||
//OK
|
||||
}
|
||||
|
||||
mCableTestGPTimer.start();
|
||||
mCableTestSMState = CABLE_AUTO_TEST_PINS_STATE;
|
||||
}
|
||||
break;
|
||||
}//case CABLE_AUTO_TEST_SELF_TEST_STATE
|
||||
|
||||
case CABLE_AUTO_TEST_PINS_STATE:
|
||||
{
|
||||
switch(Event)
|
||||
{
|
||||
case CABLE_TEST_TICK_SM_EVENT:
|
||||
{
|
||||
if(mCableTestGPTimer.elapsed() < mPinHoldTime)
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
QBitArray Out = mTestOutputConnectorHandle->GetOutputPinsStates();
|
||||
QBitArray In = mTestInputConnectorHandle->GetInputPinsStates();
|
||||
|
||||
//Analyse the inputs buffer...
|
||||
|
||||
if(In.count(true) != 1) //check if only 1 input pin is active
|
||||
{
|
||||
//TODO: Manage this failure mode
|
||||
|
||||
if(In.count(true) == 0) //Check if no input pin is active
|
||||
{
|
||||
qDebug("Échec du test du contact %d : aucune pin activée en entrée",mCurPinUnderTest);
|
||||
}
|
||||
else //If here, many input pins are active...
|
||||
{
|
||||
qDebug("Échec du test du contact %d : plusieurs (%d) pins activées en entrée",mCurPinUnderTest,In.count(true));
|
||||
}
|
||||
}
|
||||
else if(In.at(mCurPinUnderTest-1) == false)
|
||||
{
|
||||
//TODO: Manage this failure mode
|
||||
//the output pin isn't set...
|
||||
qDebug("Échec du test du contact %d: mauvais contact activé en entrée",mCurPinUnderTest);
|
||||
}
|
||||
else
|
||||
{
|
||||
//Pin test passed. Test the next one
|
||||
qDebug("Succès du test du contact %d", mCurPinUnderTest);
|
||||
}
|
||||
mCurPinUnderTest++;
|
||||
if(mCurPinUnderTest > (mTestOutputConnectorHandle->GetPinCount()))
|
||||
{
|
||||
//Test finished.
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE;
|
||||
}
|
||||
else
|
||||
{
|
||||
mTestOutputConnectorHandle->SetSinglePin(mCurPinUnderTest);
|
||||
mCableTestGPTimer.start();
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_PAUSE_AUTO_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_PAUSE_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
qDebug("Test mis en pause...");
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_CANCEL_AUTO_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE;
|
||||
qDebug("Test annulé...");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
}//case CABLE_AUTO_TEST_PINS_STATE:
|
||||
|
||||
case CABLE_AUTO_TEST_PAUSE_STATE:
|
||||
{
|
||||
switch(Event)
|
||||
{
|
||||
case CABLE_TEST_RESUME_AUTO_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_PINS_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
qDebug("Test redémarré...");
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_CANCEL_AUTO_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE;
|
||||
qDebug("Test annulé...");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}//case CABLE_AUTO_TEST_PAUSE_STATE
|
||||
|
||||
case CABLE_AUTO_TEST_END_TEST_STATE:
|
||||
{
|
||||
qDebug("Test automatique terminé...");
|
||||
mTestOutputConnectorHandle->ClearAllPins();
|
||||
mCableTestSMState = CABLE_TEST_STBY_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
break;
|
||||
}//case CABLE_TEST_END_TEST_STATE
|
||||
|
||||
case CABLE_TEST_START_MANUAL_TEST_STATE:
|
||||
{
|
||||
mTestOutputConnectorHandle->ClearAllPins();
|
||||
qDebug("Entrée en mode test manuel");
|
||||
mCableTestSMState = CABLE_MANUAL_TEST_PINS_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
break;
|
||||
}//CABLE_TEST_START_MANUAL_TEST_STATE
|
||||
|
||||
case CABLE_MANUAL_TEST_PINS_STATE:
|
||||
{
|
||||
switch(Event)
|
||||
{
|
||||
case CABLE_TEST_EXIT_MANUAL_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_MANUAL_TEST_END_TEST_STATE;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}//CABLE_MANUAL_TEST_PINS_STATE
|
||||
|
||||
case CABLE_MANUAL_TEST_END_TEST_STATE:
|
||||
{
|
||||
mTestOutputConnectorHandle->ClearAllPins();
|
||||
mCableTestSMState = CABLE_TEST_STBY_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CCableTestEngine::SMTimerExpired()
|
||||
{
|
||||
//TODO: manage the end of the test
|
||||
CableTestEngineStateMachine(CABLE_TEST_TICK_SM_EVENT);
|
||||
|
||||
}
|
||||
|
||||
int CCableTestEngine::StartAutomatedTest()
|
||||
{
|
||||
if(mCableTestSMState != CABLE_TEST_STBY_STATE)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
CableTestEngineStateMachine(CABLE_TEST_START_AUTO_TEST_SM_EVENT);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestEngine::PauseAutomatedTest()
|
||||
{
|
||||
CableTestEngineStateMachine(CABLE_TEST_PAUSE_AUTO_TEST_SM_EVENT);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestEngine::ResumeAutomatedTest()
|
||||
{
|
||||
CableTestEngineStateMachine(CABLE_TEST_RESUME_AUTO_TEST_SM_EVENT);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestEngine::StopAutomatedTest()
|
||||
{
|
||||
CableTestEngineStateMachine(CABLE_TEST_CANCEL_AUTO_TEST_SM_EVENT);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestEngine::StartManualTest()
|
||||
{
|
||||
CableTestEngineStateMachine(CABLE_TEST_START_MANUAL_TEST_SM_EVENT);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestEngine::StopManualTest()
|
||||
{
|
||||
CableTestEngineStateMachine(CABLE_TEST_EXIT_MANUAL_TEST_SM_EVENT);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
CCableTestEngine::eCableTestEngineMode CCableTestEngine::GetTestEngineCurrentMode()
|
||||
{
|
||||
switch(mCableTestSMState)
|
||||
{
|
||||
case CABLE_TEST_INIT_STATE:
|
||||
case CABLE_TEST_STBY_STATE:
|
||||
case CABLE_AUTO_TEST_END_TEST_STATE:
|
||||
case CABLE_MANUAL_TEST_END_TEST_STATE:
|
||||
{
|
||||
return CABLE_TEST_STBY_MODE;
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_START_AUTOMATED_TEST_STATE:
|
||||
case CABLE_AUTO_TEST_SELF_TEST_STATE:
|
||||
case CABLE_AUTO_TEST_PINS_STATE:
|
||||
{
|
||||
return CABLE_AUTO_TEST_RUNNING_MODE;
|
||||
break;
|
||||
}
|
||||
case CABLE_AUTO_TEST_PAUSE_STATE:
|
||||
{
|
||||
return CABLE_AUTO_TEST_PAUSED_MODE;
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_START_MANUAL_TEST_STATE:
|
||||
case CABLE_MANUAL_TEST_PINS_STATE:
|
||||
default:
|
||||
{
|
||||
return CABLE_TEST_MANUAL_MODE;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
int CCableTestEngine::ManualPinToggle(int ConnectorPinNbr)
|
||||
{
|
||||
if(GetTestEngineCurrentMode() == CABLE_TEST_MANUAL_MODE)
|
||||
{
|
||||
return mTestOutputConnectorHandle->TogglePin(ConnectorPinNbr);
|
||||
}
|
||||
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
@ -1,16 +1,92 @@
|
||||
#ifndef CABLETESTENGINE_H
|
||||
#define CABLETESTENGINE_H
|
||||
#include "Cable.h"
|
||||
#include <QTimer>
|
||||
#include "InputConnector.h"
|
||||
#include "OutputConnector.h"
|
||||
#include <QElapsedTimer>
|
||||
#include "TestReport.h"
|
||||
|
||||
class CCableTestEngine
|
||||
class CCableTestBench;
|
||||
|
||||
#define TEST_ENGINE_SM_STANDBY_TIMEOUT 300 //ms
|
||||
#define TEST_ENGINE_SM_TIMEOUT 100 //ms
|
||||
|
||||
class CCableTestEngine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
enum eCableTestEngineMode
|
||||
{
|
||||
CABLE_TEST_STBY_MODE,
|
||||
CABLE_AUTO_TEST_RUNNING_MODE,
|
||||
CABLE_AUTO_TEST_PAUSED_MODE,
|
||||
CABLE_TEST_MANUAL_MODE
|
||||
};
|
||||
|
||||
CCableTestEngine();
|
||||
~CCableTestEngine();
|
||||
int InitCableTestEngine(CCableTestBench *ProgramHandle);
|
||||
|
||||
int StartAutomatedTest();
|
||||
int PauseAutomatedTest();
|
||||
int ResumeAutomatedTest();
|
||||
int StopAutomatedTest();
|
||||
int StartManualTest();
|
||||
int StopManualTest();
|
||||
int ManualPinToggle(int ConnectorPinNbr);
|
||||
|
||||
bool IsAutomaticTestRunning();
|
||||
eCableTestEngineMode GetTestEngineCurrentMode();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
CCable *mTestCable;
|
||||
enum eCableTestState
|
||||
{
|
||||
CABLE_TEST_INIT_STATE,
|
||||
CABLE_TEST_STBY_STATE,
|
||||
CABLE_TEST_START_AUTOMATED_TEST_STATE,
|
||||
CABLE_AUTO_TEST_SELF_TEST_STATE,
|
||||
CABLE_AUTO_TEST_PINS_STATE,
|
||||
CABLE_AUTO_TEST_PAUSE_STATE,
|
||||
CABLE_AUTO_TEST_END_TEST_STATE,
|
||||
CABLE_TEST_START_MANUAL_TEST_STATE,
|
||||
CABLE_MANUAL_TEST_PINS_STATE,
|
||||
CABLE_MANUAL_TEST_END_TEST_STATE
|
||||
};
|
||||
|
||||
enum eCableTestSMEvents
|
||||
{
|
||||
CABLE_TEST_START_AUTO_TEST_SM_EVENT,
|
||||
CABLE_TEST_TICK_SM_EVENT,
|
||||
CABLE_TEST_PAUSE_AUTO_TEST_SM_EVENT,
|
||||
CABLE_TEST_RESUME_AUTO_TEST_SM_EVENT,
|
||||
CABLE_TEST_CANCEL_AUTO_TEST_SM_EVENT,
|
||||
CABLE_TEST_START_MANUAL_TEST_SM_EVENT,
|
||||
CABLE_TEST_EXIT_MANUAL_TEST_SM_EVENT
|
||||
|
||||
};
|
||||
|
||||
CCable *mTestCable;
|
||||
int mCableTestSMState;
|
||||
CCableTestBench *mProgramHandle;
|
||||
CInputConnector *mTestInputConnectorHandle;
|
||||
COutputConnector *mTestOutputConnectorHandle;
|
||||
int mCurPinUnderTest;
|
||||
int mPinHoldTime;
|
||||
|
||||
QTimer *mCableTestSMTimer;
|
||||
QElapsedTimer mCableTestGPTimer;
|
||||
|
||||
void CableTestEngineStateMachine(int Event);
|
||||
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void SMTimerExpired();
|
||||
|
||||
|
||||
};
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include "ui_CableTestPage.h"
|
||||
#include "CableTestBench.h"
|
||||
#include <QTextCodec>
|
||||
#include "CableParametersData.h"
|
||||
|
||||
CCableTestPage::CCableTestPage(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
@ -22,6 +23,30 @@ CCableTestPage::CCableTestPage(QWidget *parent) :
|
||||
ui->mInputTestVisualisationWidget->SetConnectorPinCount(0);
|
||||
ui->mOutputTestVisualisationWidget->SetConnectorPinCount(0);
|
||||
ui->mVisualInspStepChkBx->setCheckable(false);
|
||||
|
||||
|
||||
mGuiRefreshTimer.setSingleShot(false);
|
||||
mGuiRefreshTimer.setInterval(200);
|
||||
|
||||
|
||||
connect(ui->mStartTestBtn,SIGNAL(clicked()),this,SLOT(StartTestBtnClicked()));
|
||||
connect(ui->mReinitTestBtn,SIGNAL(clicked()),this,SLOT(ResetTestBtnClicked()));
|
||||
connect(ui->mNewCableBtn,SIGNAL(clicked()),this,SLOT(NewCableBtnClicked()));
|
||||
connect(ui->mStartManualTestBtn,SIGNAL(clicked()),this,SLOT(StartManualTestBtnClicked()));
|
||||
connect(ui->mOutputTestVisualisationWidget,SIGNAL(PinClicked(int)),this,SLOT(OutputConnectorPinClicked(int)));
|
||||
connect(&mGuiRefreshTimer,SIGNAL(timeout()),this,SLOT(GuiRefreshTimerExpired()));
|
||||
|
||||
|
||||
|
||||
mDefaultCableName = "CABLE_XX_NO_AA_BB.c";
|
||||
mDefaultInspectorName = "JFMartel";
|
||||
|
||||
ui->mStartTestBtn->setEnabled(false);
|
||||
ui->mStartManualTestBtn->setEnabled(false);
|
||||
ui->mOutputTestVisualisationWidget->DisablePinClicks();
|
||||
|
||||
|
||||
ResetCable();
|
||||
}
|
||||
|
||||
CCableTestPage::~CCableTestPage()
|
||||
@ -65,3 +90,157 @@ void CCableTestPage::ConnectorSelectionChanged(CConnectorDefs::eConnectorType Co
|
||||
ui->mOutputTestVisualisationWidget->SetConnectorPinCount(Cable->GetOutputConnector()->GetPinCount());
|
||||
}
|
||||
}
|
||||
|
||||
void CCableTestPage::StartTestBtnClicked()
|
||||
{
|
||||
mProgramHandle->StartPauseAutomaticTestRequest();
|
||||
}
|
||||
|
||||
void CCableTestPage::StartManualTestBtnClicked()
|
||||
{
|
||||
mProgramHandle->StartStopManualTestRequest();
|
||||
}
|
||||
|
||||
void CCableTestPage::ResetTestBtnClicked()
|
||||
{
|
||||
mProgramHandle->ResetAutomaticTestRequest();
|
||||
}
|
||||
|
||||
void CCableTestPage::NewCableBtnClicked()
|
||||
{
|
||||
mProgramHandle->NewCableRequest();
|
||||
}
|
||||
|
||||
int CCableTestPage::ResetCable()
|
||||
{
|
||||
//reset pins state visualization area
|
||||
ui->mInputTestVisualisationWidget->ClearConnectorsLists();
|
||||
ui->mOutputTestVisualisationWidget->ClearConnectorsLists();
|
||||
|
||||
//Reset cable config zone
|
||||
ui->mIdentCableEditBox->setText(mDefaultCableName);
|
||||
ui->mNomTesteurEditBox->setText(mDefaultInspectorName);
|
||||
|
||||
//Reset Inspection Visuelle result (main program will clear the form)
|
||||
SetVisualInspectionDone(false);
|
||||
|
||||
//Clear connector selection zone
|
||||
ui->mConnectorSelectWidget->ClearAllConnectorsSelections();
|
||||
|
||||
return RET_OK;
|
||||
|
||||
}
|
||||
|
||||
int CCableTestPage::EnableStartTestBtn()
|
||||
{
|
||||
ui->mStartTestBtn->setEnabled(true);
|
||||
ui->mStartManualTestBtn->setEnabled(true);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestPage::DisableStartTestBtn()
|
||||
{
|
||||
ui->mStartTestBtn->setEnabled(false);
|
||||
ui->mStartManualTestBtn->setEnabled(false);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestPage::CableAutomaticTestStarted()
|
||||
{
|
||||
ui->mStartManualTestBtn->setEnabled(false);
|
||||
DisableGuiForTest();
|
||||
ui->mStartTestBtn->setText("Pauser Test");
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestPage::CableAutomaticTestPaused()
|
||||
{
|
||||
ui->mStartTestBtn->setText("Reprendre Test");
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestPage::CableTestEnded()
|
||||
{
|
||||
EnableGuiAfterTest();
|
||||
ui->mOutputTestVisualisationWidget->DisablePinClicks();
|
||||
ui->mStartManualTestBtn->setEnabled(true);
|
||||
ui->mStartTestBtn->setEnabled(true);
|
||||
ui->mStartTestBtn->setText("Démarrer Test");
|
||||
ui->mStartManualTestBtn->setText("Démarrer");
|
||||
ui->mReinitTestBtn->setEnabled(true);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestPage::CableManualTestStarted()
|
||||
{
|
||||
ui->mStartTestBtn->setEnabled(false);
|
||||
ui->mOutputTestVisualisationWidget->EnablePinClicks();
|
||||
DisableGuiForTest();
|
||||
ui->mStartManualTestBtn->setText("Terminer");
|
||||
ui->mReinitTestBtn->setEnabled(false);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestPage::DisableGuiForTest()
|
||||
{
|
||||
ui->mNewCableBtn->setEnabled(false);
|
||||
ui->mConnectorSelectWidget->setEnabled(false);
|
||||
ui->mIdentCableEditBox->setEnabled(false);
|
||||
ui->mExecInspVisuelleBtn->setEnabled(false);
|
||||
ui->mNomTesteurEditBox->setEnabled(false);
|
||||
ui->mTypeCableCombo->setEnabled(false);
|
||||
ui->mStationNameCombo->setEnabled(false);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestPage::EnableGuiAfterTest()
|
||||
{
|
||||
ui->mNewCableBtn->setEnabled(true);
|
||||
ui->mConnectorSelectWidget->setEnabled(true);
|
||||
ui->mIdentCableEditBox->setEnabled(true);
|
||||
ui->mExecInspVisuelleBtn->setEnabled(true);
|
||||
ui->mNomTesteurEditBox->setEnabled(true);
|
||||
ui->mTypeCableCombo->setEnabled(true);
|
||||
ui->mStationNameCombo->setEnabled(true);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void CCableTestPage::OutputConnectorPinClicked(int PinNbr)
|
||||
{
|
||||
mProgramHandle->ManualPinToggleRequest(PinNbr);
|
||||
}
|
||||
|
||||
void CCableTestPage::GuiRefreshTimerExpired()
|
||||
{
|
||||
mProgramHandle->RefreshConnectorsStateRequest();
|
||||
}
|
||||
|
||||
int CCableTestPage::SetOutputConnectorState(QBitArray PinStates)
|
||||
{
|
||||
return ui->mOutputTestVisualisationWidget->SetConnectorPinStates(PinStates);
|
||||
}
|
||||
|
||||
int CCableTestPage::SetInputConnectorState(QBitArray PinStates)
|
||||
{
|
||||
return ui->mInputTestVisualisationWidget->SetConnectorPinStates(PinStates);
|
||||
}
|
||||
|
||||
void CCableTestPage::showEvent(QShowEvent *event)
|
||||
{
|
||||
|
||||
qDebug("Refresh timer started");
|
||||
mGuiRefreshTimer.start();
|
||||
|
||||
}
|
||||
|
||||
void CCableTestPage::hideEvent(QHideEvent *event)
|
||||
{
|
||||
qDebug("Refresh timer stopped");
|
||||
mGuiRefreshTimer.stop();
|
||||
}
|
||||
|
||||
int CCableTestPage::FillReportCableParametersData(CCableParametersData *ReportPtr)
|
||||
{
|
||||
ReportPtr->SetCableParams(ui->mStationNameCombo->currentText(),ui->mIdentCableEditBox->text(),ui->mTypeCableCombo->currentText(),ui->mNomTesteurEditBox->text());
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
@ -3,8 +3,13 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include "CableTestBenchDefs.h"
|
||||
#include <QBitArray>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
class CCableTestBench;
|
||||
class CCableParametersData;
|
||||
|
||||
|
||||
namespace Ui {
|
||||
class CCableTestPage;
|
||||
@ -19,19 +24,48 @@ public:
|
||||
~CCableTestPage();
|
||||
|
||||
CCableTestBench *mProgramHandle;
|
||||
QTimer mGuiRefreshTimer;
|
||||
void showEvent(QShowEvent *event);
|
||||
void hideEvent(QHideEvent *event);
|
||||
|
||||
int SetVisualInspectionDone(bool Done = true);
|
||||
int ResetCable();
|
||||
int EnableStartTestBtn();
|
||||
int DisableStartTestBtn();
|
||||
int CableAutomaticTestStarted();
|
||||
int CableAutomaticTestPaused();
|
||||
int CableTestEnded();
|
||||
int CableManualTestStarted();
|
||||
|
||||
int SetInputConnectorState(QBitArray PinStates);
|
||||
int SetOutputConnectorState(QBitArray PinStates);
|
||||
|
||||
int FillReportCableParametersData(CCableParametersData* ReportPtr);
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
Ui::CCableTestPage *ui;
|
||||
|
||||
QPixmap mInspectionDonePixmap, mInspectionNotDonePixmap;
|
||||
|
||||
QString mDefaultCableName, mDefaultInspectorName;
|
||||
|
||||
|
||||
int DisableGuiForTest();
|
||||
int EnableGuiAfterTest();
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
void InspVisuelleBtnClicked();
|
||||
void ConnectorSelectionChanged(CConnectorDefs::eConnectorType ConType);
|
||||
void StartTestBtnClicked();
|
||||
void ResetTestBtnClicked();
|
||||
void NewCableBtnClicked();
|
||||
void StartManualTestBtnClicked();
|
||||
void OutputConnectorPinClicked(int PinNbr);
|
||||
void GuiRefreshTimerExpired();
|
||||
};
|
||||
|
||||
#endif // CABLETESTPAGE_H
|
||||
|
||||
@ -251,7 +251,7 @@
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>410</y>
|
||||
<width>471</width>
|
||||
<width>461</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -275,9 +275,9 @@
|
||||
<widget class="CConnectorTestVisualizationWidget" name="mOutputTestVisualisationWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>510</x>
|
||||
<x>500</x>
|
||||
<y>410</y>
|
||||
<width>441</width>
|
||||
<width>461</width>
|
||||
<height>351</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -288,7 +288,7 @@
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>490</x>
|
||||
<x>480</x>
|
||||
<y>390</y>
|
||||
<width>20</width>
|
||||
<height>371</height>
|
||||
@ -352,7 +352,7 @@
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>220</y>
|
||||
<width>471</width>
|
||||
<width>491</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -362,32 +362,6 @@
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<widget class="QPushButton" name="mStartTestBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Démarrer test</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="mReinitTestBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<y>70</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Réinitialiser test</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mCableIdentStepChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@ -439,6 +413,71 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>230</x>
|
||||
<y>10</y>
|
||||
<width>121</width>
|
||||
<height>91</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Test Automatique</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="mStartTestBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>20</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Démarrer test</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="mReinitTestBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>50</y>
|
||||
<width>91</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Réinitialiser test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>370</x>
|
||||
<y>10</y>
|
||||
<width>111</width>
|
||||
<height>80</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Test Manuel</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="mStartManualTestBtn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>30</y>
|
||||
<width>75</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Exécuter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mInspVisuelleLabel_2">
|
||||
<property name="geometry">
|
||||
|
||||
@ -5,6 +5,13 @@ CConnector::CConnector()
|
||||
{
|
||||
mPinCount = 0;
|
||||
mIOModuleRangeBegin = mIOModuleRangeEnd = 0;
|
||||
mIOInterfaceHandle = 0;
|
||||
}
|
||||
|
||||
int CConnector::SetIOInterface(CIOModulesInterface *IFHandle)
|
||||
{
|
||||
mIOInterfaceHandle = IFHandle;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CConnector::GetPinCount()
|
||||
@ -31,3 +38,8 @@ bool CConnector::IsConnectorDefined()
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CConnectorDefs::eConnectorType CConnector::GetConnectorType()
|
||||
{
|
||||
return mConnectorType;
|
||||
}
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
#define CONNECTOR_H
|
||||
|
||||
#include "CableTestBenchDefs.h"
|
||||
#include <QBitArray>
|
||||
#include "IOModulesInterface.h"
|
||||
|
||||
|
||||
class CConnector
|
||||
@ -10,15 +12,21 @@ public:
|
||||
CConnector();
|
||||
|
||||
int GetPinCount();
|
||||
int SetConnectorType(CConnectorDefs::eConnectorType type);
|
||||
virtual int SetConnectorType(CConnectorDefs::eConnectorType type);
|
||||
bool IsConnectorDefined();
|
||||
int SetIOInterface(CIOModulesInterface *IFHandle);
|
||||
CConnectorDefs::eConnectorType GetConnectorType();
|
||||
|
||||
private:
|
||||
int mPinCount;
|
||||
|
||||
|
||||
protected:
|
||||
unsigned int mPinCount;
|
||||
CConnectorDefs::eConnectorType mConnectorType;
|
||||
|
||||
int mIOModuleRangeBegin, mIOModuleRangeEnd;
|
||||
|
||||
CIOModulesInterface *mIOInterfaceHandle;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
@ -1,17 +1,31 @@
|
||||
#include "IOModulesInterface.h"
|
||||
|
||||
#include "GlobalDefine.h"
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
CIOModulesInterface::CIOModulesInterface()
|
||||
{
|
||||
// mIOModulesQueryTimer = new QTimer();
|
||||
// connect(mIOModulesQueryTimer,SIGNAL(timeout()),this,SLOT(IOModulesQueryTimerExpired()));
|
||||
|
||||
// mIOModulesQueryTimer->setInterval(IO_MODULES_REFRESH_INTERVAL);
|
||||
// mIOModulesQueryTimer->setSingleShot(true);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
CIOModulesInterface::~CIOModulesInterface()
|
||||
{
|
||||
//delete mIOModulesQueryTimer;
|
||||
}
|
||||
|
||||
|
||||
int CIOModulesInterface::OpenIOModules()
|
||||
{
|
||||
|
||||
int ret = SM_Open(&hndl,"192.168.0.52");
|
||||
int ret = SM_Open(&hndl,(char*)"192.168.0.52");
|
||||
if(ret < 0)
|
||||
{
|
||||
qDebug("Impossible d'ouvrir le module d'I/O, erreur %d",ret);
|
||||
@ -20,12 +34,49 @@ int CIOModulesInterface::OpenIOModules()
|
||||
|
||||
qDebug("Module d'I/O ouvert avec succès");
|
||||
|
||||
DeviceConfig config;
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_1_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",INPUTS_MODULE_1_SLAVE_ID, config.model);
|
||||
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_2_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",INPUTS_MODULE_2_SLAVE_ID, config.model);
|
||||
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_3_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",INPUTS_MODULE_3_SLAVE_ID, config.model);
|
||||
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_4_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",INPUTS_MODULE_4_SLAVE_ID, config.model);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_1_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",OUTPUTS_MODULE_1_SLAVE_ID, config.model);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_2_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",OUTPUTS_MODULE_2_SLAVE_ID, config.model);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_3_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",OUTPUTS_MODULE_3_SLAVE_ID, config.model);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_4_SLAVE_ID);
|
||||
SM_GetDeviceConfig(hndl,&config);
|
||||
qDebug("Module inputs 1: Address %d, Modèle %d",OUTPUTS_MODULE_4_SLAVE_ID, config.model);
|
||||
|
||||
ResetOutputs();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CIOModulesInterface::CloseIOModules()
|
||||
{
|
||||
// mIOModulesQueryTimer->stop();
|
||||
int ret = SM_Close(&hndl);
|
||||
|
||||
if(ret < 0)
|
||||
{
|
||||
qDebug("Impossible de fermer le module d'I/O, erreur %d",ret);
|
||||
@ -33,5 +84,157 @@ int CIOModulesInterface::CloseIOModules()
|
||||
}
|
||||
|
||||
qDebug("Module d'I/O fermé avec succès");
|
||||
|
||||
|
||||
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void CIOModulesInterface::IOModulesQueryTimerExpired()
|
||||
{
|
||||
DoAllIOTransactions();
|
||||
// mIOModulesQueryTimer->start();
|
||||
qDebug("timerout");
|
||||
}
|
||||
|
||||
int CIOModulesInterface::ReadInputModules()
|
||||
{
|
||||
unsigned char TempBuf[4];
|
||||
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_1_SLAVE_ID);
|
||||
SM_ReadDigitalInputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mInputsBuffer[0],&TempBuf[0],4);
|
||||
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_2_SLAVE_ID);
|
||||
SM_ReadDigitalInputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mInputsBuffer[4],&TempBuf[0],4);
|
||||
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_3_SLAVE_ID);
|
||||
SM_ReadDigitalInputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mInputsBuffer[8],&TempBuf[0],4);
|
||||
|
||||
SM_SelectDevice(hndl,INPUTS_MODULE_4_SLAVE_ID);
|
||||
SM_ReadDigitalInputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mInputsBuffer[12],&TempBuf[0],4);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CIOModulesInterface::WriteOutputModules()
|
||||
{
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_1_SLAVE_ID);
|
||||
SM_WriteDigitalOutputs(hndl,0,32,&mOutputsBuffer[0]);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_2_SLAVE_ID);
|
||||
SM_WriteDigitalOutputs(hndl,0,32,&mOutputsBuffer[4]);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_3_SLAVE_ID);
|
||||
SM_WriteDigitalOutputs(hndl,0,32,&mOutputsBuffer[8]);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_4_SLAVE_ID);
|
||||
SM_WriteDigitalOutputs(hndl,0,32,&mOutputsBuffer[12]);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CIOModulesInterface::ReadOutputStates()
|
||||
{
|
||||
unsigned char TempBuf[4];
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_1_SLAVE_ID);
|
||||
SM_ReadDigitalOutputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mOutputsStatebuffer[0],&TempBuf[0],4);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_2_SLAVE_ID);
|
||||
SM_ReadDigitalOutputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mOutputsStatebuffer[4],&TempBuf[0],4);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_3_SLAVE_ID);
|
||||
SM_ReadDigitalOutputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mOutputsStatebuffer[8],&TempBuf[0],4);
|
||||
|
||||
SM_SelectDevice(hndl,OUTPUTS_MODULE_4_SLAVE_ID);
|
||||
SM_ReadDigitalOutputs(hndl,0,32,&TempBuf[0]);
|
||||
memcpy(&mOutputsStatebuffer[12],&TempBuf[0],4);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CIOModulesInterface::DoAllIOTransactions()
|
||||
{
|
||||
ReadInputModules();
|
||||
WriteOutputModules();
|
||||
ReadOutputStates();
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CIOModulesInterface::ResetOutputs()
|
||||
{
|
||||
memset(mOutputsBuffer,0x00,16);
|
||||
return WriteOutputModules();
|
||||
}
|
||||
|
||||
int CIOModulesInterface::SetOutputs(QBitArray Outputs)
|
||||
{
|
||||
if(Outputs.size() != IO_COUNT)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
int IO = 0;
|
||||
unsigned char mask = 1;
|
||||
for(int byte = 0; byte < 16; byte++)
|
||||
{
|
||||
mOutputsBuffer[byte] = 0;
|
||||
mask = 1;
|
||||
for(int bit = 0; bit < 8; bit++)
|
||||
{
|
||||
if(Outputs.at(IO))
|
||||
{
|
||||
mOutputsBuffer[byte] |= mask;
|
||||
}
|
||||
mask <<= 1;
|
||||
IO++;
|
||||
}
|
||||
}
|
||||
|
||||
WriteOutputModules();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
QBitArray CIOModulesInterface::GetInputStates()
|
||||
{
|
||||
ReadInputModules();
|
||||
return CharBufferToBitArray(mInputsBuffer, 16);
|
||||
}
|
||||
|
||||
QBitArray CIOModulesInterface::GetOutputStates()
|
||||
{
|
||||
ReadOutputStates();
|
||||
return CharBufferToBitArray(mOutputsStatebuffer, 16);
|
||||
}
|
||||
|
||||
QBitArray CIOModulesInterface::CharBufferToBitArray(unsigned char *buf, int size_in_bytes)
|
||||
{
|
||||
int Size = size_in_bytes*8;
|
||||
QBitArray Result(Size);
|
||||
|
||||
int IO = 0;
|
||||
unsigned char mask = 1;
|
||||
for(int byte = 0; byte < size_in_bytes; byte++)
|
||||
{
|
||||
mask = 1;
|
||||
for(int bit = 0; bit < 8; bit++)
|
||||
{
|
||||
if((buf[byte] & mask) != 0)
|
||||
{
|
||||
Result.setBit(IO);
|
||||
}
|
||||
mask <<= 1;
|
||||
IO++;
|
||||
}
|
||||
}
|
||||
return Result;
|
||||
}
|
||||
|
||||
@ -1,18 +1,61 @@
|
||||
#ifndef IOMODULESINTERFACE_H
|
||||
#define IOMODULESINTERFACE_H
|
||||
#include "SeaMAX.h"
|
||||
#include <QTimer>
|
||||
#include <QObject>
|
||||
#include <QBitArray>
|
||||
|
||||
#define IO_MODULES_REFRESH_INTERVAL 300 //ms
|
||||
#define IO_COUNT 128 //4 modules of 32 bits
|
||||
|
||||
class CIOModulesInterface
|
||||
class CIOModulesInterface : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
enum eModulesSlaveIDDefs
|
||||
{
|
||||
INPUTS_MODULE_1_SLAVE_ID = 1,
|
||||
INPUTS_MODULE_2_SLAVE_ID = 2,
|
||||
INPUTS_MODULE_3_SLAVE_ID = 3,
|
||||
INPUTS_MODULE_4_SLAVE_ID = 4,
|
||||
OUTPUTS_MODULE_1_SLAVE_ID = 5,
|
||||
OUTPUTS_MODULE_2_SLAVE_ID = 6,
|
||||
OUTPUTS_MODULE_3_SLAVE_ID = 7,
|
||||
OUTPUTS_MODULE_4_SLAVE_ID = 8
|
||||
|
||||
};
|
||||
|
||||
|
||||
CIOModulesInterface();
|
||||
~CIOModulesInterface();
|
||||
|
||||
int OpenIOModules();
|
||||
int CloseIOModules();
|
||||
|
||||
int SetOutputs(QBitArray Outputs);
|
||||
QBitArray GetInputStates();
|
||||
QBitArray GetOutputStates();
|
||||
int ResetOutputs();
|
||||
|
||||
private:
|
||||
SM_HANDLE hndl;
|
||||
// QTimer *mIOModulesQueryTimer;
|
||||
unsigned char mInputsBuffer[16];
|
||||
unsigned char mOutputsBuffer[16];
|
||||
unsigned char mOutputsStatebuffer[16];
|
||||
|
||||
int ReadInputModules();
|
||||
int WriteOutputModules();
|
||||
int ReadOutputStates();
|
||||
|
||||
|
||||
int DoAllIOTransactions();
|
||||
|
||||
QBitArray CharBufferToBitArray(unsigned char *buf, int size_in_bytes);
|
||||
|
||||
public slots:
|
||||
void IOModulesQueryTimerExpired();
|
||||
};
|
||||
|
||||
#endif // IOMODULESINTERFACE_H
|
||||
|
||||
29
Sources/InputConnector.cpp
Normal file
29
Sources/InputConnector.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
#include "InputConnector.h"
|
||||
|
||||
CInputConnector::CInputConnector()
|
||||
{
|
||||
}
|
||||
|
||||
QBitArray CInputConnector::GetInputPinsStates()
|
||||
{
|
||||
|
||||
if(!IsConnectorDefined())
|
||||
return QBitArray();
|
||||
|
||||
QBitArray IOStates = mIOInterfaceHandle->GetInputStates();//inputs are active low, need to invert!!!
|
||||
QBitArray PinsStates(mPinCount);
|
||||
|
||||
if(mIOModuleRangeEnd > IOStates.size()) //try not to crash!
|
||||
{
|
||||
qDebug("Logic error in CInputConnector::GetInputPinsStates(); mIOModuleRangeEnd greater than IO count");
|
||||
return QBitArray();
|
||||
}
|
||||
|
||||
|
||||
int ConnectorPin = 0;
|
||||
for(int IoPin = mIOModuleRangeBegin; IoPin <= mIOModuleRangeEnd; IoPin++)
|
||||
{
|
||||
PinsStates[ConnectorPin++] = IOStates[IoPin];
|
||||
}
|
||||
return PinsStates;
|
||||
}
|
||||
15
Sources/InputConnector.h
Normal file
15
Sources/InputConnector.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef INPUTCONNECTOR_H
|
||||
#define INPUTCONNECTOR_H
|
||||
#include "Connector.h"
|
||||
#include <QBitArray>
|
||||
|
||||
class CInputConnector : public CConnector
|
||||
{
|
||||
public:
|
||||
CInputConnector();
|
||||
|
||||
QBitArray GetInputPinsStates();
|
||||
|
||||
};
|
||||
|
||||
#endif // INPUTCONNECTOR_H
|
||||
@ -215,6 +215,19 @@
|
||||
<string>Appliquer && Sauvegarder</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mIgnoreVisualInspChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>500</x>
|
||||
<y>200</y>
|
||||
<width>221</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Ignorer l'inspection visuelle</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
147
Sources/OutputConnector.cpp
Normal file
147
Sources/OutputConnector.cpp
Normal file
@ -0,0 +1,147 @@
|
||||
#include "OutputConnector.h"
|
||||
#include "GlobalDefine.h"
|
||||
|
||||
COutputConnector::COutputConnector()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int COutputConnector::SetOutputPins(QBitArray PinsStates)
|
||||
{
|
||||
if(mIOModuleRangeEnd >= IO_COUNT)
|
||||
{
|
||||
qDebug("Logic error in COutputConnector::SetOutputPins; mIOModuleRangeEnd greater than IO count");
|
||||
return RET_ERROR;
|
||||
}
|
||||
if(IsConnectorDefined() == false)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
QBitArray OutputBuf(IO_COUNT);
|
||||
|
||||
int PinIndex = 0;
|
||||
for(int IoPin = mIOModuleRangeBegin; IoPin <= mIOModuleRangeEnd; IoPin++)
|
||||
{
|
||||
OutputBuf[IoPin] = PinsStates[PinIndex++];
|
||||
}
|
||||
|
||||
mIOInterfaceHandle->SetOutputs(OutputBuf);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
QBitArray COutputConnector::GetOutputPinsStates()
|
||||
{
|
||||
if(IsConnectorDefined() == false)
|
||||
{
|
||||
return QBitArray();
|
||||
}
|
||||
|
||||
QBitArray IOStates = mIOInterfaceHandle->GetOutputStates();
|
||||
QBitArray PinsStates(mPinCount);
|
||||
|
||||
if(mIOModuleRangeEnd > IOStates.size()) //try not to crash!
|
||||
{
|
||||
qDebug("Logic error in CInputConnector::GetInputPinsStates(); mIOModuleRangeEnd greater than IO count");
|
||||
return QBitArray();
|
||||
}
|
||||
|
||||
int ConnectorPin = 0;
|
||||
for(int IoPin = mIOModuleRangeBegin; IoPin <= mIOModuleRangeEnd; IoPin++)
|
||||
{
|
||||
PinsStates[ConnectorPin++] = IOStates[IoPin];
|
||||
}
|
||||
|
||||
return PinsStates;
|
||||
}
|
||||
|
||||
int COutputConnector::SetConnectorType(CConnectorDefs::eConnectorType type)
|
||||
{
|
||||
CConnector::SetConnectorType(type);
|
||||
|
||||
mOutputsPinsStateBuffer.clear();
|
||||
mOutputsPinsStateBuffer = QBitArray(mPinCount);
|
||||
|
||||
ClearAllPins();
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
//! !!!! WARNING, PinIndex IS ZERO-BASED INDEX !!! //
|
||||
int COutputConnector::SetSinglePin(unsigned int PinNumber)
|
||||
{
|
||||
if(IsConnectorDefined() == false)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
int ZeroBasedPinIndex = PinNumber-1;
|
||||
|
||||
if(ZeroBasedPinIndex >= (int)mPinCount || ZeroBasedPinIndex < 0)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
QBitArray PinsStates(mPinCount);
|
||||
PinsStates.setBit(ZeroBasedPinIndex);
|
||||
|
||||
SetOutputPins(PinsStates);
|
||||
|
||||
return RET_OK;
|
||||
|
||||
}
|
||||
|
||||
//! !!!! WARNING, PinIndex IS ZERO-BASED INDEX !!! //
|
||||
int COutputConnector::GetSinglePinState(unsigned int PinNumber)
|
||||
{
|
||||
if(IsConnectorDefined() == false)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
int ZeroBasedPinIndex = PinNumber-1;
|
||||
|
||||
if(ZeroBasedPinIndex > (int)mPinCount || ZeroBasedPinIndex < 0)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
QBitArray CurStates = GetOutputPinsStates();
|
||||
|
||||
return CurStates.at(ZeroBasedPinIndex);
|
||||
}
|
||||
|
||||
int COutputConnector::TogglePin(unsigned int PinNumber)
|
||||
{
|
||||
if(IsConnectorDefined() == false)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
int ZeroBasedPinIndex = PinNumber-1;
|
||||
|
||||
if(ZeroBasedPinIndex > (int)mPinCount || ZeroBasedPinIndex < 0)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
QBitArray CurStates = GetOutputPinsStates();
|
||||
|
||||
CurStates.toggleBit(ZeroBasedPinIndex);
|
||||
SetOutputPins(CurStates);
|
||||
|
||||
return RET_OK;
|
||||
|
||||
}
|
||||
|
||||
int COutputConnector::ClearAllPins()
|
||||
{
|
||||
if(IsConnectorDefined() == false)
|
||||
{
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
mIOInterfaceHandle->ResetOutputs();
|
||||
return RET_OK;
|
||||
}
|
||||
29
Sources/OutputConnector.h
Normal file
29
Sources/OutputConnector.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef OUTPUTCONNECTOR_H
|
||||
#define OUTPUTCONNECTOR_H
|
||||
|
||||
#include "Connector.h"
|
||||
#include <QBitArray>
|
||||
|
||||
class COutputConnector : public CConnector
|
||||
{
|
||||
public:
|
||||
COutputConnector();
|
||||
|
||||
QBitArray GetOutputPinsStates();
|
||||
|
||||
|
||||
int SetSinglePin(unsigned int PinNumber);
|
||||
int GetSinglePinState(unsigned int PinNumber);
|
||||
int TogglePin(unsigned int PinNumber);
|
||||
int SetOutputPins(QBitArray PinsStates);
|
||||
int ClearAllPins();
|
||||
|
||||
virtual int SetConnectorType(CConnectorDefs::eConnectorType type);
|
||||
|
||||
private:
|
||||
QBitArray mOutputsPinsStateBuffer;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // OUTPUTCONNECTOR_H
|
||||
15
Sources/TestBenchVersion.h
Normal file
15
Sources/TestBenchVersion.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef TESTBENCHVERSION_H
|
||||
#define TESTBENCHVERSION_H
|
||||
|
||||
|
||||
#define TEST_BENCH_VERSION "V0.10_ING_DEV"
|
||||
|
||||
//LOG DES CHANGEMENTS
|
||||
|
||||
|
||||
|
||||
//Version 0.10_ING_DEV
|
||||
//-Version de développement, pré-production
|
||||
|
||||
#endif // TESTBENCHVERSION_H
|
||||
|
||||
@ -2,9 +2,25 @@
|
||||
|
||||
CTestReport::CTestReport()
|
||||
{
|
||||
mSoftwareVersion = QString(TEST_BENCH_VERSION);
|
||||
CreateNewTestReport();
|
||||
}
|
||||
|
||||
CVisualInspectionResult * CTestReport::GetInspectionResult()
|
||||
{
|
||||
return &mVisualInspectionResultReport;
|
||||
}
|
||||
|
||||
CCableParametersData *CTestReport::GetReportCableParameters()
|
||||
{
|
||||
return &mCableParameters;
|
||||
}
|
||||
|
||||
int CTestReport::CreateNewTestReport()
|
||||
{
|
||||
mVisualInspectionResultReport.ClearResults();
|
||||
mCableParameters.ResetData();
|
||||
mAutomatedTestReport.ClearAutomatedTestReport();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
@ -3,6 +3,9 @@
|
||||
|
||||
#include "GlobalDefine.h"
|
||||
#include "VisualInspectionResult.h"
|
||||
#include "CableParametersData.h"
|
||||
#include "TestBenchVersion.h"
|
||||
#include "AutomatedTestReport.h"
|
||||
|
||||
class CTestReport
|
||||
{
|
||||
@ -10,9 +13,16 @@ public:
|
||||
CTestReport();
|
||||
|
||||
CVisualInspectionResult* GetInspectionResult();
|
||||
CCableParametersData *GetReportCableParameters();
|
||||
CAutomatedTestReport *GetAutomatedTestReport();
|
||||
|
||||
int CreateNewTestReport();
|
||||
|
||||
private:
|
||||
CVisualInspectionResult mVisualInspectionResultReport;
|
||||
CCableParametersData mCableParameters;
|
||||
CAutomatedTestReport mAutomatedTestReport;
|
||||
QString mSoftwareVersion;
|
||||
};
|
||||
|
||||
#endif // TESTREPORT_H
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>10</y>
|
||||
<width>601</width>
|
||||
<x>230</x>
|
||||
<y>30</y>
|
||||
<width>611</width>
|
||||
<height>81</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
CConnectorTestVisualizationWidget::CConnectorTestVisualizationWidget(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
mPinClicksEnabled = false;
|
||||
}
|
||||
|
||||
int CConnectorTestVisualizationWidget::SetConnectorPinCount(int Count)
|
||||
@ -21,7 +22,8 @@ int CConnectorTestVisualizationWidget::SetConnectorPinCount(int Count)
|
||||
for(int i = 0; i < Count; i++)
|
||||
{
|
||||
QString pin = QString("%1").arg(i+1);
|
||||
NewWidget = new CONOFFStatusWidget(CONOFFStatusWidget::ON_OFF_LED_COLOR_GREEN,this,pin);
|
||||
NewWidget = new CONOFFStatusWidget(CONOFFStatusWidget::ON_OFF_LED_COLOR_GREEN,i+1,this,pin);
|
||||
connect(NewWidget,SIGNAL(Clicked(int)),this,SLOT(ONOFFLedClicked(int)));
|
||||
NewWidget->resize(ON_OFF_WIDGET_SIZE,ON_OFF_WIDGET_SIZE);
|
||||
|
||||
// NewWidget->move((col)*(ON_OFF_WIDGET_SIZE + col_offset),((row) * (ON_OFF_WIDGET_SIZE + row_offset)));
|
||||
@ -52,3 +54,46 @@ int CConnectorTestVisualizationWidget::ClearConnectorsLists()
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CConnectorTestVisualizationWidget::EnablePinClicks()
|
||||
{
|
||||
mPinClicksEnabled = true;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CConnectorTestVisualizationWidget::DisablePinClicks()
|
||||
{
|
||||
mPinClicksEnabled = false;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void CConnectorTestVisualizationWidget::ONOFFLedClicked(int Index)
|
||||
{
|
||||
if(mPinClicksEnabled)
|
||||
{
|
||||
emit PinClicked(Index);
|
||||
}
|
||||
}
|
||||
|
||||
int CConnectorTestVisualizationWidget::SetConnectorPinStates(QBitArray PinStates)
|
||||
{
|
||||
if(PinStates.size() != mPinsWidgetsList.size())
|
||||
{
|
||||
qDebug("Erreur de logique dans CConnectorTestVisualizationWidget::SetConnectorPinStates; taille des connecteurs incohérente");
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
if(mPinsWidgetsList.size() == 0)
|
||||
{
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
for(int i = 0; i < mPinsWidgetsList.size(); i++)
|
||||
{
|
||||
mPinsWidgetsList.at(i)->SetState(PinStates.at(i));
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -3,8 +3,9 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include "ONOFFStatusWidget.h"
|
||||
#include <QList>
|
||||
#include "CableTestBenchDefs.h"
|
||||
#include <QList>
|
||||
#include <QBitArray>
|
||||
|
||||
#define ON_OFF_WIDGET_SIZE 30
|
||||
#define LED_PER_LINE_COUNT 10
|
||||
@ -16,14 +17,28 @@ public:
|
||||
|
||||
QList<CONOFFStatusWidget*> mPinsWidgetsList;
|
||||
|
||||
|
||||
|
||||
int SetConnectorPinCount(int count);
|
||||
|
||||
int ClearConnectorsLists();
|
||||
int DisablePinClicks();
|
||||
int EnablePinClicks();
|
||||
|
||||
int SetConnectorPinStates(QBitArray PinStates);
|
||||
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
void PinClicked(int PinNbr);
|
||||
|
||||
private:
|
||||
bool mPinClicksEnabled;
|
||||
public slots:
|
||||
|
||||
void ONOFFLedClicked(int Index);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
#include "ONOFFStatusWidget.h"
|
||||
#include <QPainter>
|
||||
|
||||
CONOFFStatusWidget::CONOFFStatusWidget(eONOFFLedColor Color, QWidget *Parent, QString Label)
|
||||
CONOFFStatusWidget::CONOFFStatusWidget(eONOFFLedColor Color,int index, QWidget *Parent,QString Label)
|
||||
{
|
||||
setParent(Parent);
|
||||
if(Color == ON_OFF_LED_COLOR_GREEN)
|
||||
@ -34,6 +34,9 @@ CONOFFStatusWidget::CONOFFStatusWidget(eONOFFLedColor Color, QWidget *Parent, QS
|
||||
|
||||
mLabel = new QLabel(Label,this);
|
||||
mLabel->move(0,15);
|
||||
|
||||
mIndex = index;
|
||||
mIsOn = false;
|
||||
}
|
||||
|
||||
CONOFFStatusWidget::~CONOFFStatusWidget()
|
||||
@ -42,17 +45,34 @@ CONOFFStatusWidget::~CONOFFStatusWidget()
|
||||
|
||||
void CONOFFStatusWidget::SetON()
|
||||
{
|
||||
IsOn = true;
|
||||
if(mIsOn == false)
|
||||
{
|
||||
mIsOn = true;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
void CONOFFStatusWidget::SetOFF()
|
||||
{
|
||||
IsOn = true;
|
||||
if(mIsOn == true)
|
||||
{
|
||||
mIsOn = false;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
void CONOFFStatusWidget::SetState(bool IsON)
|
||||
{
|
||||
if(IsON != mIsOn) //don't repaint if not necessary
|
||||
{
|
||||
mIsOn = IsON;
|
||||
repaint();
|
||||
}
|
||||
}
|
||||
|
||||
void CONOFFStatusWidget::Toggle()
|
||||
{
|
||||
if(IsOn)
|
||||
if(mIsOn)
|
||||
{
|
||||
SetOFF();
|
||||
}
|
||||
@ -66,13 +86,13 @@ void CONOFFStatusWidget::paintEvent(QPaintEvent *PaintEvent)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
if(IsOn)
|
||||
if(mIsOn)
|
||||
{
|
||||
painter.drawPixmap(0,0,mLedOnPixmap);
|
||||
}
|
||||
else
|
||||
{
|
||||
painter.drawPixmap(0,0,mLedOnPixmap);
|
||||
painter.drawPixmap(0,0,mLedOffPixmap);
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,3 +119,8 @@ void CONOFFStatusWidget::resizeEvent(QResizeEvent *event)
|
||||
mLabel->move((width/2)-(LabelWidth/2),height);
|
||||
|
||||
}
|
||||
|
||||
void CONOFFStatusWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
emit Clicked(mIndex);
|
||||
}
|
||||
|
||||
@ -19,24 +19,29 @@ public:
|
||||
ON_OFF_LED_COLOR_RED
|
||||
};
|
||||
|
||||
CONOFFStatusWidget(eONOFFLedColor Color, QWidget *Parent = NULL,QString Label = QString());
|
||||
CONOFFStatusWidget(eONOFFLedColor Color,int index = -1, QWidget *Parent = NULL,QString Label = QString());
|
||||
~CONOFFStatusWidget();
|
||||
void paintEvent(QPaintEvent *PaintEvent);
|
||||
void resizeEvent(QResizeEvent *);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
|
||||
QLabel *mLabel;
|
||||
QPixmap mLedOnPixmap,mLedOffPixmap;
|
||||
|
||||
bool IsOn;
|
||||
bool mIsOn;
|
||||
|
||||
void SetON();
|
||||
void SetOFF();
|
||||
void Toggle();
|
||||
void SetState(bool IsON);
|
||||
|
||||
int mIndex;
|
||||
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
signals:
|
||||
void Clicked(int index);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -17,6 +17,10 @@ INPUT(
|
||||
./debug\OptionsPage.o
|
||||
./debug\CableTestBenchDefs.o
|
||||
./debug\IOModulesInterface.o
|
||||
./debug\InputConnector.o
|
||||
./debug\OutputConnector.o
|
||||
./debug\CableParametersData.o
|
||||
./debug\AutomatedTestReport.o
|
||||
./debug\moc_MainWindow.o
|
||||
./debug\moc_MainPage.o
|
||||
./debug\moc_CableTestBench.o
|
||||
@ -26,5 +30,8 @@ INPUT(
|
||||
./debug\moc_ConnectorClickZoneWidget.o
|
||||
./debug\moc_ONOFFStatusWidget.o
|
||||
./debug\moc_ConnectorTestVisualizationWidget.o
|
||||
./debug\moc_CableTestEngine.o
|
||||
./debug\moc_OptionsPage.o
|
||||
./debug\moc_IOModulesInterface.o
|
||||
./debug\moc_AutomatedTestReport.o
|
||||
);
|
||||
|
||||
@ -17,6 +17,10 @@ INPUT(
|
||||
./release\OptionsPage.o
|
||||
./release\CableTestBenchDefs.o
|
||||
./release\IOModulesInterface.o
|
||||
./release\InputConnector.o
|
||||
./release\OutputConnector.o
|
||||
./release\CableParametersData.o
|
||||
./release\AutomatedTestReport.o
|
||||
./release\moc_MainWindow.o
|
||||
./release\moc_MainPage.o
|
||||
./release\moc_CableTestBench.o
|
||||
@ -26,5 +30,8 @@ INPUT(
|
||||
./release\moc_ConnectorClickZoneWidget.o
|
||||
./release\moc_ONOFFStatusWidget.o
|
||||
./release\moc_ConnectorTestVisualizationWidget.o
|
||||
./release\moc_CableTestEngine.o
|
||||
./release\moc_OptionsPage.o
|
||||
./release\moc_IOModulesInterface.o
|
||||
./release\moc_AutomatedTestReport.o
|
||||
);
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'CMainPage.ui'
|
||||
**
|
||||
** Created: Fri May 3 10:58:09 2019
|
||||
** Created: Wed May 8 10:13:26 2019
|
||||
** by: Qt User Interface Compiler version 4.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'CableTestPage.ui'
|
||||
**
|
||||
** Created: Fri May 3 10:58:09 2019
|
||||
** Created: Wed May 8 11:18:26 2019
|
||||
** by: Qt User Interface Compiler version 4.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
@ -18,6 +18,7 @@
|
||||
#include <QtGui/QComboBox>
|
||||
#include <QtGui/QFrame>
|
||||
#include <QtGui/QGridLayout>
|
||||
#include <QtGui/QGroupBox>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QLineEdit>
|
||||
@ -57,11 +58,14 @@ public:
|
||||
QLabel *mOutputContactsTextLabel;
|
||||
QPushButton *mNewCableBtn;
|
||||
QFrame *frame;
|
||||
QPushButton *mStartTestBtn;
|
||||
QPushButton *mReinitTestBtn;
|
||||
QCheckBox *mCableIdentStepChkBx;
|
||||
QCheckBox *mVisualInspStepChkBx;
|
||||
QCheckBox *mConSelStepChkBx;
|
||||
QGroupBox *groupBox;
|
||||
QPushButton *mStartTestBtn;
|
||||
QPushButton *mReinitTestBtn;
|
||||
QGroupBox *groupBox_2;
|
||||
QPushButton *mStartManualTestBtn;
|
||||
QLabel *mInspVisuelleLabel_2;
|
||||
QTextBrowser *mTestLogTextBox;
|
||||
|
||||
@ -153,7 +157,7 @@ public:
|
||||
mInspectionDoneIcon->setGeometry(QRect(160, 20, 101, 91));
|
||||
mInputTestVisualisationWidget = new CConnectorTestVisualizationWidget(CCableTestPage);
|
||||
mInputTestVisualisationWidget->setObjectName(QString::fromUtf8("mInputTestVisualisationWidget"));
|
||||
mInputTestVisualisationWidget->setGeometry(QRect(10, 410, 471, 351));
|
||||
mInputTestVisualisationWidget->setGeometry(QRect(10, 410, 461, 351));
|
||||
mInputTestVisualisationWidget->setAutoFillBackground(false);
|
||||
line = new QFrame(CCableTestPage);
|
||||
line->setObjectName(QString::fromUtf8("line"));
|
||||
@ -162,11 +166,11 @@ public:
|
||||
line->setFrameShadow(QFrame::Sunken);
|
||||
mOutputTestVisualisationWidget = new CConnectorTestVisualizationWidget(CCableTestPage);
|
||||
mOutputTestVisualisationWidget->setObjectName(QString::fromUtf8("mOutputTestVisualisationWidget"));
|
||||
mOutputTestVisualisationWidget->setGeometry(QRect(510, 410, 441, 351));
|
||||
mOutputTestVisualisationWidget->setGeometry(QRect(500, 410, 461, 351));
|
||||
mOutputTestVisualisationWidget->setAutoFillBackground(false);
|
||||
line_2 = new QFrame(CCableTestPage);
|
||||
line_2->setObjectName(QString::fromUtf8("line_2"));
|
||||
line_2->setGeometry(QRect(490, 390, 20, 371));
|
||||
line_2->setGeometry(QRect(480, 390, 20, 371));
|
||||
line_2->setFrameShape(QFrame::VLine);
|
||||
line_2->setFrameShadow(QFrame::Sunken);
|
||||
mInputContactsTextLabel = new QLabel(CCableTestPage);
|
||||
@ -184,15 +188,9 @@ public:
|
||||
mNewCableBtn->setGeometry(QRect(430, 20, 91, 23));
|
||||
frame = new QFrame(CCableTestPage);
|
||||
frame->setObjectName(QString::fromUtf8("frame"));
|
||||
frame->setGeometry(QRect(50, 220, 471, 131));
|
||||
frame->setGeometry(QRect(50, 220, 491, 131));
|
||||
frame->setFrameShape(QFrame::Box);
|
||||
frame->setFrameShadow(QFrame::Raised);
|
||||
mStartTestBtn = new QPushButton(frame);
|
||||
mStartTestBtn->setObjectName(QString::fromUtf8("mStartTestBtn"));
|
||||
mStartTestBtn->setGeometry(QRect(260, 20, 91, 23));
|
||||
mReinitTestBtn = new QPushButton(frame);
|
||||
mReinitTestBtn->setObjectName(QString::fromUtf8("mReinitTestBtn"));
|
||||
mReinitTestBtn->setGeometry(QRect(260, 70, 91, 23));
|
||||
mCableIdentStepChkBx = new QCheckBox(frame);
|
||||
mCableIdentStepChkBx->setObjectName(QString::fromUtf8("mCableIdentStepChkBx"));
|
||||
mCableIdentStepChkBx->setGeometry(QRect(20, 20, 151, 17));
|
||||
@ -205,6 +203,21 @@ public:
|
||||
mConSelStepChkBx->setObjectName(QString::fromUtf8("mConSelStepChkBx"));
|
||||
mConSelStepChkBx->setGeometry(QRect(20, 80, 191, 17));
|
||||
mConSelStepChkBx->setCheckable(false);
|
||||
groupBox = new QGroupBox(frame);
|
||||
groupBox->setObjectName(QString::fromUtf8("groupBox"));
|
||||
groupBox->setGeometry(QRect(230, 10, 121, 91));
|
||||
mStartTestBtn = new QPushButton(groupBox);
|
||||
mStartTestBtn->setObjectName(QString::fromUtf8("mStartTestBtn"));
|
||||
mStartTestBtn->setGeometry(QRect(20, 20, 91, 23));
|
||||
mReinitTestBtn = new QPushButton(groupBox);
|
||||
mReinitTestBtn->setObjectName(QString::fromUtf8("mReinitTestBtn"));
|
||||
mReinitTestBtn->setGeometry(QRect(20, 50, 91, 23));
|
||||
groupBox_2 = new QGroupBox(frame);
|
||||
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
|
||||
groupBox_2->setGeometry(QRect(370, 10, 111, 80));
|
||||
mStartManualTestBtn = new QPushButton(groupBox_2);
|
||||
mStartManualTestBtn->setObjectName(QString::fromUtf8("mStartManualTestBtn"));
|
||||
mStartManualTestBtn->setGeometry(QRect(20, 30, 75, 23));
|
||||
mInspVisuelleLabel_2 = new QLabel(CCableTestPage);
|
||||
mInspVisuelleLabel_2->setObjectName(QString::fromUtf8("mInspVisuelleLabel_2"));
|
||||
mInspVisuelleLabel_2->setGeometry(QRect(50, 200, 221, 20));
|
||||
@ -250,14 +263,17 @@ public:
|
||||
mInputContactsTextLabel->setText(QApplication::translate("CCableTestPage", "Contacts entr\303\251e", 0, QApplication::UnicodeUTF8));
|
||||
mOutputContactsTextLabel->setText(QApplication::translate("CCableTestPage", "Contacts sortie", 0, QApplication::UnicodeUTF8));
|
||||
mNewCableBtn->setText(QApplication::translate("CCableTestPage", "Nouveau C\303\242ble", 0, QApplication::UnicodeUTF8));
|
||||
mStartTestBtn->setText(QApplication::translate("CCableTestPage", "D\303\251marrer test", 0, QApplication::UnicodeUTF8));
|
||||
mReinitTestBtn->setText(QApplication::translate("CCableTestPage", "R\303\251initialiser test", 0, QApplication::UnicodeUTF8));
|
||||
mCableIdentStepChkBx->setText(QApplication::translate("CCableTestPage", "1. Identification du c\303\242ble", 0, QApplication::UnicodeUTF8));
|
||||
#ifndef QT_NO_TOOLTIP
|
||||
mVisualInspStepChkBx->setToolTip(QString());
|
||||
#endif // QT_NO_TOOLTIP
|
||||
mVisualInspStepChkBx->setText(QApplication::translate("CCableTestPage", "2. Inspection visuelle", 0, QApplication::UnicodeUTF8));
|
||||
mConSelStepChkBx->setText(QApplication::translate("CCableTestPage", "3. S\303\251lection du connecteur d'entr\303\251e", 0, QApplication::UnicodeUTF8));
|
||||
groupBox->setTitle(QApplication::translate("CCableTestPage", "Test Automatique", 0, QApplication::UnicodeUTF8));
|
||||
mStartTestBtn->setText(QApplication::translate("CCableTestPage", "D\303\251marrer test", 0, QApplication::UnicodeUTF8));
|
||||
mReinitTestBtn->setText(QApplication::translate("CCableTestPage", "R\303\251initialiser test", 0, QApplication::UnicodeUTF8));
|
||||
groupBox_2->setTitle(QApplication::translate("CCableTestPage", "Test Manuel", 0, QApplication::UnicodeUTF8));
|
||||
mStartManualTestBtn->setText(QApplication::translate("CCableTestPage", "Ex\303\251cuter", 0, QApplication::UnicodeUTF8));
|
||||
mInspVisuelleLabel_2->setText(QApplication::translate("CCableTestPage", "Contr\303\264le du test \303\251lectrique", 0, QApplication::UnicodeUTF8));
|
||||
} // retranslateUi
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'OptionsPage.ui'
|
||||
**
|
||||
** Created: Fri May 3 10:58:09 2019
|
||||
** Created: Wed May 8 10:13:26 2019
|
||||
** by: Qt User Interface Compiler version 4.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
@ -14,6 +14,7 @@
|
||||
#include <QtGui/QAction>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QButtonGroup>
|
||||
#include <QtGui/QCheckBox>
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QPushButton>
|
||||
@ -37,6 +38,7 @@ public:
|
||||
QSpinBox *mIPAdd4SpinBox;
|
||||
QLabel *label_5;
|
||||
QPushButton *mApplyAndSaveBtn;
|
||||
QCheckBox *mIgnoreVisualInspChkBx;
|
||||
|
||||
void setupUi(QWidget *COptionsPage)
|
||||
{
|
||||
@ -101,6 +103,9 @@ public:
|
||||
mApplyAndSaveBtn = new QPushButton(COptionsPage);
|
||||
mApplyAndSaveBtn->setObjectName(QString::fromUtf8("mApplyAndSaveBtn"));
|
||||
mApplyAndSaveBtn->setGeometry(QRect(390, 550, 131, 23));
|
||||
mIgnoreVisualInspChkBx = new QCheckBox(COptionsPage);
|
||||
mIgnoreVisualInspChkBx->setObjectName(QString::fromUtf8("mIgnoreVisualInspChkBx"));
|
||||
mIgnoreVisualInspChkBx->setGeometry(QRect(500, 200, 221, 17));
|
||||
|
||||
retranslateUi(COptionsPage);
|
||||
|
||||
@ -116,6 +121,7 @@ public:
|
||||
label_4->setText(QApplication::translate("COptionsPage", "Temps de maintien bas (ms)", 0, QApplication::UnicodeUTF8));
|
||||
label_5->setText(QApplication::translate("COptionsPage", "Adresse IP module I/O", 0, QApplication::UnicodeUTF8));
|
||||
mApplyAndSaveBtn->setText(QApplication::translate("COptionsPage", "Appliquer && Sauvegarder", 0, QApplication::UnicodeUTF8));
|
||||
mIgnoreVisualInspChkBx->setText(QApplication::translate("COptionsPage", "Ignorer l'inspection visuelle", 0, QApplication::UnicodeUTF8));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'VisualInspectionPage.ui'
|
||||
**
|
||||
** Created: Fri May 3 10:58:09 2019
|
||||
** Created: Wed May 8 10:13:26 2019
|
||||
** by: Qt User Interface Compiler version 4.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
@ -57,7 +57,7 @@ public:
|
||||
CVisualInspectionPage->resize(1103, 710);
|
||||
label = new QLabel(CVisualInspectionPage);
|
||||
label->setObjectName(QString::fromUtf8("label"));
|
||||
label->setGeometry(QRect(250, 10, 601, 81));
|
||||
label->setGeometry(QRect(230, 30, 611, 81));
|
||||
QFont font;
|
||||
font.setPointSize(14);
|
||||
label->setFont(font);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user