From 4409fadafaf9178b9d239339fe781c30981c0dc5 Mon Sep 17 00:00:00 2001 From: Luc Vandenbroucke Date: Wed, 11 Sep 2024 13:56:04 +0200 Subject: [PATCH] aparte writeconfig 3.0 en 3.1 geen start visit bij error --- EpdBase3/Epd3.h | 2 +- EpdBase3/Epd3Base.cpp | 323 +++++++++++-------- EpdBase3/Epd3Base.h | 16 +- EpdBaseClr/EpdBaseClr.cpp | 8 +- TestMK3/TestMK3.cpp | 2 +- eDosLocal/UpdateLocal.sql | 175 +++++++++- eDosLocal/eDosLocal.sqlproj | 130 ++++---- eDosLocal/eDosLocalProcedures.sql | Bin 0 -> 80176 bytes eDosLocal/eDosLocalTables.sql | Bin 0 -> 55330 bytes eDosStation/DataInterface.cs | 1 + eDosStation/DecodeResults.cs | 5 +- eDosStation/EntryBadge.xaml | 59 ++-- eDosStation/EntryBadge.xaml.cs | 103 ++++-- eDosStation/MainWindow.xaml.cs | 10 +- eDosStation/Properties/AssemblyInfo.cs | 7 +- eDosStation/Properties/Resources.Designer.cs | 40 ++- eDosStation/Properties/Resources.resx | 14 + eDosStation/Resources/BuildDate.txt | 2 +- eDosStation/Settings.xaml | 4 +- eDosStation/cDevCon.cs | 3 +- scripts/Upgrader.ps1 | 26 +- scripts/installatie.ps1 | 26 +- scripts/installatie2.ps1 | 26 +- syncEdosLocal/Program.cs | 92 +++--- 24 files changed, 713 insertions(+), 361 deletions(-) create mode 100644 eDosLocal/eDosLocalProcedures.sql create mode 100644 eDosLocal/eDosLocalTables.sql diff --git a/EpdBase3/Epd3.h b/EpdBase3/Epd3.h index 84aba27..9202135 100644 --- a/EpdBase3/Epd3.h +++ b/EpdBase3/Epd3.h @@ -434,7 +434,7 @@ extern "C" //enkel 3.1 CompletionToken EPDDLL_API BeginTestLed_R3(CommsHandle hComms, float seconds, CompletionCallback callback); - int32_t EPDDLL_API EmdTestLed_R3(CommsHandle hComms, CompletionToken token); + int32_t EPDDLL_API EndTestLed_R3(CommsHandle hComms, CompletionToken token); CompletionToken EPDDLL_API BeginTestVibe_R3(CommsHandle hComms, float seconds, CompletionCallback callback); int32_t EPDDLL_API EndTestVibe_R3(CommsHandle hComms, CompletionToken token); diff --git a/EpdBase3/Epd3Base.cpp b/EpdBase3/Epd3Base.cpp index 6756f17..0db099f 100644 --- a/EpdBase3/Epd3Base.cpp +++ b/EpdBase3/Epd3Base.cpp @@ -7,6 +7,8 @@ #define noDeissueWithClear #define ProtectSession +constexpr int SleepAfterClear = 1000; + //-102 = permission Epd3Base::Epd3U* current; @@ -32,8 +34,6 @@ int Epd3Base::Epd3U::SetFunctionReturnValue(enum eFunctions f, BYTE CanIgnore) return CurrentStep; } - - void Epd3Base::Epd3U::SetCommitReturnValue(int step, int32_t rv) { if (CurrentStep >= 0 && CurrentStep < MaxSteps) @@ -47,12 +47,13 @@ void Epd3Base::Epd3U::SetCommitReturnValue(int32_t rv) uint32_t Epd3Base::Epd3U::SetEndReturnValue(int step, int32_t rv) { - if (step >= 0 && step < MaxSteps) + if (step >= 0 && step < MaxSteps) { StepReturnValues[step][2] = rv; - if (rv != 0) { - HasStepError = 1; - if (StepReturnValues[step][3]) rv = 0; //if canIngore set rv ok - Error = GetErrorCode(); + if (rv != 0) { + HasStepError = 1; + if (StepReturnValues[step][3]) rv = 0; //if canIngore set rv ok + Error = GetErrorCode(); + } } return rv; } @@ -62,7 +63,6 @@ uint32_t Epd3Base::Epd3U::SetEndReturnValue(int32_t rv) return SetEndReturnValue(CurrentStep, rv); } - int32_t Epd3Base::Epd3U::CommitAndSetRV() { int32_t r = Commit3(epdComsHandle); @@ -78,7 +78,6 @@ int32_t Epd3Base::Epd3U::CommitAndSetRV(int idx[], int len) return r; } - int32_t Epd3Base::Epd3U::CommitAndEnd2RV(int32_t (WINAPI *endFunction2)(CommsHandle hComms, CompletionToken token), CompletionToken token) { int32_t r = Commit3(epdComsHandle); @@ -95,7 +94,6 @@ int32_t Epd3Base::Epd3U::End2RV(int step, int32_t(WINAPI* endFunction2)(CommsHan return r; } - void WINAPI completion(CommsHandle hComms, CompletionToken token) { SetEvent(current->hCompletion); @@ -123,6 +121,7 @@ void WINAPI connectcallback(CommsHandle hComms, DiscoveryId ID) void WINAPI disconnectcallback(CommsHandle hComms, DiscoveryId ID) { + OutputDebugStringW(L"**** Disconnect ****\n"); current->isConnected = 0; current->CurrentDeviceID = 0; current->DeviceCount = 0; @@ -193,10 +192,29 @@ Epd3Base::Epd3U::~Epd3U() //if (hWaitTimer != 0) { CloseHandle(hWaitTimer); hWaitTimer = 0; } } +int Epd3Base::Epd3U::DisconnectAndConnect() +{ + int rv = 0; + rv = Disconnect(epdComsHandle); + Sleep(200); + rv = SetConnectCallback(epdComsHandle, connectcallback); + int tries = 3; rv = 1; + while (rv && --tries>=0) { + rv = Connect3(epdComsHandle, Epd, true); + snprintf(DiagnosticsWrite, DiagnosticsWriteSize, "**** DisconnectAndConnect rv=%d tries %d ****\n", rv, tries); + OutputDebugStringA(DiagnosticsWrite); + Sleep(100); + } + + return rv; +} + + DWORD Epd3Base::Epd3U::StartCom() { ErrorReason = 0; ConnectRetries = 0; + OpenRetries = 0; int step = 1; int mx = 10; @@ -208,29 +226,34 @@ DWORD Epd3Base::Epd3U::StartCom() if (CommsInitialized == 0 || epdComsHandle == nullptr) { step = 2; + SetFunctionReturnValue(fCreateReaderInterface, 0); epdComsHandle = CreateReaderInterface(); - if (epdComsHandle == nullptr) { - ++ConnectRetries; - step = 3; - Sleep(100); + if (!epdComsHandle ) step = 3; + while (epdComsHandle == nullptr && ++ConnectRetries < 4) { + Sleep(200); epdComsHandle = CreateReaderInterface(); //try again; } + SetCommitReturnValue(0); + if (epdComsHandle) SetEndReturnValue(0); else SetEndReturnValue(-1); + if (epdComsHandle != nullptr) { step = 4; + SetFunctionReturnValue(fOpenReader, 0); Dll3RV = OpenReader(epdComsHandle, comPort); //-6 = r_OperationFailed - if (Dll3RV) { //retry - ++ConnectRetries; - step = 5; - Sleep(100); + if (Dll3RV) step = 5; + while (Dll3RV && ++OpenRetries <4 ) { //retry + Sleep(200); Dll3RV = OpenReader(epdComsHandle, comPort); } + SetCommitReturnValue(0); + if (!Dll3RV) SetEndReturnValue(0); else SetEndReturnValue(-1); + if (Dll3RV == 0) { step = 7; CommsInitialized = 1; Dll3RV = SetMultipleDiscoveryMode(epdComsHandle, false); Dll3RV = SetResponseTimeout(epdComsHandle, ResponseTimeout); - //Dll3RV = GetRetryCount(epdComsHandle, &retries); = 3 } } else { @@ -248,10 +271,14 @@ error: void Epd3Base::Epd3U::EndCom(bool doDiscon) { int rv; + if (CommsInitialized == 1 || CurrentDeviceID != 0) { if (CommsInitialized == 1) { + snprintf(DiagnosticsWrite, DiagnosticsWriteSize, "**** EndCom(%d) is Connected=%d ****\n", doDiscon, isConnected); + OutputDebugStringA(DiagnosticsWrite); + if (epdComsHandle != nullptr) { - if (doDiscon) { DisCon(0); } + if (doDiscon && isConnected) { DisCon(0); } //Dll3RV = CloseReader(epdComsHandle); // not necessary if followed by DestroyReaderInterface //if (Dll3RV) { // rv = 1; @@ -293,7 +320,6 @@ int Epd3Base::Epd3U::StartDiscover(int tokentimeout) ResetEvent(hCompletion); ConnectTimerFired = 0; isConnected = 0; - Dll3RV = StartDiscovery(epdComsHandle, discovery); if (Dll3RV == 0) { @@ -325,6 +351,8 @@ int Epd3Base::Epd3U::OpenDev(DiscoveryId DeviceID) { Dll3RV = Connect3(epdComsHandle, DeviceID, true); SetDisconnectCallback(epdComsHandle, disconnectcallback); + OutputDebugStringA("**** Open ****\n"); + } else { Dll3RV = r_InvalidCommsHandle; } return Dll3RV; @@ -334,27 +362,47 @@ int Epd3Base::Epd3U::ReOpenDev() { if (epdComsHandle != nullptr) { + SetDisconnectCallback(epdComsHandle, disconnectcallback); Dll3RV = Connect3(epdComsHandle, Epd, true); + OutputDebugStringA("**** ReOpen ****\n"); } else { + OutputDebugStringA("**** ReOpen no epdComsHandle ****\n"); Dll3RV = r_InvalidCommsHandle; } //no handle .. return Dll3RV; } +// + int Epd3Base::Epd3U::DisCon(UINT16 alarm) { + // 5432109876543210 + constexpr UINT16 ca = 0b1001110011000111; int rv = 0; int step = 0; + snprintf(DiagnosticsWrite, DiagnosticsWriteSize, "**** Discon(%hu) ****\n", alarm); + OutputDebugStringA(DiagnosticsWrite); if (CurrentDeviceID != 0) { ResetEvent(hCompletion); current = this; step = 1; Dll3RV = SetDisconnectCallback(epdComsHandle, disconnectcallback); if (alarm) { + + snprintf(DiagnosticsWrite, DiagnosticsWriteSize, "**** DisconnectAndNotify(%hX,15) HardVersionMinor: %d ****\n", ca, HardVersionMinor); + + if (HardVersionMinor > 0) { + SetFunctionReturnValue(TestVibe, 0); + token = BeginTestVibe_R3(epdComsHandle, 1.0 , nullptr); + rv = CommitAndEnd2RV(EndTestVibe_R3, token); + } + + OutputDebugStringA(DiagnosticsWrite); SetFunctionReturnValue(fDisconnectAndNotify,0); - Dll3RV = DisconnectAndNotify(epdComsHandle, alarm, 12); //1.2 secon + Dll3RV = DisconnectAndNotify(epdComsHandle, ca, 12); //1.2 secon SetCommitReturnValue(0); SetEndReturnValue(Dll3RV); + Sleep(1200); } else { SetFunctionReturnValue(fDisconnect,0); Dll3RV = Disconnect(epdComsHandle); @@ -434,7 +482,6 @@ void Epd3Base::Epd3U::DecodeStatus() EPDEprFault = checkStatus(epd3status.FaultStatus, FaultStatusFlags::EepromFailure); EPDTrhFault = checkStatus(epd3status.FaultStatus, FaultStatusFlags::BadThreshold); - for (int ix = 0; ix < 4; ix++) { DoseAlarmFlags status = epd3status.DoseAlarms[ix].Status; @@ -485,17 +532,39 @@ int Epd3Base::Epd3U::SetTime() //Only R3 utc = TimeFunctions::NowToEpdTime(Epd.Gen == EpdGeneration::Mk2); token = BeginWriteRTC_R3(epdComsHandle, utc, nullptr); r = CommitAndEnd2RV(EndWriteRTC_R3, token); - /*r = CommitSetRV(); - if (!r) r = EndWriteRTC_R3(epdComsHandle, token); - SetEndReturnValue(r);*/ } return r; } + +void WINAPI ReadStatusCompletion(CommsHandle hComms, CompletionToken token) +{ + int rv = EndReadStatus(current->epdComsHandle, token, ¤t->epd3status); + rv = current->SetEndReturnValue(rv); + current->IssueCount = current->epd3status.IssueCount; + current->OperatingStatus = current->epd3status.OperatingStatus; + current->AlarmStatus = current->epd3status.AlarmStatus; + current->ErrorStatus = current->epd3status.FaultStatus; + current->OtherAlarms = current->epd3status.OtherBits; + current->DecodeStatus(); //Alarm status... + snprintf(current->DiagnosticsWrite, DiagnosticsWriteSize, "**** ReadStatusCompletion %04x ****\n", current->OperatingStatus); + OutputDebugStringA(current->DiagnosticsWrite); + SetEvent(current->hCompletion); +} + +int Epd3Base::Epd3U::ReadStatusOnly() +{ + int rv = 0; + ResetEvent(hCompletion); + SetFunctionReturnValue(eFunctions::ReadStatus, 0); + token = BeginReadStatus(epdComsHandle, ReadStatusCompletion); + rv = CommitAndSetRV(); + return rv; +} /// /// /// /// 0 = ok -int Epd3Base::Epd3U::ReadStatus() +int Epd3Base::Epd3U::ReadStatus(bool onlyStatus) { int rv; //0=ok //constexpr int maxbatch = 2; @@ -531,24 +600,9 @@ int Epd3Base::Epd3U::ReadStatus() HardVersion = HardVersionMinor = SoftVersion = FunctionFlags = 0; step = 1; - //batchstep = 0; + SetFunctionReturnValue(eFunctions::ReadStatus,0); token = BeginReadStatus(epdComsHandle, nullptr); - - //batchstep = 1; - // - //s[batchstep] = SetFunctionReturnValue(ReadEpdIdentities, 0); - //btoken[batchstep] = BeginReadEpdIdentities(epdComsHandle, nullptr); - - //batchstep = 2; - //s[batchstep] = SetFunctionReturnValue(ReadCounts, 0); - //btoken[batchstep] = BeginReadCounts(epdComsHandle, nullptr, 0, nullptr); - - /*batchstep = 3; - s[batchstep] = SetFunctionReturnValue(ReadRTC, 0); - btoken[batchstep] = BeginReadRTC(epdComsHandle, nullptr);*/ - - // after rv = CommitAndSetRV(); //batchstep = 0; //ReadStatus @@ -562,8 +616,11 @@ int Epd3Base::Epd3U::ReadStatus() AlarmStatus = epd3status.AlarmStatus; ErrorStatus = epd3status.FaultStatus; OtherAlarms = epd3status.OtherBits; + DecodeStatus(); //Alarm status... - uint32_t EpdID32; + if (onlyStatus) goto exitroutine; + + uint32_t EpdID32 ; uint32_t capabilities; MarkNumber_t MarkNumber; VersionNumber_t VersionNumber; @@ -571,6 +628,12 @@ int Epd3Base::Epd3U::ReadStatus() step = 2; //batchstep = 1; //ReadEpdIdentities + + EpdID32 = 0; + MarkNumber.Major = 0; + MarkNumber.Minor=0; + VersionNumber.Major = 0; + SetFunctionReturnValue(ReadEpdIdentities,0); token = BeginReadEpdIdentities(epdComsHandle, nullptr); rv = CommitAndSetRV(); @@ -586,24 +649,18 @@ int Epd3Base::Epd3U::ReadStatus() HardVersionMinor = MarkNumber.Minor; SoftVersion = VersionNumber.Major; VersionOK = true; - - DecodeStatus(); //Alarm status... + step = 3; - //batchstep = 2; + SetFunctionReturnValue(ReadCounts,0); token = BeginReadCounts(epdComsHandle, nullptr, 0, nullptr); rv = CommitAndSetRV(); if (!rv) rv = EndReadCounts(epdComsHandle, token, Counts, MaxCounts, &countsRead, &utc, &seconds); rv= SetEndReturnValue(rv); - // - 101 = InvalidParam - // - 104 = FunctionFail, - if (rv) goto error; // (r != 0 && r != -104) { Error = GetErrorCode(); goto error; } + if (rv) goto error; decodeCounters(countsRead); //HG,SG .. - //Wearer - - //Times //1601-01-01T00:00:00Z. //MK2 .. some utc... but no real time clock @@ -630,16 +687,8 @@ int Epd3Base::Epd3U::ReadStatus() step = 4; if (EPDIssued) { IdString_t mk3WearerID; + mk3WearerID.Length = 0; //Mk2 EPDs only support Name and Primary ID - //batchstep = 0; - //s[batchstep]=SetFunctionReturnValue(ReadWearerId, 0); - //btoken[batchstep] = BeginReadWearerId(epdComsHandle, static_cast(WearerIdType::WearerId_Name), nullptr); - - //batchstep = 1; - //s[batchstep] = SetFunctionReturnValue(ReadWearerId, 0); - //btoken[batchstep] = BeginReadWearerId(epdComsHandle, static_cast(WearerIdType::WearerId_Primary), nullptr); - - //rv = CommitAndSetRV(s, 2); //batchstep = 0; SetFunctionReturnValue(ReadWearerId, 0); @@ -669,6 +718,7 @@ int Epd3Base::Epd3U::ReadStatus() if (WearerID[i] == 0xb) WearerID[i] = '0'; else WearerID[i] |= 0x30; } + exitroutine: return rv; error: @@ -698,7 +748,7 @@ int Epd3Base::Epd3U::ConnectAndStatus(int tokenSourceTimeout) if (dllStatus != 1) rv = 1; //Connect error else if (DeviceCount < 1) rv = 2; //TO - else if (isMK3 && ReadStatus() != 0) rv = 1; //Read Error + else if (isMK3 && ReadStatus(false) != 0) rv = 1; //Read Error else rv = 0; } else rv = 1; @@ -725,7 +775,6 @@ void Epd3Base::Epd3U::decodeSensitivities(int count) { } } } - void Epd3Base::Epd3U::decodetotDoses(int count) { //doses @@ -754,7 +803,6 @@ void Epd3Base::Epd3U::decodeDoses(int count) } } } - void Epd3Base::Epd3U::decodePeakRates(int count) { //Rates @@ -782,7 +830,6 @@ void Epd3Base::Epd3U::decodePeakRates(int count) } } } - void Epd3Base::Epd3U::decodeCounters(int count) { HG = SG = BC = FB = 0; @@ -796,7 +843,6 @@ void Epd3Base::Epd3U::decodeCounters(int count) } } } - void Epd3Base::Epd3U::decodeBaseCounters(int count) { D1 = D2 = D3 = D4 = 0; @@ -810,7 +856,6 @@ void Epd3Base::Epd3U::decodeBaseCounters(int count) } } } - void Epd3Base::Epd3U::decodeTreshold(Mk3AlarmThresholds_t* th) { float* pThDose = nullptr, * pThRate = nullptr, * pTHDoseWarning = nullptr, * pTHRateWarning = nullptr; @@ -844,7 +889,6 @@ void Epd3Base::Epd3U::decodeTreshold(Mk3AlarmThresholds_t* th) } } } - void Epd3Base::Epd3U::encodeTreshold(Mk3AlarmThresholds_t* th) { //th.MeasId @@ -1107,7 +1151,6 @@ int Epd3Base::Epd3U::ClearDoses() return rv; } - int Epd3Base::Epd3U::ClearAlarms() { constexpr int maxbatch = 2; @@ -1134,7 +1177,6 @@ int Epd3Base::Epd3U::ClearAlarms() Error = rv; return rv; } - WORD Epd3Base::Epd3U::PrepareForIssue() { int rv = 0; @@ -1177,16 +1219,19 @@ WORD Epd3Base::Epd3U::PrepareForIssue() if (rv != 0) goto error; - Sleep(2000); + OutputDebugStringA("**** After clear ****\n"); + Disconnect(epdComsHandle); + Sleep(SleepAfterClear); return rv; error: + snprintf(DiagnosticsWrite, DiagnosticsWriteSize, "**** After clear step %d error %d ****\n", step, rv); + OutputDebugStringA(DiagnosticsWrite); ErrorStep = step; Error = rv; return rv; } - WORD Epd3Base::Epd3U::ReadAlarmConfig() { //Alleen MK3 ? leeg bij MK2 @@ -1196,7 +1241,6 @@ WORD Epd3Base::Epd3U::ReadAlarmConfig() { if (!r) { r = EndReadAlarmConfiguration(epdComsHandle, token, alarmConfig, MaxAlarmConfig, &numAlarm); SetEndReturnValue(r); } return numAlarm; } - WORD Epd3Base::Epd3U::ReadAlarmTresholds() { //Alleen MK3 ? leeg bij MK2 bool isNeutron = (EpdType == EpdTypes::Mk2Neutron || EpdType == EpdTypes::Mk3Neutron); @@ -1225,7 +1269,6 @@ WORD Epd3Base::Epd3U::ReadAlarmTresholds() { return r; } - WORD Epd3Base::Epd3U::WriteAlarmTresholds() { //Alleen MK3 ? leeg bij MK2 uint32_t r; @@ -1264,7 +1307,6 @@ error: return r; } - WORD Epd3Base::Epd3U::DeIssue() { int r = 1; @@ -1272,42 +1314,35 @@ WORD Epd3Base::Epd3U::DeIssue() if (port == 0) return 0; if (CurrentDeviceID == 0) return 0; - if (EPDIssued) { - + if (EPDIssued) + { #if DeissueWithClear - ErrorStep = 2; - r = ClearDoses(); - - ErrorStep = 1; - r = ClearAlarms(); - - //needed after clear alarms - Sleep(2000); + ErrorStep = 2; + r = ClearDoses(); + ErrorStep = 1; + r = ClearAlarms(); + //needed after clear alarms + Sleep(2000); #endif - - SetFunctionReturnValue(eFunctions::DeissueEPD,0); - token = BeginDeissueEPD(epdComsHandle, nullptr); - r = CommitAndEnd2RV(EndDeissueEPD,token); - //r = Commit3(epdComsHandle); SetCommitReturnValue(r); if (!r) r = EndDeissueEPD(epdComsHandle, token); SetEndReturnValue(r); - Sleep(2000); + SetFunctionReturnValue(eFunctions::DeissueEPD, 0); + token = BeginDeissueEPD(epdComsHandle, nullptr); + r = CommitAndEnd2RV(EndDeissueEPD, token); + Sleep(100); } SetFunctionReturnValue(eFunctions::EpdOnOff,0); token = BeginEpdOnOff(epdComsHandle, 0, nullptr); r = CommitAndEnd2RV(EndEpdOnOff, token); - //r = Commit3(epdComsHandle); SetCommitReturnValue(r); if (!r) r = EndEpdOnOff(epdComsHandle, token); SetEndReturnValue(r); Sleep(100); - EndCom(true); if (r) goto error; - return r; error: + Error = r; return r; } - WORD Epd3Base::Epd3U::WriteWearer() { int32_t r = 0; @@ -1371,8 +1406,6 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) //normaal is preparedone=tru if (r) goto error; } - - step = 1; if (!isConnected) r = ReOpenDev(); if (r) goto error; @@ -1421,7 +1454,7 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) //normaal is preparedone=tru } if (r) goto error; - + EPDIssued = 1; step = 6; @@ -1430,8 +1463,6 @@ WORD Epd3Base::Epd3U::Issue(bool PrepareDone) //normaal is preparedone=tru } step = 7; - EndCom(false); - return r; error: @@ -1530,9 +1561,11 @@ int Epd3Base::Epd3U::GetAllDeissue(bool reconnect) rv = DeIssue(); //does close if (rv) goto error; - + EndCom(isConnected); return rv; + error: + EndCom(isConnected); Error = rv; ErrorStep = step; return rv; @@ -1543,6 +1576,10 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate) { int rv = 0; int step = 0; + DWORD wrv = 0; + int rv1 = -1, rv2 = -1; + + ResetStepReturnValues(); if (!isConnected) rv = ReOpenDev(); if (rv) goto error; @@ -1551,11 +1588,22 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate) rv = SetTime(); //synctime + OutputDebugStringW(L"**** Prepare ****\n"); step = 2; rv = PrepareForIssue(); //Set epd on, clear doses and alarms if (rv) goto error; - + rv = ReOpenDev(); + rv = ReadStatusOnly(); + wrv= WaitForSingleObject(hCompletion, 2000); + if (wrv == WAIT_OBJECT_0) rv = 0; + else if (wrv == WAIT_TIMEOUT) { + rv = 1; + } + + //rv1 = StepReturnValues[CurrentStep][1]; + //rv2 = StepReturnValues[CurrentStep][2]; + step = 3; if (isNG) { step = 1; @@ -1571,7 +1619,6 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate) } } - step = 3; if (!isConnected) rv = ReOpenDev(); rv = SetChirp(ChirpRate); @@ -1581,14 +1628,20 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain, float ChirpRate) rv = SetChirp(ChirpRate); } if (rv) goto error; - step = 5; rv = Issue(true); // data already loaded if (rv) goto error; + //debug + /*rv = 1; EPDIssued = 0; goto error;*/ + + + EndCom(isConnected); return rv; + error: + EndCom(isConnected); Error = rv; ErrorStep = step; return rv; @@ -1600,11 +1653,12 @@ int Epd3Base::Epd3U::WriteConfig(void) int32_t r = 0; ECLen = 32; + snprintf(DiagnosticsWrite,DiagnosticsWriteSize,"**** WriteCfg v %d.%d ****\n", HardVersion, HardVersionMinor); + OutputDebugStringA(DiagnosticsWrite); // Become admin - SetFunctionReturnValue(eFunctions::WriteAccessLevel,0); + SetFunctionReturnValue(eFunctions::WriteAccessLevelAdmin,0); token = BeginWriteAccessLevel(epdComsHandle, AccessLevel_t::Admin, EC, ECLen, nullptr); r = CommitAndEnd2RV(EndWriteAccessLevel,token); - if (!r) { displayIds = new QuickAccessDisplay_t[6]{ { 0,0x0021 }, @@ -1623,17 +1677,33 @@ int Epd3Base::Epd3U::WriteConfig(void) if (!r) { //Unmanaged%20HtmlFiles/_display_ids.html numItems = 9; - enables = new DisplayAttributeMap_t[9]{ - { 0,0xDFFF,0xFFFF }, - { 1,0xDFFF,0xFF07 }, - { 2,0xDFFF,0xFFFF }, - { 3,0xDFFF,0xFFFF }, - { 4,0xDFFF,0xFE01 }, - { 5,0xDFFF,0xFFFF }, - { 6,0xDFFF,0xFFFF }, - { 7,0xDFFF,0xFFFB }, - { 8,0xDFFF,0xFFFF } - }; + if (HardVersionMinor > 0) { + enables = new DisplayAttributeMap_t[9]{ + { 0,0x3FFF,0xFFFF }, + { 1,0x3FFF,0xFF01 }, //{ 1,0x0FFF,0xFFE1 } + { 2,0x3FFF,0xFE0F }, + { 3,0x3FFF,0xFE0F }, + { 4,0x3FFF,0xFE01 }, + { 5,0x3FFF,0xFF0B }, + { 6,0x3FFF,0xFFF9 }, + { 7,0x3FFF,0xFFD3 }, + { 8,0x3FFF,0xFFFF } + }; + } + else { + enables = new DisplayAttributeMap_t[9]{ + { 0,0x0FFF, 0xFFFF }, + { 1,0x0FFF,0xFFE1 }, + { 2,0x0FFF,0xFE07 }, + { 3,0x0FFF,0xFE07 }, + { 4,0x0FFF,0xFE01 }, + { 5,0x0FFF,0xFF0B }, + { 6,0x0FFF,0xFFF9 }, + { 7,0x0FFF,0xFFD3 }, + { 8,0x0FFF,0xFFFF } + }; + } + // 0x1 Operation Menu Back /0x2 On / Off 0x4 Clear Dose 0x8 Toggle Telemtry 0x10 Responder Trigger // 1 0 0 0 0 @@ -1651,7 +1721,7 @@ int Epd3Base::Epd3U::WriteConfig(void) 0x0000 , 0x0000 , 0x0000 , - 0x0006 , + 0x0004 , 0x0000 }; @@ -1691,23 +1761,24 @@ int Epd3Base::Epd3U::WriteConfig(void) if (!r) { //OffModeDisplay - //batchstep = 0; dutyCycle = (OffModeDutyCycle)0; offModeDispId = (OffModeDisplayId_t)1; SetFunctionReturnValue(eFunctions::WriteOffModeDisplay_R3,1); token = BeginWriteOffModeDisplay_R3(epdComsHandle, dutyCycle, offModeDispId, nullptr); r = CommitAndEnd2RV(EndWriteOffModeDisplay_R3, token); - //SwitchOnFromButton - //batchstep = 1; uint8_t OnOfenabled = 0; - //s[batchstep] = SetFunctionReturnValue(eFunctions::WriteSwitchOnFromButton_R3, 0); - //btoken[batchstep] = BeginWriteSwitchOnFromButton_R3(epdComsHandle, OnOfenabled, nullptr); - SetFunctionReturnValue(eFunctions::WriteSwitchOnFromButton_R3, 0); token = BeginWriteSwitchOnFromButton_R3(epdComsHandle, OnOfenabled, nullptr); r = CommitAndEnd2RV(EndWriteSwitchOnFromButton_R3, token); + SetFunctionReturnValue(eFunctions::WriteAccessLevelOpen, 0); + token = BeginWriteAccessLevel(epdComsHandle, AccessLevel_t::Open,nullptr,0, nullptr); + r = CommitAndEnd2RV(EndWriteAccessLevel, token); + + Sleep(200); + r = DisconnectAndConnect(); + Error = r; } @@ -1737,4 +1808,4 @@ int Epd3Base::Epd3U::SetChirp(float Sensitivity) return r; error: return r; -} \ No newline at end of file +} diff --git a/EpdBase3/Epd3Base.h b/EpdBase3/Epd3Base.h index 16288fe..d6f5a1a 100644 --- a/EpdBase3/Epd3Base.h +++ b/EpdBase3/Epd3Base.h @@ -18,10 +18,12 @@ #define MaxSteps 50 #define MaxBatch 4 #define ResponseTimeout 2500 +#define DiagnosticsWriteSize 256 namespace Epd3Base { enum eFunctions { - ReadSensitivities, ReadDetectorThresholds, fReadDoses, ReadTotalDoses, ReadQualityData, ReadPeakRates, ClearTotalDose, ClearDose, ClearPeakRates, ClearFaultStatus, ClearLatchedAlarms, EpdOnOff, ReadAlarmConfiguration, ReadAlarmThresholds, WriteAlarmThresholds, WriteRateOffPercentage, DeissueEPD, SetBaselineCounters, WriteWearerId, ReadBaselineCounts, MfrLogin_R2, WriteSensitivities_R2, WriteAccessLevel + ReadSensitivities, ReadDetectorThresholds, fReadDoses, ReadTotalDoses, ReadQualityData, ReadPeakRates, ClearTotalDose, ClearDose, ClearPeakRates, ClearFaultStatus, ClearLatchedAlarms, EpdOnOff, ReadAlarmConfiguration, ReadAlarmThresholds, WriteAlarmThresholds, WriteRateOffPercentage, DeissueEPD, SetBaselineCounters, WriteWearerId, ReadBaselineCounts, MfrLogin_R2, WriteSensitivities_R2 + , WriteAccessLevelAdmin, WriteAccessLevelOpen , WriteQuickAccessDisplays_R3, WriteDisplayEnables_R3, WriteDisplayEnablePermissions_R3, WriteAlarmConfiguration_R3, WriteOffModeDisplay_R3, WriteSwitchOnFromButton_R3 , WriteChirpSensitivity, WriteChirpEnable_R3 , WriteRTC_R3 @@ -30,6 +32,8 @@ namespace Epd3Base { , fDisconnect , fDisconnectAndNotify , fStartDiscover , IssueEPD, EnableProtectedSession + , fCreateReaderInterface,fOpenReader + , TestVibe }; class Epd3U { @@ -57,6 +61,7 @@ namespace Epd3Base { WORD ErrorData; int ConnectRetries = 0; + int OpenRetries = 0; BYTE isConnected = 0; int32_t Dll3RV; @@ -271,12 +276,14 @@ namespace Epd3Base { int OpenDev(DiscoveryId DeviceID); int ReOpenDev(); int DisCon(UINT16 alarm); + int DisconnectAndConnect(); void CloseDev(bool CloseAll); void DecodeStatus(); int SetTime(); - int ReadStatus(); + int ReadStatusOnly(void); + int ReadStatus(bool statusOnly); protected: void decodeCounters(int count); @@ -288,8 +295,8 @@ namespace Epd3Base { void decodetotDoses(int count); void decodeDoses(int count); void decodePeakRates(int count); - public: + public: int SetFunctionReturnValue(eFunctions f, BYTE CanIgnore); void SetCommitReturnValue(int rv); void SetCommitReturnValue(int step, int rv); @@ -325,6 +332,9 @@ namespace Epd3Base { private: int WriteConfig(void); void ResetStepReturnValues(); + + public: + char DiagnosticsWrite[DiagnosticsWriteSize]; }; } diff --git a/EpdBaseClr/EpdBaseClr.cpp b/EpdBaseClr/EpdBaseClr.cpp index 66de5c9..4d92d24 100644 --- a/EpdBaseClr/EpdBaseClr.cpp +++ b/EpdBaseClr/EpdBaseClr.cpp @@ -781,7 +781,7 @@ int EpdBaseClr::Epd2::GetAll(bool close) return rv; } -//main entry point for exit +// Main entry point for exit int EpdBaseClr::Epd2::GetAllDeissue(bool reconnect) { ErrorRV = ErrorStep = 0; @@ -806,16 +806,18 @@ int EpdBaseClr::Epd2::GetAllDeissue(bool reconnect) /// /// /// -int EpdBaseClr::Epd2::IssueAndCheck(float gain,float ChirpRate, bool WriteConfig) +int EpdBaseClr::Epd2::IssueAndCheck(float gain, float ChirpRate, bool WriteConfig) { int rv = 0; if (!isMK3) { BeforeSetIssued(epd); rv = epd->IssueAndCheck(gain); - } else { + } + else { epd3->WriteConfig32 = WriteConfig; BeforeSetIssued(epd3); //geen interactie met epd rv = epd3->IssueAndCheck(gain, ChirpRate); // set step,error + EPDIssued = epd3->EPDIssued; } return rv; } diff --git a/TestMK3/TestMK3.cpp b/TestMK3/TestMK3.cpp index 1f754b8..a595719 100644 --- a/TestMK3/TestMK3.cpp +++ b/TestMK3/TestMK3.cpp @@ -7,7 +7,7 @@ -char comPort[] = "COM7"; +char comPort[] = "COM3"; CommsHandle epdComsHandle; uint32_t EpdID; EpdGeneration EpdGen; diff --git a/eDosLocal/UpdateLocal.sql b/eDosLocal/UpdateLocal.sql index 76c4a72..9b6cb84 100644 --- a/eDosLocal/UpdateLocal.sql +++ b/eDosLocal/UpdateLocal.sql @@ -390,7 +390,13 @@ UPDATE [dbo].[Visit] SET InitError=@InitError WHERE ID_Station=@ID_Station AND I go GRANT EXECUTE ON [dbo].[VisitInitConfirm] TO [eDosStation]; GO -ALTER PROCEDURE [dbo].[VisitInit] @PersID INT, +ALTER TABLE DBO.PersonInfoSnapshot ADD Info XML; +GO +IF OBJECT_ID('[dbo].[LocalEPD]') IS NULL BEGIN +CREATE TABLE [dbo].[LocalEPD] ( [ID_STATION] INT NOT NULL , [EPD_InternalID] VARCHAR(8) NOT NULL, [ID_EPD] INT NOT NULL, [LastUsed] DATETIME null, PRIMARY KEY([ID_STATION],[EPD_InternalID]) ) +end +GO +CREATE OR ALTER PROCEDURE [dbo].[VisitInit] @PersID INT, @ID_Task INT, @Inst_CODE INT, @EPD_InternalID INT, @@ -399,32 +405,177 @@ ALTER PROCEDURE [dbo].[VisitInit] @PersID INT, @ID_Station INT NULL, @ID_Visit INT, @ENTRY_EPD_CLOCK DECIMAL(10, 0) NULL, - @epdType TINYINT = NULL + @epdType TINYINT = NULL, + @InitError INT = 0 AS --Local !! -DECLARE @ID_EPD INT; +DECLARE @ID_EPD INT ; +DECLARE @now DATETIME = GETDATE() ; IF @ID_Station IS NULL SELECT @ID_Station = [ID_Station] FROM [dbo].[StationSettings] - WHERE [PCNr] = HOST_NAME(); + WHERE [PCNr] = HOST_NAME() ; SELECT @ID_EPD = [ID_EPD] FROM [dbo].[EPD] -WHERE [EPD_InternalID] = @EPD_InternalID; +WHERE [EPD_InternalID] = @EPD_InternalID ; IF @ID_EPD IS NULL BEGIN INSERT [dbo].[EPD]([EPD_InternalID], [EPD_sn], [EPDType]) - VALUES(@EPD_InternalID, CONVERT(VARCHAR(8), @EPD_InternalID), CASE WHEN @epdType IS NOT NULL THEN @epdType - WHEN @isBG = 0 THEN 2 ELSE 0 END); + VALUES(@EPD_InternalID, CONVERT(VARCHAR(8), @EPD_InternalID), CASE WHEN @epdType IS NOT NULL + THEN @epdType + WHEN @isBG = 0 + THEN 2 + ELSE 0 + END) ; - SET @ID_EPD = SCOPE_IDENTITY(); -END; + SET @ID_EPD = SCOPE_IDENTITY() ; +END ; -INSERT [dbo].[Visit]([ID_Station], [PersID], [Inst_CODE], [ID_Visit], [ID_Task], [EntryTime], [ID_EPD], [isBG], [isComplete], [isDeleted], [isAlarmCleared], [isAlarm], [isManualExit], [ENTRY_EPD_CLOCK], [EXIT_EPD_CLOCK], [epdType], [epdID],InitError) -VALUES(@ID_Station, @PersID, @Inst_CODE, @ID_Visit, @ID_Task, GETDATE(), @ID_EPD, @isBG, 0, 0, 0, 0, 0, @ENTRY_EPD_CLOCK, @ENTRY_EPD_CLOCK, @epdType, @EPD_InternalID,0); +IF NOT EXISTS + ( + SELECT + * + FROM [dbo].[LocalEPD] + WHERE [ID_Station] = @ID_Station + AND [EPD_InternalID] = @EPD_InternalID + ) + INSERT [dbo].[LocalEPD]([ID_EPD], [ID_Station], [EPD_InternalID], LastUsed) + VALUES(@ID_EPD, @ID_Station, CONVERT(VARCHAR(8), @EPD_InternalID), @now) ; +ELSE + UPDATE + [dbo].[LocalEPD] + SET + [LastUsed] = @now + WHERE [ID_Station] = @ID_Station + AND [EPD_InternalID] = @EPD_InternalID ; + + + + +INSERT [dbo].[Visit]([ID_Station], [PersID], [Inst_CODE], [ID_Visit], [ID_Task], [EntryTime], [ID_EPD], [isBG], [isComplete], [isDeleted], [isAlarmCleared], [isAlarm], [isManualExit], [ENTRY_EPD_CLOCK], [EXIT_EPD_CLOCK], [epdType], [epdID], [InitError] ) +VALUES(@ID_Station, @PersID, @Inst_CODE, @ID_Visit, @ID_Task, @now, @ID_EPD, @isBG, 0, 0, 0, 0, 0, @ENTRY_EPD_CLOCK, @ENTRY_EPD_CLOCK, @epdType, @EPD_InternalID, @InitError ) ; + +SET @EPDVisitID = @ID_Visit * 100+@ID_Station ; -SET @EPDVisitID = @ID_Visit * 100 + @ID_Station; GO +USE [eDosLocal] +GO +/****** Object: StoredProcedure [dbo].[GetPersonInfo] Script Date: 9/11/2024 10:10:40 AM ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +CREATE OR ALTER PROCEDURE [dbo].[GetPersonInfo] + @CSN CHAR(14) = NULL, + @PersID INT = NULL, + @AllowMultipleEPD BIT = 0, + @CheckUser BIT = 1 +AS +BEGIN + --DECLARE @PersID INT = 12103, @CSN CHAR(14) = null,@AllowMultipleEPD BIT = 0; + SET NOCOUNT ON; + + DECLARE @lid_station INT, + @lid_visit INT; + + IF @PersID IS NULL + SELECT @PersID = [PersID] + FROM [dbo].[PersonInfoSnapshot] + WHERE [CSN] = @CSN COLLATE SQL_Latin1_General_CP850_BIN; + + SET NOCOUNT OFF; + + SELECT TOP (1) + @lid_station = [ID_Station], + @lid_visit = [ID_Visit] + FROM [dbo].[Visit] + WHERE [PersID] = @PersID + AND [ReturnTime] IS NULL + AND [EntryTime] > DATEADD(YEAR, -1, GETDATE()) + AND [InitError]=0; + + SELECT [a].[PersID], + [a].[Type], + [a].[CSN], + [a].[FirstName], + [a].[LastName], + [a].[NickName], + [AccessAllow] = CONVERT( BIT, + CASE + WHEN @AllowMultipleEPD = 1 + AND [a].[hasEPD] = 1 THEN + 0 + ELSE + [a].[AccessAllow] + END + ), + [a].[Language], + [a].[MarginHP10_M], + [a].[MarginHP10_Y], + [a].[Margin], + [a].[VisitIDLocked], + [a].[ID_CommentToPerson], + [a].[Comment], + [a].[Deleted], + [ReasonNoAccess] = CASE + WHEN @AllowMultipleEPD = 1 + AND [a].[hasEPD] = 1 THEN + 'EPD not returned' + WHEN ISNULL([VisitIDLocked], 0) > 0 THEN + 'Locked because of alarm' + ELSE + [a].[ReasonNoAccess] + END, + [a].[Dose_52W_microSv], + [a].[hasEPD], + [activeStation] = @lid_station, + [activeVisit] = @lid_visit, + [a].[isAgent] + FROM + ( + SELECT [p].[PersID], + [p].[Type], + [p].[CSN], + [p].[FirstName], + [p].[LastName], + [p].[NickName], + [AccessAllow] = CASE + WHEN @CheckUser = 0 THEN + 1 + ELSE + [p].[AccessAllow] + END, + [p].[Language], + [p].[MarginHP10_M], + [p].[MarginHP10_Y], + [p].[Margin], + [p].[VisitIDLocked], + [p].[ID_CommentToPerson], + [p].[Comment], + [p].[Deleted], + [p].[ReasonNoAccess], + [p].[Dose_52W_microSv], + [hasEPD] = CONVERT( BIT, + CASE + WHEN @lid_visit IS NOT NULL THEN + 1 + ELSE + 0 + END + ), + [isAgent] = CONVERT( BIT, + CASE + WHEN [p].[isAgent] IS NULL THEN + 0 + ELSE + [p].[isAgent] + END + ) + FROM [dbo].[PersonInfoSnapshot] [p] + WHERE [p].[PersID] = @PersID + ) [a]; +END; diff --git a/eDosLocal/eDosLocal.sqlproj b/eDosLocal/eDosLocal.sqlproj index 6d0de8d..661e5b8 100644 --- a/eDosLocal/eDosLocal.sqlproj +++ b/eDosLocal/eDosLocal.sqlproj @@ -1,64 +1,68 @@ - - - - Debug - AnyCPU - eDosLocal - 2.0 - 4.1 - {3a150025-d770-4521-ba21-16843b2d5359} - Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider - Database - - - eDosLocal - eDosLocal - 1033, CI - BySchemaAndSchemaType - True - v4.5 - CS - Properties - False - True - True - - - bin\Release\ - $(MSBuildProjectName).sql - False - pdbonly - true - false - true - prompt - 4 - - - bin\Debug\ - $(MSBuildProjectName).sql - false - true - full - false - true - true - prompt - 4 - - - 11.0 - - True - 11.0 - - - - - - - - - - + + + + Debug + AnyCPU + eDosLocal + 2.0 + 4.1 + {3a150025-d770-4521-ba21-16843b2d5359} + Microsoft.Data.Tools.Schema.Sql.Sql130DatabaseSchemaProvider + Database + + + eDosLocal + eDosLocal + 1033, CI + BySchemaAndSchemaType + True + v4.5 + CS + Properties + False + True + True + + + bin\Release\ + $(MSBuildProjectName).sql + False + pdbonly + true + false + true + prompt + 4 + + + bin\Debug\ + $(MSBuildProjectName).sql + false + true + full + false + true + true + prompt + 4 + + + 11.0 + + True + 11.0 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eDosLocal/eDosLocalProcedures.sql b/eDosLocal/eDosLocalProcedures.sql new file mode 100644 index 0000000000000000000000000000000000000000..1bbba85f6806123b7cc89e0a5fe0e6cd0492533d GIT binary patch literal 80176 zcmeHQZF60>jlN&IGy5O3A9mxUNn<;4+GJN**_PwD@mnpqX;$O$xVDqJ@ry=sllsr^ zE}jED20(&5=UiRMSDB2)zV{x2AP9m02!cHS_rLcSJBw?Jjm6&L>0*2FYH_%@DgQrS zJX$Oej0uR3b zV|a!(4i|40FXgGW@nG>gd3JxXFEEd!?$gCR`S(KV@%!tc?n|lnU}!;Gc`W#zNv+rN zZ2PDtDENHw@$m2B;{4*`;!}BYK`6TwQz zwuQ2L18;6DzLJt_i@z*xNFR6Q-*NkL8hqV3;x$GE-2I1e(ewIjaCE#E?~0cqx1bBbMSZ9$>$xT_q60^TQt`r@g&yK4z_sYX+9l3T@x=1 zI_j*Abn;_hHCeiU9}9lGv1u|@Og@d^Iz`uiY}Pe${} z^Xab4&jXPpc>mV!I_o#(RZjQG^J|(OSbzRa>&MCS6E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HnQJ znJ?n+ByVZm*hAcEcVFnmuBc{G?8>(*qNUn)OwYFM%ltc#`DgnZ4~n@sW$oI=HFm?3 z_TRUz{Lk}|b!4D7u=}7{N_eJN=oxbT$hAOy!;|-FxO!o&EV~$O@H{p%fJ*py=G@oF zOOV|IFPLY_eU0on;4@mwykO&poe9UYb`CH~nfa^VaZ*di;Ty4W_FZ#(6-G09_4{XU zVVJ#(=gir~cV_D1JM(k#{ZTV37p3i7T$Dl%^zIny7DOaT?RefTaA3CpH(Rn6erGwh zgsn4cS>m&y-)N_k{Rb=IfL>%y%wZ#l6_&@%zYcj=ONqpNMD|Rm(d5vHa@mGj?Y7S zd@-6B?V0V{XR<-+KX#q%}v6&TlgSjCuJ?KjO$DL#46{u_)y4b z|D!~D@cW!ZDi9e!hPvj+s`UHSil@-9<=;0z#FhIO7P*Qi*W()7@2sK!KDOce>m>s6 zqmq-i4Bk9G;#>})8l651=OH2lRfQ1TD~l+QASMK^-D;@mix4uL!=binVCL%?u>Q< zea>r|tx#JC3#g~ysK?uNH;eZZnFepy@$V8cJKBfWlNGR0Q@nM&dviy;9qkX|wd~21 z+RAD2ZAuM&PXpprJx||{bsthGpzqv2ojNw|)3A)oz%)Eo3PEk6|94e9h@RDr?pJ;o9yvGS$N| zoliY1~sz1q{}V8(%Qo_P*0!!KWdIbL}T^Z4XzPUlfs3o_-SKU3m;jA#3L7Cp?O zlBkiLA86-bpay(;i`Ml#d|hGoJbGZV6SNVRkA%U8k9d5k?{Oaa%Ohg7Y#1$U4eO(N dcLnzxYD~{(3Gp6~Dfg0Oe4m~Vdc4fv{|7wN?F#?^ literal 0 HcmV?d00001 diff --git a/eDosLocal/eDosLocalTables.sql b/eDosLocal/eDosLocalTables.sql new file mode 100644 index 0000000000000000000000000000000000000000..c8ae38b1acb18f94ab2ffc02d6795def4bb2f0f4 GIT binary patch literal 55330 zcmeHQZBraK5}vPjRreqG7Mw~Yv14CySLF{2EU+;wgoW5H%C%)1;t-pcVoA>a^LO_= z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~GFA z;2dKX$~Am5rBJ0DOK_*y_3bY6s`Xu&+QcVh?q5BA>6@+H_DI_GY> zUCO7;S-NQkJImVMtXHQkw+?wwBhi1YEhg-+>;|uUybbCpa9(K#um5*Dx4K8pg2_H>t6Z76q&~u;gS7#X!$ptQ_H)8`JJ^ZN=0Lkw5VOsu=6%Q-+er2bgvB$ zX&Oy<(0(8)Y17hBpHKY*-gw?yMazq`&X_lLNPw;rF69# z?dolECu`F7Bo)!`wr2YbS5hBf98kw@qvR@3@d)#dcWH6OmHKxjd5V`rv#G18F-Le! z%)1Hn`wY+1$6}r-vp;r0_)a8-ugog{TxqlU6Oy* zp3H8ao|;{M>1WvjSy3)}x-7OQy-^+;Y`+q%I#~Amy-L2t%FJ6Jt8?g5vHq^4h8Rfq zF_3yP=r1x-kB=cOmJIO{iMR~$5=Q)ncnPD` z^m>`;FvLrCfW(QQsVfFQpYe*p&*%JL23PY~LlZwgD>i=}pyW^)gx90BnDbB6AJAN3O+AxtW#<4VCEG|EF zGii#rn=RKaG)}1Nc0*h#PF$(D|KrA#ih1ZNo}?bPj4;MA#ha{_t1<;b&|8Pf){Zp7 zQ}q-BT?eh=t<8`J!qWq|nx$*6<-F)>z%EMg{-pF>7Ww?z^AK4>~fqBZn)e8)hAo zE1q^#QUY7KC)vk4koVNcPsW#0Nw0OrTNkaq@3u%AsQut~@ps(bXN?fmUjQ8EBU@eNz4r3P5{*%uOWB#yIr5j;*LILUY)NxqoF$0xxue4$|@cs`SFqM zr_Xh4xISU_1iv{DeEu}XKF35kKXt}IIi=#3`E*2H{zd)rxsCywNk?BTzhd2|ylvfe zWNS+mb6j1HMeY4k--> - - + + @@ -98,7 +98,7 @@ - + @@ -291,8 +291,8 @@ - - + + @@ -300,7 +300,7 @@ - + @@ -319,6 +319,7 @@ + @@ -335,44 +336,41 @@ - + Ready Please take your EPD - - + + + - - + + + + - - + + + - - - - - - - - - - - - - - - - + + + + + + + + + @@ -383,7 +381,7 @@ - + @@ -395,7 +393,6 @@ - diff --git a/eDosStation/EntryBadge.xaml.cs b/eDosStation/EntryBadge.xaml.cs index 64850f7..fd18034 100644 --- a/eDosStation/EntryBadge.xaml.cs +++ b/eDosStation/EntryBadge.xaml.cs @@ -239,17 +239,18 @@ namespace eDosStation dataInterface.VisitInitCommand.Parameters["ENTRY_EPD_CLOCK"].Value = ep.CountsClock; dataInterface.VisitInitCommand.Parameters["epdType"].Value = (byte)ep.epdType; dataInterface.VisitInitCommand.Parameters["EPDVisitID"].Value = 0; - using (var l = new SqlLog()) - try - { - dataInterface.VisitInitCommand.ExecuteNonQuery(); - l.LogCommand(dataInterface.VisitInitCommand); - } - catch (System.Exception ex) - { - l.LogCommand(ex.Message); - MessageBox.Show(ex.Message); - } + dataInterface.VisitInitCommand.Parameters["InitError"].Value = 0; + //using (var l = new SqlLog()) + // try + // { + // dataInterface.VisitInitCommand.ExecuteNonQuery(); + // l.LogCommand(dataInterface.VisitInitCommand); + // } + // catch (System.Exception ex) + // { + // l.LogCommand(ex.Message); + // MessageBox.Show(ex.Message); + // } //StationVisitID = (int?)dataInterface.VisitInitCommand.Parameters["EPDVisitID"].Value; StationVisitID = ID_Visit * 100 + thisStation.ID_Station; //co.Close(); @@ -318,6 +319,7 @@ namespace eDosStation if (!CurTaskRow.IsChirpRateNull()) ChirpRate = (int)CurTaskRow.ChirpRate; //doing stuff on EPD + int rv = ep.IssueAndCheck(gain, ChirpRate, thisStation.WriteConfig); if (rv != 0 || thisStation.LogAll || ep.HasStepError()) @@ -330,28 +332,50 @@ namespace eDosStation lbHP07.Text = ep.Hp07Name; lbHP10.Text = ep.Hp10Name; - if (rv != 0) + if (ep.EPDIssued) { - MessageBox.Show($"SetIssued error {rv}"); - step = "SqlConfirmVisit"; - dataInterface.VisitInitConfirmCommand.Connection = co; - dataInterface.VisitInitConfirmCommand.Parameters["ID_Station"].Value = thisStation.ID_Station; - dataInterface.VisitInitConfirmCommand.Parameters["ID_Visit"].Value = ID_Visit; - dataInterface.VisitInitConfirmCommand.Parameters["InitError"].Value = rv; - try + using (var l = new SqlLog()) { - dataInterface.VisitInitConfirmCommand.ExecuteNonQuery(); - //l.LogCommand(dataInterface.VisitInitCommand); - } - catch (System.Exception ex) - { - //l.LogCommand(ex.Message); - MessageBox.Show(ex.Message); - thisStation.splunkLog.WriteException(module, step, ex); + try + { + dataInterface.VisitInitCommand.Parameters["InitError"].Value = rv; + dataInterface.VisitInitCommand.ExecuteNonQuery(); + l.LogCommand(dataInterface.VisitInitCommand); + } + catch (System.Exception ex) + { + l.LogCommand(ex.Message); + thisStation.splunkLog.WriteException(module, step, ex); + MessageBox.Show(ex.Message); + } + + //if (rv != 0) + //{ + // MessageBox.Show($"SetIssued error {rv}"); + // step = "SqlConfirmVisit"; + // dataInterface.VisitInitConfirmCommand.Connection = co; + // dataInterface.VisitInitConfirmCommand.Parameters["ID_Station"].Value = thisStation.ID_Station; + // dataInterface.VisitInitConfirmCommand.Parameters["ID_Visit"].Value = ID_Visit; + // dataInterface.VisitInitConfirmCommand.Parameters["InitError"].Value = rv; + // try + // { + // dataInterface.VisitInitConfirmCommand.ExecuteNonQuery(); + // //l.LogCommand(dataInterface.VisitInitCommand); + // } + // catch (System.Exception ex) + // { + // //l.LogCommand(ex.Message); + // MessageBox.Show(ex.Message); + // thisStation.splunkLog.WriteException(module, step, ex); + // l.LogCommand(ex.Message); + // } + //} } } + else + MessageBox.Show("No registration",string.Empty,MessageBoxButton.OK,MessageBoxImage.Error); co.Close(); - ShowFinal(); + ShowFinal(rv); } } else @@ -369,8 +393,27 @@ namespace eDosStation new Action(delegate { })); } - private void ShowFinal() + + private void ShowFinal(int ReturnValue) { + Run run; + FinalHeader.Inlines.Clear(); + if (ReturnValue == 0) { + FinalHeader.Inlines.Add(Properties.Resources.FinalEpdOkHeader); + FinalHeader.Inlines.Add(new LineBreak()); + run = new Run(Properties.Resources.FinalEpdOkSecond); + run.Foreground = System.Windows.Media.Brushes.Green; + run.Background= System.Windows.Media.Brushes.White; + FinalHeader.Inlines.Add(run); + } else { + FinalHeader.Inlines.Add(Properties.Resources.FinalEpdNotOkHeader); + FinalHeader.Inlines.Add(new LineBreak()); + run = new Run(Properties.Resources.FinalEpdNotOkSecond); + run.Foreground = System.Windows.Media.Brushes.Red; + run.Background = System.Windows.Media.Brushes.Yellow; + FinalHeader.Inlines.Add(run); + } + FinalTimeOut = false; dispatcherTimer = new DispatcherTimer(DispatcherPriority.Background); dispatcherTimer.Interval = thisStation.InfoProgressbarInterval; @@ -378,7 +421,7 @@ namespace eDosStation ResultTime = DateTime.Now.AddSeconds(thisStation.InfoScreenTimeout); pWaitEpd.Value = pWaitEpd.Maximum = thisStation.InfoScreenTimeout; pWaitEpd.Visibility = Visibility.Visible; - tWaitFor.Text = "EPD Ready "; + panelWait.Visibility = Visibility.Collapsed; panelDone.Visibility = Visibility.Visible; bEpdCancel.Content = "OK"; bEpdCancel.IsEnabled = true; diff --git a/eDosStation/MainWindow.xaml.cs b/eDosStation/MainWindow.xaml.cs index e2a98b7..df5640e 100644 --- a/eDosStation/MainWindow.xaml.cs +++ b/eDosStation/MainWindow.xaml.cs @@ -27,7 +27,7 @@ namespace eDosStation { string ers = string.Empty; - if (thisStation.RestartCom && (thisStation.RestartComFirst == true)) + if (thisStation.RestartCom && thisStation.RestartComFirst ) { thisStation.DeviceRestart(); } @@ -35,7 +35,7 @@ namespace eDosStation var w = new ShowEPDDose(thisStation); w.ShowDialog(); - if (thisStation.RestartCom && (thisStation.RestartComFirst == true)) + if (thisStation.RestartCom && !thisStation.RestartComFirst ) { thisStation.DeviceRestart(); } @@ -49,7 +49,7 @@ namespace eDosStation string step = "DeviceRestart"; try { - if (thisStation.RestartCom && (thisStation.RestartComFirst == true)) + if (thisStation.RestartCom && thisStation.RestartComFirst) { thisStation.DeviceRestart(); } @@ -77,7 +77,7 @@ namespace eDosStation step = "DeviceReset2"; try { - if (thisStation.RestartCom && !(thisStation.RestartComFirst == true)) + if (thisStation.RestartCom && !thisStation.RestartComFirst) { thisStation.DeviceRestart(); } @@ -104,7 +104,7 @@ namespace eDosStation #endif w.ShowDialog(); w = null; - if (thisStation.RestartCom && !(thisStation.RestartComFirst)) + if (thisStation.RestartCom && !thisStation.RestartComFirst) { ers = thisStation.DeviceRestart(); } diff --git a/eDosStation/Properties/AssemblyInfo.cs b/eDosStation/Properties/AssemblyInfo.cs index b3f6de5..7cf8c82 100644 --- a/eDosStation/Properties/AssemblyInfo.cs +++ b/eDosStation/Properties/AssemblyInfo.cs @@ -58,5 +58,8 @@ using System.Windows; //2.22 No clear bij deissue. //2.27 Display wait while issuing //2.28 After testing -[assembly: AssemblyVersion("2.28.0.0")] -[assembly: AssemblyFileVersion("2.28.0.0")] +//2.29 Met endcom +//2.30 check reset voor OF na EPD verbinding +//2.31 extra disconnect/connect +[assembly: AssemblyVersion("2.31.0.0")] +[assembly: AssemblyFileVersion("2.31.0.0")] diff --git a/eDosStation/Properties/Resources.Designer.cs b/eDosStation/Properties/Resources.Designer.cs index 9eec954..0e7533d 100644 --- a/eDosStation/Properties/Resources.Designer.cs +++ b/eDosStation/Properties/Resources.Designer.cs @@ -61,7 +61,7 @@ namespace eDosStation.Properties { } /// - /// Looks up a localized string similar to Thu 05/16/2024 15:48:58.18 + /// Looks up a localized string similar to Wed 09/11/2024 10:46:38.88 ///. /// internal static string BuildDate { @@ -69,5 +69,43 @@ namespace eDosStation.Properties { return ResourceManager.GetString("BuildDate", resourceCulture); } } + + /// + /// Looks up a localized string similar to EPD Failed !. + /// + internal static string FinalEpdNotOkHeader { + get { + return ResourceManager.GetString("FinalEpdNotOkHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please try again + ///. + /// + internal static string FinalEpdNotOkSecond { + get { + return ResourceManager.GetString("FinalEpdNotOkSecond", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to EPD Ready. + /// + internal static string FinalEpdOkHeader { + get { + return ResourceManager.GetString("FinalEpdOkHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please take your EPD + ///. + /// + internal static string FinalEpdOkSecond { + get { + return ResourceManager.GetString("FinalEpdOkSecond", resourceCulture); + } + } } } diff --git a/eDosStation/Properties/Resources.resx b/eDosStation/Properties/Resources.resx index 8a639f7..5c445af 100644 --- a/eDosStation/Properties/Resources.resx +++ b/eDosStation/Properties/Resources.resx @@ -121,4 +121,18 @@ ..\Resources\BuildDate.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + EPD Failed ! + + + Please try again + + + + EPD Ready + + + Please take your EPD + + \ No newline at end of file diff --git a/eDosStation/Resources/BuildDate.txt b/eDosStation/Resources/BuildDate.txt index 72ec4f5..48fce2d 100644 --- a/eDosStation/Resources/BuildDate.txt +++ b/eDosStation/Resources/BuildDate.txt @@ -1 +1 @@ -Mon 09/09/2024 10:26:16.80 +Wed 09/11/2024 13:50:26.43 diff --git a/eDosStation/Settings.xaml b/eDosStation/Settings.xaml index accee93..ec269b9 100644 --- a/eDosStation/Settings.xaml +++ b/eDosStation/Settings.xaml @@ -6,10 +6,10 @@ xmlns:local="clr-namespace:eDosStation" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" mc:Ignorable="d" - Title="Settings" Height="448.033" Width="702.744" + Title="Settings" Height="479.533" Width="702.744" FontFamily="Segoe UI" FontSize="20" Loaded="Window_Loaded"> - + diff --git a/eDosStation/cDevCon.cs b/eDosStation/cDevCon.cs index 11766fe..e5740dc 100644 --- a/eDosStation/cDevCon.cs +++ b/eDosStation/cDevCon.cs @@ -44,7 +44,8 @@ namespace eDosStation if (System.IO.File.Exists(DevConExePath)) hasCommand = true; } } - else spl?.WriteSplunkLog(className, cspl.iseverity.warning, "No Admin"); + else + spl?.WriteSplunkLog(className, cspl.iseverity.warning, "No Admin"); } private string ExecuteDevcon(string command) { diff --git a/scripts/Upgrader.ps1 b/scripts/Upgrader.ps1 index af80787..51f2a23 100644 --- a/scripts/Upgrader.ps1 +++ b/scripts/Upgrader.ps1 @@ -213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MTExMTUwNDNaMC8GCSqGSIb3DQEJBDEiBCDbjZuxJgcSDufz +# +ekiprJJKPMdOid8HFavnX4C8hgeWzANBgkqhkiG9w0BAQEFAASCAgCdOGquU2OU +# Q2fyo4YjFnW1g0vehLEpsMqn4snKEefbFcWDaEVlB+6+md4HrStpfx9de5woy+yQ +# EdEI6CXC4FBu/vDo9kocHE2RGPNKBmXfBnVHX8G0VhyyjsqePymv9LpcM18IRgpf +# nAgBEPIeQPLc132O2iCBKr1P8/y1kuY5QbG8e5hkLP5rk6ZB5Nw5eId1oy/vMTs3 +# DEOiIaO4Cgbguxp5z4xJ2x4xXO0rYC4NP4DYAMIEUdr2TbqR0DpfibMqandsV/dK +# Dr6MSW4G6nTkEyo+QVh+xfmgFjO+RaQwYLfIXKfuwP6W7k+nhKCNKMYRoAyjqrsC +# Lp/Y2WIS498FLt8qGBXOK4aTEbwCcM799m8qIKnPF2l034Y/mkjaG8G1l4xl25SA +# ITWdQdBe0NQTJ0IXRX+PLejQbQlIe/tSdAMLlSYc1+MddMi+Qf1XB5IhqORDsRUL +# KKc9IqhOhZDoyBwkRxWse8lqN0mioOwHUnrlv2lTDDivkaXckuzC7pPLdFAmTHxo +# cwuMd+I2VmLgH2U7x5lALCSuPt9fbNAxvprHUTHniZVrtNH8EcCZXWs6puAgawDI +# LNCVc78XsA510FxdJJec+XDmx3XrC/OVP9d8H51QAzZVCak0z+tZSifHyErb19LL +# On+wO7ZduMmE9xHuwyZsuasFK1IXkxgH5w== # SIG # End signature block diff --git a/scripts/installatie.ps1 b/scripts/installatie.ps1 index 8c342a5..af8bf58 100644 --- a/scripts/installatie.ps1 +++ b/scripts/installatie.ps1 @@ -328,17 +328,17 @@ exit # aWdpQ2VydCwgSW5jLjE7MDkGA1UEAxMyRGlnaUNlcnQgVHJ1c3RlZCBHNCBSU0E0 # MDk2IFNIQTI1NiBUaW1lU3RhbXBpbmcgQ0ECEAVEr/OUnQg5pr/bP1/lYRYwDQYJ # YIZIAWUDBAIB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0MlieXsuoXBDdijX +# nA6SwUsP+eJFoQlXhAQtjEbAM7CPCNou3sGxo5tAG3RpF3N9Aq2KISXO06vtyAq+ +# 7ISuD/3omQ31Ub8g0kOvvEBb2mZaLXT84G2BYI9asyhVmYEFG4Qq4ufSm04gWUxB +# w2KAWni3czEg6h1e5a3HzZeylYBYMVRZlbbjRYL+tdSgDX6Lfq4b/kWGRKdhdnWH +# cloLsXREiWaD8k0EamjPWD7Sl/wFv8reyZCBLdRTmOaPxdUxeeyhdaD6qsExDnUD +# YXiwCMGRQ+zR/zUlsHObK3igwISU2/XUs1JaDav58lP+jV+MFb5deHL+I50KYdZH +# /4GiYRQnsZzUHuDkycay9iFSZss9WAxdEfXilnZI7rPNRVcIzTd60Rq3mIdtQXEn +# 3zkmcCTQq4MB2O50I9fHUGT6q3SgUE4vACSqx8VdnmgWXjTnVCglNw1dYKC9FMr0 +# AAUx+Ao6pKxc+HPfln2D3Oi12ChCmIpkyq6FCU9QgshyKiYNuwDa0YX+P3EfGWct +# vrUb0qgQA+QrnIESLN74WMDkjJpKcbr3sfOX+8hnTkQUfBv+75Ib/Vi2PalMCUFs +# PSOnDjh++ps5WMcZ0rNM6AnZRZ11bXKeyQ== # SIG # End signature block diff --git a/scripts/installatie2.ps1 b/scripts/installatie2.ps1 index 094c613..d1d1516 100644 --- a/scripts/installatie2.ps1 +++ b/scripts/installatie2.ps1 @@ -192,17 +192,17 @@ exit # aWdpQ2VydCwgSW5jLjE7MDkGA1UEAxMyRGlnaUNlcnQgVHJ1c3RlZCBHNCBSU0E0 # MDk2IFNIQTI1NiBUaW1lU3RhbXBpbmcgQ0ECEAVEr/OUnQg5pr/bP1/lYRYwDQYJ # YIZIAWUDBAIBBQCgaTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3 -# DQEJBTEPFw0yNDA5MDkwOTA4NDJaMC8GCSqGSIb3DQEJBDEiBCDpOCR32+BElOsp -# pr9o2qvS6Cq0zGXXv8N/urfn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c0 +# Lz3ZtK92x8G+7mFo5/Vu+ztskVGqL1qZoFH1Igu5GynAx13ob4hjnirotzNlxP6m +# anjirjCn127GGBwttrSgIAkp+kVkU3QIurE2jfV7G4/+QmAO6bQB1jX3kWzgJFxq +# 9SUcRavTIBh7hK2Bk+5sAFUHgPaTVLOHWbsUGOs4nudBem+Y14+zDg7hgwtPMca6 +# XKsZ03t4seH+AjfJBNfrPgVpp1hyZy9Zww7SNIcdkYmYd6UA7Zn9JtMj7ILnRcbL +# RYLP1Caq3+PmG2v5pOgoVjzpcTtfOztFLdrh0WOUWJpoRiQBd2AEWhGNuor2LUkF +# 4M5KuMVoYZysX/hFXnRJiKHVtybu7LvlUg53TuPN34TAyA78ORM3upYRJ8zD+oY1 +# igE6ReWNGSqHNoR73SNfjcBo8k4DnMNDlg3/K1U9SPhFILGGanmGKM4iEP+sUqxJ +# HLW92mevPa0g1JJaWnNnsnfQqXFOoNktEQ== # SIG # End signature block diff --git a/syncEdosLocal/Program.cs b/syncEdosLocal/Program.cs index 2b30403..5dbbe3f 100644 --- a/syncEdosLocal/Program.cs +++ b/syncEdosLocal/Program.cs @@ -154,6 +154,8 @@ namespace syncEdosLocal } public static bool DoorloopToDo(System.Data.SqlClient.SqlConnection fromConnection, string toConstr, System.Data.SqlClient.SqlInfoMessageEventHandler im, ref bool error, ref bool warning) { + int ciIgnoreError = -1; + bool ignorederror = false; ds = new DataSet(); DataTable dtTables = new DataTable("Tables"); ds.Tables.Add(dtTables); @@ -164,6 +166,8 @@ namespace syncEdosLocal { spLog.KvClear(); cmd.CommandType = CommandType.StoredProcedure; + SqlParameter pa = new SqlParameter("@withIgnoreError", true); + cmd.Parameters.Add(pa); spLog.KvAddCommand(spl.skeys.sqlQuery, cmd); using (var ncta = new System.Data.SqlClient.SqlDataAdapter(cmd)) { @@ -171,6 +175,7 @@ namespace syncEdosLocal { ncta.Fill(dtTables); int r = dtTables.Rows.Count; + ciIgnoreError = dtTables.Columns.IndexOf("ignoreError"); spLog.KvAdd(spl.skeys.recordsAffected, r); spLog.WriteSplunkLog(string.Empty, spl.iseverity.info, "LoadTables"); } @@ -230,6 +235,7 @@ namespace syncEdosLocal foreach (DataRow rtr in dtTables.Rows) { + ucmd.Parameters["OBJECT_ID"].Value = (int)rtr[0]; string src = rtr[1].ToString(); dest = rtr[2].ToString(); @@ -277,11 +283,19 @@ namespace syncEdosLocal int cnt = 0; qry = LSWLib.SqlCommands.getColumnsQry(fromConnection, src); SqlConnection[] curDests = new SqlConnection[] { toConnection }; + System.Diagnostics.Debug.WriteLine(Task); + ignorederror = false; cnt = Bulker.Execute(Task, fromConnection, curDests, qry, CommandType.Text, dest, 0, ref error); ucmd.Parameters["lastRecords"].Value = cnt; if (dest.Contains("PersonInfo")) Result.Persons = cnt; else if (dest.Contains("TaskInfo")) Result.Tasks = cnt; + if (error && ciIgnoreError >= 0 && rtr[ciIgnoreError] is bool && (bool)rtr[ciIgnoreError]) + { + error = false; + ignorederror = true; + spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "ignored", Task); + } if (sqlCmdsActivate != null) using (var cmd = new System.Data.SqlClient.SqlCommand(sqlCmdsActivate.ToString(), toConnection)) @@ -306,7 +320,7 @@ namespace syncEdosLocal spLog.WriteSplunkLog(string.Empty, spLog.splunkSeverity, "constraintsActivated", spLog.splunkError); } } - ucmd.Parameters["syncError"].Value = error; + ucmd.Parameters["syncError"].Value = error | ignorederror; ucmd.ExecuteNonQuery(); if (error) break; } @@ -516,43 +530,43 @@ namespace syncEdosLocal try { cr["ReturnTime"] = lr["ReturnTime"]; - cr["Hp10Dose"] = lr["Hp10Dose"]; - cr["Hp07Dose"] = lr["Hp07Dose"]; - cr["Hp10Total"] = lr["Hp10Total"]; - cr["Hp07Total"] = lr["Hp07Total"]; - cr["Hp10Peak"] = lr["Hp10Peak"]; - cr["Hp07Peak"] = lr["Hp07Peak"]; - cr["Hp10Time"] = lr["Hp10Time"]; - cr["Hp07Time"] = lr["Hp07Time"]; - cr["QualityData"] = lr["QualityData"]; - cr["K1"] = lr["K1"]; - cr["K2"] = lr["K2"]; - cr["K3"] = lr["K3"]; - cr["K4"] = lr["K4"]; - cr["K5"] = lr["K5"]; - cr["K6"] = lr["K6"]; - cr["SG"] = lr["SG"]; - cr["BC"] = lr["BC"]; - cr["FB"] = lr["FB"]; - cr["HG"] = lr["HG"]; - cr["alarmStatus"] = lr["alarmStatus"]; - cr["otherAlarms"] = lr["otherAlarms"]; - cr["errorStatus"] = lr["errorStatus"]; - cr["operatingStatus"] = lr["operatingStatus"]; - cr["isAlarm"] = lr["isAlarm"]; - cr["isAlarmCleared"] = lr["isAlarmCleared"]; - cr["ENTRY_EPD_CLOCK"] = lr["ENTRY_EPD_CLOCK"]; - cr["EXIT_EPD_CLOCK"] = lr["EXIT_EPD_CLOCK"]; - cr["TIME_LOST"] = lr["TIME_LOST"]; - cr["eDosBatteryWarning"] = lr["eDosBatteryWarning"]; - cr["eDosDose07Warning"] = lr["eDosDose07Warning"]; - cr["eDosDose07Alarm"] = lr["eDosDose07Alarm"]; - cr["eDosRate07Warning"] = lr["eDosRate07Warning"]; - cr["eDosRate07Alarm"] = lr["eDosRate07Alarm"]; - cr["eDosDose10Warning"] = lr["eDosDose10Warning"]; - cr["eDosDose10Alarm"] = lr["eDosDose10Alarm"]; - cr["eDosRate10Warning"] = lr["eDosRate10Warning"]; - cr["eDosRate10Alarm"] = lr["eDosRate10Alarm"]; + cr["Hp10Dose"] = lr["Hp10Dose"]; + cr["Hp07Dose"] = lr["Hp07Dose"]; + cr["Hp10Total"] = lr["Hp10Total"]; + cr["Hp07Total"] = lr["Hp07Total"]; + cr["Hp10Peak"] = lr["Hp10Peak"]; + cr["Hp07Peak"] = lr["Hp07Peak"]; + cr["Hp10Time"] = lr["Hp10Time"]; + cr["Hp07Time"] = lr["Hp07Time"]; + cr["QualityData"] = lr["QualityData"]; + cr["K1"] = lr["K1"]; + cr["K2"] = lr["K2"]; + cr["K3"] = lr["K3"]; + cr["K4"] = lr["K4"]; + cr["K5"] = lr["K5"]; + cr["K6"] = lr["K6"]; + cr["SG"] = lr["SG"]; + cr["BC"] = lr["BC"]; + cr["FB"] = lr["FB"]; + cr["HG"] = lr["HG"]; + cr["alarmStatus"] = lr["alarmStatus"]; + cr["otherAlarms"] = lr["otherAlarms"]; + cr["errorStatus"] = lr["errorStatus"]; + cr["operatingStatus"] = lr["operatingStatus"]; + cr["isAlarm"] = lr["isAlarm"]; + cr["isAlarmCleared"] = lr["isAlarmCleared"]; + cr["ENTRY_EPD_CLOCK"] = lr["ENTRY_EPD_CLOCK"]; + cr["EXIT_EPD_CLOCK"] = lr["EXIT_EPD_CLOCK"]; + cr["TIME_LOST"] = lr["TIME_LOST"]; + cr["eDosBatteryWarning"] = lr["eDosBatteryWarning"]; + cr["eDosDose07Warning"] = lr["eDosDose07Warning"]; + cr["eDosDose07Alarm"] = lr["eDosDose07Alarm"]; + cr["eDosRate07Warning"] = lr["eDosRate07Warning"]; + cr["eDosRate07Alarm"] = lr["eDosRate07Alarm"]; + cr["eDosDose10Warning"] = lr["eDosDose10Warning"]; + cr["eDosDose10Alarm"] = lr["eDosDose10Alarm"]; + cr["eDosRate10Warning"] = lr["eDosRate10Warning"]; + cr["eDosRate10Alarm"] = lr["eDosRate10Alarm"]; } catch (System.Exception ex) { @@ -581,6 +595,6 @@ namespace syncEdosLocal { spLog?.Connection_InfoMessageLog(e, ref messages); } - + } }