V1.0. Premier release
This commit is contained in:
parent
8342f88720
commit
90f0f33252
BIN
Cablotron.csf
BIN
Cablotron.csf
Binary file not shown.
2
Makefile
2
Makefile
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: CableTestBench
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Mon May 13 08:38:34 2019
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Tue May 14 11:42:47 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
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: CableTestBench
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Mon May 13 08:38:34 2019
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Tue May 14 11:42:47 2019
|
||||
# Project: CableTestBench.pro
|
||||
# Template: app
|
||||
#############################################################################
|
||||
@ -173,6 +173,7 @@ debug/moc_MainWindow.cpp: Sources/MainPage.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/MainWindow.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\MainWindow.h -o debug\moc_MainWindow.cpp
|
||||
|
||||
@ -187,6 +188,7 @@ debug/moc_CableTestBench.cpp: Sources/MainWindow.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -246,7 +248,8 @@ debug/moc_CableTestEngine.cpp: Sources/Cable.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
|
||||
debug/moc_OptionsPage.cpp: Sources/TestBenchSettings.h \
|
||||
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
|
||||
@ -297,6 +300,7 @@ debug/MainWindow.o: Sources/MainWindow.cpp Sources/MainWindow.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
@ -319,6 +323,7 @@ debug/main.o: Sources/main.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -344,6 +349,7 @@ debug/CableTestBench.o: Sources/CableTestBench.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -366,6 +372,7 @@ debug/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualIns
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -392,6 +399,7 @@ debug/CableTestPage.o: Sources/CableTestPage.cpp Sources/CableTestPage.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -438,7 +446,8 @@ debug/TestReport.o: Sources/TestReport.cpp Sources/TestReport.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/AutomatedTestReport.h
|
||||
Sources/AutomatedTestReport.h \
|
||||
Sources/TestBenchSettings.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\TestReport.o Sources\TestReport.cpp
|
||||
|
||||
debug/CableTestEngine.o: Sources/CableTestEngine.cpp Sources/CableTestEngine.h \
|
||||
@ -459,11 +468,31 @@ debug/CableTestEngine.o: Sources/CableTestEngine.cpp Sources/CableTestEngine.h \
|
||||
Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/OptionsPage.h
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\CableTestEngine.o Sources\CableTestEngine.cpp
|
||||
|
||||
debug/OptionsPage.o: Sources/OptionsPage.cpp Sources/OptionsPage.h \
|
||||
ui_OptionsPage.h
|
||||
Sources/TestBenchSettings.h \
|
||||
ui_OptionsPage.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/MainWindow.h \
|
||||
Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.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/AutomatedTestReport.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\OptionsPage.o Sources\OptionsPage.cpp
|
||||
|
||||
debug/CableTestBenchDefs.o: Sources/CableTestBenchDefs.cpp Sources/CableTestBenchDefs.h
|
||||
@ -494,7 +523,8 @@ debug/AutomatedTestReport.o: Sources/AutomatedTestReport.cpp Sources/AutomatedTe
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\AutomatedTestReport.o Sources\AutomatedTestReport.cpp
|
||||
|
||||
debug/TestBenchSettings.o: Sources/TestBenchSettings.cpp Sources/TestBenchSettings.h
|
||||
debug/TestBenchSettings.o: Sources/TestBenchSettings.cpp Sources/TestBenchSettings.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug\TestBenchSettings.o Sources\TestBenchSettings.cpp
|
||||
|
||||
debug/moc_MainWindow.o: debug/moc_MainWindow.cpp
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: CableTestBench
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Mon May 13 08:38:34 2019
|
||||
# Generated by qmake (2.01a) (Qt 4.8.1) on: Tue May 14 11:42:47 2019
|
||||
# Project: CableTestBench.pro
|
||||
# Template: app
|
||||
#############################################################################
|
||||
@ -173,6 +173,7 @@ release/moc_MainWindow.cpp: Sources/MainPage.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/MainWindow.h
|
||||
C:\Qt\4.8.1\bin\moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 Sources\MainWindow.h -o release\moc_MainWindow.cpp
|
||||
|
||||
@ -187,6 +188,7 @@ release/moc_CableTestBench.cpp: Sources/MainWindow.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -246,7 +248,8 @@ release/moc_CableTestEngine.cpp: Sources/Cable.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
|
||||
release/moc_OptionsPage.cpp: Sources/TestBenchSettings.h \
|
||||
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
|
||||
@ -297,6 +300,7 @@ release/MainWindow.o: Sources/MainWindow.cpp Sources/MainWindow.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
@ -319,6 +323,7 @@ release/main.o: Sources/main.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -344,6 +349,7 @@ release/CableTestBench.o: Sources/CableTestBench.cpp Sources/CableTestBench.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -366,6 +372,7 @@ release/VisualInspectionPage.o: Sources/VisualInspectionPage.cpp Sources/VisualI
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -392,6 +399,7 @@ release/CableTestPage.o: Sources/CableTestPage.cpp Sources/CableTestPage.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h \
|
||||
Sources/Connector.h \
|
||||
Sources/IOModulesInterface.h \
|
||||
Sources/Cable.h \
|
||||
@ -438,7 +446,8 @@ release/TestReport.o: Sources/TestReport.cpp Sources/TestReport.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableParametersData.h \
|
||||
Sources/TestBenchVersion.h \
|
||||
Sources/AutomatedTestReport.h
|
||||
Sources/AutomatedTestReport.h \
|
||||
Sources/TestBenchSettings.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\TestReport.o Sources\TestReport.cpp
|
||||
|
||||
release/CableTestEngine.o: Sources/CableTestEngine.cpp Sources/CableTestEngine.h \
|
||||
@ -459,11 +468,31 @@ release/CableTestEngine.o: Sources/CableTestEngine.cpp Sources/CableTestEngine.h
|
||||
Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/OptionsPage.h
|
||||
Sources/OptionsPage.h \
|
||||
Sources/TestBenchSettings.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\CableTestEngine.o Sources\CableTestEngine.cpp
|
||||
|
||||
release/OptionsPage.o: Sources/OptionsPage.cpp Sources/OptionsPage.h \
|
||||
ui_OptionsPage.h
|
||||
Sources/TestBenchSettings.h \
|
||||
ui_OptionsPage.h \
|
||||
Sources/GlobalDefine.h \
|
||||
Sources/CableTestBench.h \
|
||||
Sources/MainWindow.h \
|
||||
Sources/MainPage.h \
|
||||
Sources/VisualInspectionPage.h \
|
||||
Sources/VisualInspectionResult.h \
|
||||
Sources/CableTestPage.h \
|
||||
Sources/CableTestBenchDefs.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/AutomatedTestReport.h \
|
||||
Sources/CableTestEngine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\OptionsPage.o Sources\OptionsPage.cpp
|
||||
|
||||
release/CableTestBenchDefs.o: Sources/CableTestBenchDefs.cpp Sources/CableTestBenchDefs.h
|
||||
@ -494,7 +523,8 @@ release/AutomatedTestReport.o: Sources/AutomatedTestReport.cpp Sources/Automated
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\AutomatedTestReport.o Sources\AutomatedTestReport.cpp
|
||||
|
||||
release/TestBenchSettings.o: Sources/TestBenchSettings.cpp Sources/TestBenchSettings.h
|
||||
release/TestBenchSettings.o: Sources/TestBenchSettings.cpp Sources/TestBenchSettings.h \
|
||||
Sources/GlobalDefine.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release\TestBenchSettings.o Sources\TestBenchSettings.cpp
|
||||
|
||||
release/moc_MainWindow.o: release/moc_MainWindow.cpp
|
||||
|
||||
@ -152,7 +152,8 @@ bool CPinTestResult::IsPinTestSuccess()
|
||||
if(mPinNumber > 0 &&
|
||||
mContinuityTestPass == AUTO_TEST_SUCCESS &&
|
||||
mIsolationTestPass == AUTO_TEST_SUCCESS &&
|
||||
mPinAssignationTestPass == AUTO_TEST_SUCCESS) //TODO: Add 2nd pass result.
|
||||
mPinAssignationTestPass == AUTO_TEST_SUCCESS &&
|
||||
mSecondTestPass != AUTO_TEST_FAILED)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ int CCableTestBench::Start()
|
||||
mOptionsPageHandle->GetCurrentOptions(&mTestBenchOptions);
|
||||
}
|
||||
|
||||
mCableTestEngine.InitCableTestEngine(this,mTestBenchOptions.mPinHoldTime);
|
||||
mCableTestEngine.InitCableTestEngine(this,&mTestBenchOptions);
|
||||
|
||||
if(mIOInterface.OpenIOModules(mTestBenchOptions.mIOModuleIPAddress) == RET_ERROR)
|
||||
{
|
||||
@ -336,8 +336,6 @@ int CCableTestBench::TestBenchOptionsChanged()
|
||||
mOptionsPageHandle->GetCurrentOptions(&mTestBenchOptions);
|
||||
mTestBenchOptions.SaveSettingsToFile();
|
||||
|
||||
mCableTestEngine.SetPinHoldTime(mTestBenchOptions.mPinHoldTime);
|
||||
|
||||
|
||||
|
||||
return RET_OK;
|
||||
|
||||
@ -12,7 +12,7 @@ CCableTestEngine::~CCableTestEngine()
|
||||
delete mCableTestSMTimer;
|
||||
}
|
||||
|
||||
int CCableTestEngine::InitCableTestEngine(CCableTestBench *ProgramHandle, int PinHoldTime)
|
||||
int CCableTestEngine::InitCableTestEngine(CCableTestBench *ProgramHandle, CTestBenchSettings *SettingsHandle)
|
||||
{
|
||||
mProgramHandle = ProgramHandle;
|
||||
mTestCable = ProgramHandle->GetActualCable();
|
||||
@ -30,26 +30,25 @@ int CCableTestEngine::InitCableTestEngine(CCableTestBench *ProgramHandle, int Pi
|
||||
connect(mCableTestSMTimer,SIGNAL(timeout()),this,SLOT(SMTimerExpired()));
|
||||
|
||||
|
||||
mPinHoldTime = PinHoldTime; //ms
|
||||
mTestSettingsHandle = SettingsHandle;
|
||||
mIsSecondPass = false;
|
||||
|
||||
|
||||
CableTestEngineStateMachine(CABLE_TEST_TICK_SM_EVENT);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CCableTestEngine::SetPinHoldTime(int HoldTime)
|
||||
{
|
||||
mPinHoldTime = HoldTime;
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
{
|
||||
|
||||
switch(mCableTestSMState)
|
||||
{
|
||||
case CABLE_TEST_INIT_STATE:
|
||||
{
|
||||
mCableTestSMState = CABLE_TEST_STBY_STATE;
|
||||
mIsSecondPass = false;
|
||||
mCableTestSMTimer->start();
|
||||
break;
|
||||
}//case CABLE_TEST_INIT_STATE
|
||||
@ -92,7 +91,7 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
|
||||
case CABLE_AUTO_TEST_SELF_TEST_STATE:
|
||||
{
|
||||
if(mCableTestGPTimer.elapsed() < mPinHoldTime)
|
||||
if(mCableTestGPTimer.elapsed() < mTestSettingsHandle->mPinHoldTime)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -140,7 +139,7 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
{
|
||||
case CABLE_TEST_TICK_SM_EVENT:
|
||||
{
|
||||
if(mCableTestGPTimer.elapsed() < mPinHoldTime)
|
||||
if(mCableTestGPTimer.elapsed() < mTestSettingsHandle->mPinHoldTime)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -155,24 +154,41 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
{
|
||||
if(In.count(true) == 0) //Check if no input pin is active
|
||||
{
|
||||
mAutoTestReportHandle->SetPinContinuityResult(mCurPinUnderTest,false);
|
||||
// qDebug("Échec du test du contact %d : aucune pin activée en entrée",mCurPinUnderTest);
|
||||
mTestReportHandle->AddLogEntry(QString("Échec du test du contact %1 : aucun contact activé en entrée").arg(mCurPinUnderTest));
|
||||
if(mIsSecondPass == false)
|
||||
{
|
||||
mAutoTestReportHandle->SetPinContinuityResult(mCurPinUnderTest,false);
|
||||
mTestReportHandle->AddLogEntry(QString("Échec du test du contact %1 : aucun contact activé en entrée").arg(mCurPinUnderTest));
|
||||
}
|
||||
else
|
||||
{
|
||||
mAutoTestReportHandle->SetPinSecondTestResult(mCurPinUnderTest,false);
|
||||
mTestReportHandle->AddLogEntry(QString("2è passe: échec du test du contact %1 : aucun contact activé en entrée").arg(mCurPinUnderTest));
|
||||
}
|
||||
}
|
||||
else //If here, many input pins are active...
|
||||
{
|
||||
QString LogString = QString("Échec du test d'isolation du contact %1 : (%2) contacts activés en entrée : ").arg(mCurPinUnderTest).arg(In.count(true));
|
||||
mAutoTestReportHandle->SetPinIsolationResult(mCurPinUnderTest,false);
|
||||
for(int pin = 0; pin < In.count(); pin++)
|
||||
if(mIsSecondPass == false)
|
||||
{
|
||||
if(In.at(pin))
|
||||
QString LogString = QString("Échec du test d'isolation du contact %1 : (%2) contacts activés en entrée : ").arg(mCurPinUnderTest).arg(In.count(true));
|
||||
mAutoTestReportHandle->SetPinIsolationResult(mCurPinUnderTest,false);
|
||||
for(int pin = 0; pin < In.count(); pin++)
|
||||
{
|
||||
mAutoTestReportHandle->AddShortedPinToPinTest(mCurPinUnderTest,pin+1);
|
||||
LogString.append(QString("[%1]").arg(pin+1));
|
||||
if(In.at(pin))
|
||||
{
|
||||
mAutoTestReportHandle->AddShortedPinToPinTest(mCurPinUnderTest,pin+1);
|
||||
LogString.append(QString("[%1]").arg(pin+1));
|
||||
}
|
||||
}
|
||||
// qDebug("Échec du test d'isolation du contact %d : (%d) contacts activés en entrée",mCurPinUnderTest,In.count(true));
|
||||
mTestReportHandle->AddLogEntry(LogString);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mAutoTestReportHandle->SetPinSecondTestResult(mCurPinUnderTest,false);
|
||||
QString LogString = QString("2è passe: chec du test d'isolation du contact %1 : (%2) contacts activés en entrée : ").arg(mCurPinUnderTest).arg(In.count(true));
|
||||
mTestReportHandle->AddLogEntry(LogString);
|
||||
}
|
||||
// qDebug("Échec du test d'isolation du contact %d : (%d) contacts activés en entrée",mCurPinUnderTest,In.count(true));
|
||||
mTestReportHandle->AddLogEntry(LogString);
|
||||
}
|
||||
}
|
||||
else if(In.at(mCurPinUnderTest-1) == false)
|
||||
@ -189,22 +205,52 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
break;
|
||||
}
|
||||
}
|
||||
mAutoTestReportHandle->SetPinConcordanceTestResult(mCurPinUnderTest,false,WrongPin);
|
||||
mTestReportHandle->AddLogEntry(QString("Échec du test d'assignation du contact %1: le contact %2 est activé.").arg(mCurPinUnderTest).arg(WrongPin));
|
||||
// qDebug("Échec du test d'assignation du contact %d: le contact %d est activé.",mCurPinUnderTest);
|
||||
if(mIsSecondPass == false)
|
||||
{
|
||||
mAutoTestReportHandle->SetPinConcordanceTestResult(mCurPinUnderTest,false,WrongPin);
|
||||
mTestReportHandle->AddLogEntry(QString("Échec du test d'assignation du contact %1: le contact %2 est activé.").arg(mCurPinUnderTest).arg(WrongPin));
|
||||
}
|
||||
else
|
||||
{
|
||||
mAutoTestReportHandle->SetPinSecondTestResult(mCurPinUnderTest,false);
|
||||
mTestReportHandle->AddLogEntry(QString("2è passe: échec du test d'assignation du contact %1: le contact %2 est activé.").arg(mCurPinUnderTest).arg(WrongPin));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//Pin test passed. Test the next one
|
||||
mAutoTestReportHandle->SetPinTestAllPassed(mCurPinUnderTest);
|
||||
// qDebug("Succès du test du contact %d", mCurPinUnderTest);
|
||||
mTestReportHandle->AddLogEntry(QString("Succès du test du contact %1").arg(mCurPinUnderTest));
|
||||
if(mIsSecondPass == false)
|
||||
{
|
||||
mAutoTestReportHandle->SetPinTestAllPassed(mCurPinUnderTest);
|
||||
mTestReportHandle->AddLogEntry(QString("Succès du test du contact %1").arg(mCurPinUnderTest));
|
||||
}
|
||||
else
|
||||
{
|
||||
mAutoTestReportHandle->SetPinSecondTestResult(mCurPinUnderTest,true);
|
||||
mTestReportHandle->AddLogEntry(QString("2è passe: succès du test du contact %1").arg(mCurPinUnderTest));
|
||||
}
|
||||
}
|
||||
|
||||
mCurPinUnderTest++;
|
||||
if(mCurPinUnderTest > (mTestOutputConnectorHandle->GetPinCount()))
|
||||
{
|
||||
//Test finished.
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE;
|
||||
|
||||
if(mTestSettingsHandle->mExecSecondPass == true) //Check if we need to execute the test twice
|
||||
{
|
||||
if(mIsSecondPass == true) //Check if this was the second pass.
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE; //test finished
|
||||
}
|
||||
else
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_START_SECOND_PASS_STATE; //start the 2nd test
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE; //test finished
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -219,14 +265,14 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_PAUSE_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
// qDebug("Test mis en pause...");
|
||||
// qDebug("Test mis en pause...");
|
||||
mTestReportHandle->AddLogEntry(QString("Test mis en pause"));
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_CANCEL_AUTO_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE;
|
||||
// qDebug("Test annulé...");
|
||||
// qDebug("Test annulé...");
|
||||
mTestReportHandle->AddLogEntry(QString("Test annulé par l'utilisateur"));
|
||||
break;
|
||||
}
|
||||
@ -248,14 +294,14 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_PINS_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
// qDebug("Test redémarré...");
|
||||
// qDebug("Test redémarré...");
|
||||
mTestReportHandle->AddLogEntry(QString("Test redémarré..."));
|
||||
break;
|
||||
}
|
||||
case CABLE_TEST_CANCEL_AUTO_TEST_SM_EVENT:
|
||||
{
|
||||
mCableTestSMState = CABLE_AUTO_TEST_END_TEST_STATE;
|
||||
// qDebug("Test annulé...");
|
||||
// qDebug("Test annulé...");
|
||||
mTestReportHandle->AddLogEntry(QString("Test annulé par l'utilisateur"));
|
||||
break;
|
||||
}
|
||||
@ -267,10 +313,22 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
|
||||
break;
|
||||
}//case CABLE_AUTO_TEST_PAUSE_STATE
|
||||
case CABLE_AUTO_TEST_START_SECOND_PASS_STATE:
|
||||
{
|
||||
//restart test but skip module self-test...
|
||||
mIsSecondPass = true;
|
||||
mCurPinUnderTest = 1;
|
||||
mTestOutputConnectorHandle->SetSinglePin(mCurPinUnderTest);
|
||||
mCableTestGPTimer.start();
|
||||
mCableTestSMState = CABLE_AUTO_TEST_PINS_STATE;
|
||||
mTestReportHandle->AddLogEntry(QString("Démarrage du deuxième test"));
|
||||
break;
|
||||
}//case CABLE_AUTO_TEST_START_SECOND_PASS_STATE
|
||||
|
||||
case CABLE_AUTO_TEST_END_TEST_STATE:
|
||||
{
|
||||
// qDebug("Test automatique terminé...");
|
||||
// qDebug("Test automatique terminé...");
|
||||
mIsSecondPass = false;
|
||||
mTestReportHandle->AddLogEntry(QString("Test automatique terminé"));
|
||||
mTestOutputConnectorHandle->ClearAllPins();
|
||||
mCableTestSMState = CABLE_TEST_STBY_STATE;
|
||||
@ -281,7 +339,7 @@ void CCableTestEngine::CableTestEngineStateMachine(int Event)
|
||||
case CABLE_TEST_START_MANUAL_TEST_STATE:
|
||||
{
|
||||
mTestOutputConnectorHandle->ClearAllPins();
|
||||
// qDebug("Entrée en mode test manuel");
|
||||
// qDebug("Entrée en mode test manuel");
|
||||
mTestReportHandle->AddLogEntry(QString("Entrée en mode test manuel"));
|
||||
mCableTestSMState = CABLE_MANUAL_TEST_PINS_STATE;
|
||||
mProgramHandle->CableEngineModeChanged(GetTestEngineCurrentMode());
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#include "TestReport.h"
|
||||
|
||||
class CCableTestBench;
|
||||
class CTestBenchSettings;
|
||||
|
||||
#define TEST_ENGINE_SM_STANDBY_TIMEOUT 300 //ms
|
||||
#define TEST_ENGINE_SM_TIMEOUT 100 //ms
|
||||
@ -27,7 +28,7 @@ public:
|
||||
|
||||
CCableTestEngine();
|
||||
~CCableTestEngine();
|
||||
int InitCableTestEngine(CCableTestBench *ProgramHandle, int PinHoldTime);
|
||||
int InitCableTestEngine(CCableTestBench *ProgramHandle, CTestBenchSettings *SettingsHandle);
|
||||
|
||||
int StartAutomatedTest();
|
||||
int PauseAutomatedTest();
|
||||
@ -37,8 +38,6 @@ public:
|
||||
int StopManualTest();
|
||||
int ManualPinToggle(int ConnectorPinNbr);
|
||||
|
||||
int SetPinHoldTime(int HoldTime);
|
||||
|
||||
bool IsAutomaticTestRunning();
|
||||
eCableTestEngineMode GetTestEngineCurrentMode();
|
||||
|
||||
@ -54,6 +53,7 @@ private:
|
||||
CABLE_AUTO_TEST_PINS_STATE,
|
||||
CABLE_AUTO_TEST_PAUSE_STATE,
|
||||
CABLE_AUTO_TEST_END_TEST_STATE,
|
||||
CABLE_AUTO_TEST_START_SECOND_PASS_STATE,
|
||||
CABLE_TEST_START_MANUAL_TEST_STATE,
|
||||
CABLE_MANUAL_TEST_PINS_STATE,
|
||||
CABLE_MANUAL_TEST_END_TEST_STATE
|
||||
@ -77,7 +77,9 @@ private:
|
||||
CInputConnector *mTestInputConnectorHandle;
|
||||
COutputConnector *mTestOutputConnectorHandle;
|
||||
int mCurPinUnderTest;
|
||||
int mPinHoldTime;
|
||||
bool mExecSecondTest;
|
||||
bool mIsSecondPass;
|
||||
CTestBenchSettings *mTestSettingsHandle;
|
||||
|
||||
QTimer *mCableTestSMTimer;
|
||||
QElapsedTimer mCableTestGPTimer;
|
||||
|
||||
@ -27,6 +27,7 @@ int COptionsPage::GetCurrentOptions(CTestBenchSettings *Settings)
|
||||
Settings->mIgnoreVisualInspection = ui->mIgnoreVisualInspChkBx->isChecked();
|
||||
Settings->mIOModuleIPAddress = QString("%1.%2.%3.%4").arg(ui->mIPAdd1SpinBox->value()).arg(ui->mIPAdd2SpinBox->value()).arg(ui->mIPAdd3SpinBox->value()).arg(ui->mIPAdd4SpinBox->value());
|
||||
Settings->mIncludeLogInReport = ui->mIncludeLogInReportChkBx->isChecked();
|
||||
Settings->mExecSecondPass = ui->mExecSecondTestChkBx->isChecked();
|
||||
|
||||
|
||||
|
||||
@ -39,6 +40,9 @@ int COptionsPage::SetCurrentOptions(CTestBenchSettings *Settings)
|
||||
ui->mTestHoldTimeHighSpinBx->setValue(Settings->mPinHoldTime);
|
||||
ui->mIgnoreVisualInspChkBx->setChecked(Settings->mIgnoreVisualInspection);
|
||||
ui->mIncludeLogInReportChkBx->setChecked(Settings->mIncludeLogInReport);
|
||||
ui->mExecSecondTestChkBx->setChecked(Settings->mExecSecondPass);
|
||||
|
||||
|
||||
QHostAddress IPAddres(Settings->mIOModuleIPAddress);
|
||||
|
||||
int IPV4 = IPAddres.toIPv4Address();
|
||||
@ -51,6 +55,7 @@ int COptionsPage::SetCurrentOptions(CTestBenchSettings *Settings)
|
||||
IPV4 >>= 8;
|
||||
ui->mIPAdd1SpinBox->setValue(IPV4 & 0x000000FF);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
void COptionsPage::OptionChanged()
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>311</y>
|
||||
<y>361</y>
|
||||
<width>42</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -88,7 +88,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>311</y>
|
||||
<y>361</y>
|
||||
<width>42</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -104,7 +104,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>311</y>
|
||||
<y>361</y>
|
||||
<width>42</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -117,7 +117,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>290</x>
|
||||
<y>311</y>
|
||||
<y>361</y>
|
||||
<width>42</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
@ -133,7 +133,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>270</y>
|
||||
<y>320</y>
|
||||
<width>351</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@ -187,6 +187,19 @@
|
||||
<string>Inclure LOG dans le rapport</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="mExecSecondTestChkBx">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>140</x>
|
||||
<y>240</y>
|
||||
<width>221</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Exécuter 2è passe de tests</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@ -26,7 +26,8 @@ int CTestBenchSettings::SaveSettingsToFile()
|
||||
<< mPinHoldTime
|
||||
<< mIgnoreVisualInspection
|
||||
<< mIOModuleIPAddress
|
||||
<< mIncludeLogInReport;
|
||||
<< mIncludeLogInReport
|
||||
<< mExecSecondPass;
|
||||
|
||||
SettingFile->close();
|
||||
delete SettingFile;
|
||||
@ -59,7 +60,8 @@ int CTestBenchSettings::LoadSettingFromFile()
|
||||
Strm >> mPinHoldTime
|
||||
>> mIgnoreVisualInspection
|
||||
>> mIOModuleIPAddress
|
||||
>> mIncludeLogInReport;
|
||||
>> mIncludeLogInReport
|
||||
>> mExecSecondPass;
|
||||
|
||||
SettingFile->close();
|
||||
delete SettingFile;
|
||||
|
||||
@ -15,6 +15,7 @@ public:
|
||||
bool mIgnoreVisualInspection;
|
||||
QString mIOModuleIPAddress;
|
||||
bool mIncludeLogInReport;
|
||||
bool mExecSecondPass;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#define TESTBENCHVERSION_H
|
||||
|
||||
|
||||
#define TEST_BENCH_VERSION "V0.10_ING_DEV"
|
||||
#define TEST_BENCH_VERSION "V1.0"
|
||||
|
||||
//LOG DES CHANGEMENTS
|
||||
|
||||
|
||||
@ -113,6 +113,14 @@ int CTestReport::SaveReportToFile(CTestBenchSettings *BenchSettings)
|
||||
{
|
||||
ReportStream << QString("Ignorer inspection visuelle: NON\n");
|
||||
}
|
||||
if(BenchSettings->mExecSecondPass)
|
||||
{
|
||||
ReportStream << QString("2è test exécuté: OUI\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
ReportStream << QString("2è test exécuté: NON\n");
|
||||
}
|
||||
ReportStream << QString("Adresse IP des modules d'I/O : %1\n\n").arg(BenchSettings->mIOModuleIPAddress);
|
||||
ReportStream << "-----------------------------------------\n";
|
||||
ReportStream << QString("Paramètres du câble: \n");
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'CMainPage.ui'
|
||||
**
|
||||
** Created: Mon May 13 08:38:40 2019
|
||||
** Created: Tue May 14 11:42:48 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: Mon May 13 09:55:56 2019
|
||||
** Created: Tue May 14 11:42:48 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 'OptionsPage.ui'
|
||||
**
|
||||
** Created: Mon May 13 10:53:13 2019
|
||||
** Created: Tue May 14 11:42:48 2019
|
||||
** by: Qt User Interface Compiler version 4.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
@ -37,6 +37,7 @@ public:
|
||||
QPushButton *mApplyAndSaveBtn;
|
||||
QCheckBox *mIgnoreVisualInspChkBx;
|
||||
QCheckBox *mIncludeLogInReportChkBx;
|
||||
QCheckBox *mExecSecondTestChkBx;
|
||||
|
||||
void setupUi(QWidget *COptionsPage)
|
||||
{
|
||||
@ -63,26 +64,26 @@ public:
|
||||
label_3->setFont(font1);
|
||||
mIPAdd1SpinBox = new QSpinBox(COptionsPage);
|
||||
mIPAdd1SpinBox->setObjectName(QString::fromUtf8("mIPAdd1SpinBox"));
|
||||
mIPAdd1SpinBox->setGeometry(QRect(140, 311, 42, 22));
|
||||
mIPAdd1SpinBox->setGeometry(QRect(140, 361, 42, 22));
|
||||
mIPAdd1SpinBox->setMaximum(255);
|
||||
mIPAdd1SpinBox->setValue(192);
|
||||
mIPAdd2SpinBox = new QSpinBox(COptionsPage);
|
||||
mIPAdd2SpinBox->setObjectName(QString::fromUtf8("mIPAdd2SpinBox"));
|
||||
mIPAdd2SpinBox->setGeometry(QRect(190, 311, 42, 22));
|
||||
mIPAdd2SpinBox->setGeometry(QRect(190, 361, 42, 22));
|
||||
mIPAdd2SpinBox->setMaximum(255);
|
||||
mIPAdd2SpinBox->setValue(168);
|
||||
mIPAdd3SpinBox = new QSpinBox(COptionsPage);
|
||||
mIPAdd3SpinBox->setObjectName(QString::fromUtf8("mIPAdd3SpinBox"));
|
||||
mIPAdd3SpinBox->setGeometry(QRect(240, 311, 42, 22));
|
||||
mIPAdd3SpinBox->setGeometry(QRect(240, 361, 42, 22));
|
||||
mIPAdd3SpinBox->setMaximum(255);
|
||||
mIPAdd4SpinBox = new QSpinBox(COptionsPage);
|
||||
mIPAdd4SpinBox->setObjectName(QString::fromUtf8("mIPAdd4SpinBox"));
|
||||
mIPAdd4SpinBox->setGeometry(QRect(290, 311, 42, 22));
|
||||
mIPAdd4SpinBox->setGeometry(QRect(290, 361, 42, 22));
|
||||
mIPAdd4SpinBox->setMaximum(255);
|
||||
mIPAdd4SpinBox->setValue(52);
|
||||
label_5 = new QLabel(COptionsPage);
|
||||
label_5->setObjectName(QString::fromUtf8("label_5"));
|
||||
label_5->setGeometry(QRect(140, 270, 351, 31));
|
||||
label_5->setGeometry(QRect(140, 320, 351, 31));
|
||||
label_5->setFont(font1);
|
||||
mApplyAndSaveBtn = new QPushButton(COptionsPage);
|
||||
mApplyAndSaveBtn->setObjectName(QString::fromUtf8("mApplyAndSaveBtn"));
|
||||
@ -93,6 +94,9 @@ public:
|
||||
mIncludeLogInReportChkBx = new QCheckBox(COptionsPage);
|
||||
mIncludeLogInReportChkBx->setObjectName(QString::fromUtf8("mIncludeLogInReportChkBx"));
|
||||
mIncludeLogInReportChkBx->setGeometry(QRect(140, 200, 221, 17));
|
||||
mExecSecondTestChkBx = new QCheckBox(COptionsPage);
|
||||
mExecSecondTestChkBx->setObjectName(QString::fromUtf8("mExecSecondTestChkBx"));
|
||||
mExecSecondTestChkBx->setGeometry(QRect(140, 240, 221, 17));
|
||||
|
||||
retranslateUi(COptionsPage);
|
||||
|
||||
@ -109,6 +113,7 @@ public:
|
||||
mApplyAndSaveBtn->setText(QApplication::translate("COptionsPage", "Appliquer && Sauvegarder", 0, QApplication::UnicodeUTF8));
|
||||
mIgnoreVisualInspChkBx->setText(QApplication::translate("COptionsPage", "Ignorer l'inspection visuelle", 0, QApplication::UnicodeUTF8));
|
||||
mIncludeLogInReportChkBx->setText(QApplication::translate("COptionsPage", "Inclure LOG dans le rapport", 0, QApplication::UnicodeUTF8));
|
||||
mExecSecondTestChkBx->setText(QApplication::translate("COptionsPage", "Ex\303\251cuter 2\303\250 passe de tests", 0, QApplication::UnicodeUTF8));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/********************************************************************************
|
||||
** Form generated from reading UI file 'VisualInspectionPage.ui'
|
||||
**
|
||||
** Created: Mon May 13 08:38:40 2019
|
||||
** Created: Tue May 14 11:42:48 2019
|
||||
** by: Qt User Interface Compiler version 4.8.1
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost when recompiling UI file!
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user