diff --git a/EpdBase3/Epd3Base.cpp b/EpdBase3/Epd3Base.cpp
index 98e6d7d..1378777 100644
--- a/EpdBase3/Epd3Base.cpp
+++ b/EpdBase3/Epd3Base.cpp
@@ -84,8 +84,6 @@ Epd3Base::Epd3U::Epd3U(int _comport)
if (_comport == 0) return;
if (hCompletion == 0) hCompletion = CreateEvent(NULL, TRUE, FALSE, NULL);
//if (hWaitTimer == 0) hWaitTimer = CreateEvent(NULL, TRUE, FALSE, NULL);
-
-
}
Epd3Base::Epd3U::~Epd3U()
@@ -137,7 +135,6 @@ void Epd3Base::Epd3U::EndCom()
epdComsHandle = INVALID_HANDLE_VALUE;
}
-
///
///
///
@@ -229,16 +226,19 @@ BYTE checkStatus(OpStatusFlags status, OpStatusFlags flag)
{
if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
}
+
BYTE checkStatus(FaultStatusFlags status, FaultStatusFlags flag)
{
if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
}
+
BYTE checkStatus(AlarmStatusFlags status, AlarmStatusFlags flag)
{
uint32_t ustatus = (uint32_t)status;
uint32_t uflag = (uint32_t)flag;
if ((ustatus & uflag) == uflag) return 1; else return 0;
}
+
BYTE checkStatus(DoseAlarmFlags status, DoseAlarmFlags flag)
{
if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
@@ -246,7 +246,6 @@ BYTE checkStatus(DoseAlarmFlags status, DoseAlarmFlags flag)
void Epd3Base::Epd3U::DecodeStatus()
{
-
eDosDose07Warning = eDosDose07Alarm = eDosDose10Warning = eDosDose10Alarm = eDosRate07Warning = eDosRate07Alarm = eDosRate10Warning = eDosRate10Alarm = eDosBatteryWarning = eDosDoseAlarm = eDosRateAlarm = 0;
hasAlarm = hasFault = false;
@@ -469,6 +468,7 @@ int Epd3Base::Epd3U::ConnectAndStatus(int tokenSourceTimeout)
/// K1 = K2 = K3 = K4 = K4 = K6 (*100000 )
///
///
+
void Epd3Base::Epd3U::decodeSensitivities(int count) {
K1 = K2 = K3 = K4 = K4 = K6 = 0.0F;
@@ -485,6 +485,7 @@ void Epd3Base::Epd3U::decodeSensitivities(int count) {
}
}
}
+
void Epd3Base::Epd3U::decodetotDoses(int count)
{
//doses
@@ -513,6 +514,7 @@ void Epd3Base::Epd3U::decodeDoses(int count)
}
}
}
+
void Epd3Base::Epd3U::decodePeakRates(int count)
{
//Rates
@@ -540,6 +542,7 @@ void Epd3Base::Epd3U::decodePeakRates(int count)
}
}
}
+
void Epd3Base::Epd3U::decodeCounters(int count)
{
HG = SG = BC = FB = 0;
@@ -553,6 +556,7 @@ void Epd3Base::Epd3U::decodeCounters(int count)
}
}
}
+
void Epd3Base::Epd3U::decodeBaseCounters(int count)
{
D1 = D2 = D3 = D4 = 0;
@@ -566,6 +570,7 @@ void Epd3Base::Epd3U::decodeBaseCounters(int count)
}
}
}
+
void Epd3Base::Epd3U::decodeTreshold(Mk3AlarmThresholds_t* th)
{
float* pThDose = nullptr, * pThRate = nullptr, * pTHDoseWarning = nullptr, * pTHRateWarning = nullptr;
@@ -599,6 +604,7 @@ void Epd3Base::Epd3U::decodeTreshold(Mk3AlarmThresholds_t* th)
}
}
}
+
void Epd3Base::Epd3U::encodeTreshold(Mk3AlarmThresholds_t* th)
{
//th.MeasId
@@ -834,7 +840,6 @@ error:
return r;
}
-
int Epd3Base::Epd3U::ClearAlarms()
{
int r = 0;
@@ -860,13 +865,13 @@ int Epd3Base::Epd3U::ClearAlarms()
error:
//-102 is permissieprobleem (65434)
return r;
-
}
+
WORD Epd3Base::Epd3U::PrepareForIssue()
{
int rv = 0;
if (port == 0) return 0;
- //CommitRV = WriteConfig();
+ rv = WriteConfig();
if (DetectorsOn) {
token = BeginEpdOnOff(epdComsHandle, 0, nullptr);
@@ -886,6 +891,7 @@ WORD Epd3Base::Epd3U::PrepareForIssue()
error:
return rv;
}
+
WORD Epd3Base::Epd3U::ReadAlarmConfig() {
//Alleen MK3 ? leeg bij MK2
token = BeginReadAlarmConfiguration(epdComsHandle, nullptr, 0, nullptr);
@@ -893,6 +899,7 @@ WORD Epd3Base::Epd3U::ReadAlarmConfig() {
r = EndReadAlarmConfiguration(epdComsHandle, token, alarmConfig, MaxAlarmConfig, &numAlarm);
return numAlarm;
}
+
WORD Epd3Base::Epd3U::ReadAlarmTresholds() {
//Alleen MK3 ? leeg bij MK2
bool isNeutron = (EpdType == EpdTypes::Mk2Neutron || EpdType == EpdTypes::Mk3Neutron);
@@ -917,6 +924,7 @@ WORD Epd3Base::Epd3U::ReadAlarmTresholds() {
return r;
}
+
WORD Epd3Base::Epd3U::WriteAlarmTresholds() {
//Alleen MK3 ? leeg bij MK2
uint32_t r;
@@ -963,6 +971,7 @@ error:
return r;
}
+
WORD Epd3Base::Epd3U::DeIssue()
{
int r = 1;
@@ -991,6 +1000,7 @@ WORD Epd3Base::Epd3U::DeIssue()
error:
return r;
}
+
WORD Epd3Base::Epd3U::WriteWearer() {
int32_t r = 0;
@@ -1032,6 +1042,7 @@ WORD Epd3Base::Epd3U::WriteWearer() {
///
///
/// 0 Success
+
WORD Epd3Base::Epd3U::Issue()
{
int r=0;
@@ -1110,6 +1121,7 @@ WORD Epd3Base::Epd3U::Issue()
error:
return r;
}
+
WORD Epd3Base::Epd3U::EPDReadExtraStatus()
{
if (port == 0) return 1;
@@ -1131,6 +1143,7 @@ WORD Epd3Base::Epd3U::EPDReadExtraStatus()
//if (CommitRV == 1) CommitRV = Commit3();
return r;
}
+
WORD Epd3Base::Epd3U::WriteCal()
{
uint32_t r = 0;
@@ -1167,6 +1180,7 @@ WORD Epd3Base::Epd3U::WriteCal()
error:
return r;
}
+
int Epd3Base::Epd3U::GetAll(bool Closeconnection)
{
int rv = 0, step=1;
@@ -1188,7 +1202,7 @@ int Epd3Base::Epd3U::GetAllDeissue()
return rv;
}
-int Epd3Base::Epd3U::IssueAndCheck(float gain)
+int Epd3Base::Epd3U::IssueAndCheck(float gain,float ChirpRate)
{
int rv = 0;
if (isNG) {
@@ -1202,9 +1216,71 @@ int Epd3Base::Epd3U::IssueAndCheck(float gain)
if (rv != 0) goto error;
}
}
+ SetChirp( ChirpRate);
rv = PrepareForIssue();
if (!rv) rv = Issue(); // data already loaded
return rv;
error:
return rv;
+}
+
+int Epd3Base::Epd3U::WriteConfig(void)
+{
+ if (port == 0) return 1;
+ int32_t r = 0;
+ ECLen = 32;
+
+ token = BeginWriteAccessLevel(epdComsHandle, AccessLevel_t::Admin, EC, ECLen, , nullptr);
+ r = Commit3(epdComsHandle);
+ r = EndWriteAccessLevel(epdComsHandle, token);
+ displayIds = new QuickAccessDisplay_t[6]{
+ { 0,0x0021 },
+ { 1,0x0022 },
+ { 2,0x0031 },
+ { 3,0x0032 },
+ { 4,0x0051 },
+ { 5,0x0062 }
+ };
+ numDisplays = 6;
+
+ token = BeginWriteQuickAccessDisplays_R3(epdComsHandle, displayIds, 6, , nullptr);
+ r = Commit3(epdComsHandle);
+ r = EndWriteQuickAccessDisplays_R3(epdComsHandle, token);
+
+ numItems = 9;
+ enables = new DisplayAttributeMap_t[9]{
+ { 0, 0x5E96, 0xFFFF },
+ { 1, 0x5E96, 0xFFE1 },
+ { 2, 0x5E96, 0xFFFF },
+ { 3, 0x5E96, 0xFF0F },
+ { 4, 0x5E96, 0xFE01 },
+ { 5, 0x5E96, 0xFF03 },
+ { 6, 0x5E96, 0xFFFF },
+ { 7, 0x5E96, 0xFF81 },
+ { 8, 0x5E96, 0xFFFF }
+ };
+
+ token = BeginWriteDisplayEnables_R3(epdComsHandle, enables, numItems, nullptr);
+ r = Commit3(epdComsHandle);
+ r = EndWriteDisplayEnables_R3(epdComsHandle, token);
+
+ return r;
+}
+
+int Epd3Base::Epd3U::SetChirp(float Sensitivity)
+{
+ uint32_t r = 1;
+ uint8_t enable = 0;
+ if (Sensitivity > 0.001F) {
+ enable = 1;
+ token = BeginWriteChirpSensitivity(epdComsHandle, Sensitivity, nullptr);
+ r = Commit3(epdComsHandle);
+ r = EndWriteChirpSensitivity(epdComsHandle, token);
+ }
+
+ token = BeginWriteChirpEnable_R3(epdComsHandle, enable, nullptr);
+ r = Commit3(epdComsHandle);
+ r = EndWriteChirpEnable_R3(epdComsHandle, token);
+
+ return r;
}
\ No newline at end of file
diff --git a/EpdBase3/Epd3Base.h b/EpdBase3/Epd3Base.h
index 6a00599..56ac0b2 100644
--- a/EpdBase3/Epd3Base.h
+++ b/EpdBase3/Epd3Base.h
@@ -224,6 +224,16 @@ namespace Epd3Base {
DetectorThreshold_t dTresholds[MaxTresholds];
+
+ DisplayAttributeMap_t* enables;
+ uint8_t numItems;
+
+ QuickAccessDisplay_t* displayIds;
+ uint8_t numDisplays;
+
+ EncryptionKey EC;
+ uint8_t ECLen;
+
//Functions
int OpenDev(DiscoveryId DeviceID);
int DisCon(UINT16 alarm);
@@ -247,7 +257,8 @@ namespace Epd3Base {
public:
int GetAll(bool Closeconnection);
int GetAllDeissue();
- int IssueAndCheck(float gain);
+ int IssueAndCheck(float gain, float ChirpRate);
+ int SetChirp(float Sensitivity);
WORD ReadCal();
WORD ReadSensitivitiesAndTresholds();
WORD ReadDoses();
@@ -264,6 +275,8 @@ namespace Epd3Base {
WORD EPDReadExtraStatus();
WORD WriteCal();
+ int WriteConfig(void);
+ int SetChirp(float Sensitivity);
};
}
diff --git a/EpdBaseClr/EpdBaseClr.cpp b/EpdBaseClr/EpdBaseClr.cpp
index 392e87a..1d640a0 100644
--- a/EpdBaseClr/EpdBaseClr.cpp
+++ b/EpdBaseClr/EpdBaseClr.cpp
@@ -746,7 +746,7 @@ int EpdBaseClr::Epd2::GetAllDeissue()
///
///
///
-int EpdBaseClr::Epd2::IssueAndCheck(float gain)
+int EpdBaseClr::Epd2::IssueAndCheck(float gain,float ChirpRate)
{
int rv = 0;
if (!isMK3) {
@@ -756,7 +756,7 @@ int EpdBaseClr::Epd2::IssueAndCheck(float gain)
else
{
BeforeSetIssued(epd3);
- rv = epd3->IssueAndCheck(gain);
+ rv = epd3->IssueAndCheck(gain, ChirpRate);
}
return rv;
}
diff --git a/EpdBaseClr/EpdBaseClr.h b/EpdBaseClr/EpdBaseClr.h
index da6ce44..5c35583 100644
--- a/EpdBaseClr/EpdBaseClr.h
+++ b/EpdBaseClr/EpdBaseClr.h
@@ -309,6 +309,7 @@ namespace EpdBaseClr {
int AfterGetStatus(EpdBase::Epd2U* epd);
int AfterGetStatus(Epd3Base::Epd3U* epd);
int AfterGetStatus();
+ int IssueAndCheck(float gain, float ChirpRate);
int SwitchCon();
void InitData();
diff --git a/MK3/MK3.cpp b/MK3/MK3.cpp
index 00d2eba..09d7dbe 100644
--- a/MK3/MK3.cpp
+++ b/MK3/MK3.cpp
@@ -1,366 +1,401 @@
-#include "pch.h"
-#include "MK3.h"
-
-#pragma managed
-
-namespace MK3 {
- Epd2::Epd2(int port)
- {
- //epdBase = gcnew sEpdBase(this);
- epd = new Epd2U(port);
- Jan2000 = gcnew DateTime(2000, 1, 1);
- this->InitRV = epd->InitRv;
- epd->StartCom();
- Issued=isOn=isBG=isMK3=0;
- }
-
- Epd2::~Epd2()
- {
- delete epd;
- this->!Epd2();
- }
-
- Epd2::!Epd2()
- {
- }
-
- int Epd2::Connect(bool reinit)
- {
- ConnectError = 0;
- EpdID = 0;
- DeviceCount = 0;
- DiscRV = 0;
- if (epd != nullptr) {
- if (epd->CommsInitialized == 0) epd->StartCom();
- DiscRV = epd->StartDiscover();
- if (DiscRV == 1)
- {
- DeviceCount = epd->DeviceCount;
- if (epd->DeviceCount >= 0)
- {
- EpdID = epd->DeviceIDs[0];
- }
- }
- else {
- ConnectError = epd->Error;
- }
- }
- return DiscRV;
- }
-
- int Epd2::Close()
- {
- EpdID = 0;
- if (epd != nullptr) epd->CloseDev();
- return 0;
- }
-
- int Epd2::DecodeStatus()
- {
- epd->DecodeStatus();
- //OperatingStatus
- DetectorsOn = epd->DetectorsOn;
- EPDIssued = epd->EPDIssued;
- EPDLocked = epd->EPDLocked;
- EPDTesting = epd->EPDTesting;
- EPDProcSec = epd->EPDProcSec;
- EPDFaulty = epd->EPDFaulty;
-
- EPDNewFault = epd->EPDNewFault;
- EPDComFault = epd->EPDComFault;
- EPDCalFault = epd->EPDCalFault;
- EPDDetFault = epd->EPDDetFault;
- EPDEprFault = epd->EPDEprFault;
- EPDTrhFault = epd->EPDTrhFault;
- EPDOthFault = epd->EPDOthFault;
-
- AlarmDoseHP101G = epd->AlarmDoseHP101G;
- AlarmDoseHP102G = epd->AlarmDoseHP102G;
- AlarmDoseHP07N = epd->AlarmDoseHP07N;
- AlarmRateHP101G = epd->AlarmRateHP101G;
- AlarmRateHP102G = epd->AlarmRateHP102G;
- AlarmRateHP07N = epd->AlarmRateHP07N;
-
- OtherAlarmRateHp101G = epd->OtherAlarmRateHp101G;
- OtherAlarmRateHp102G = epd->OtherAlarmRateHp102G;
- OtherAlarmRateHp07N = epd->OtherAlarmRateHp07N;
- OtherAlarmReturn = epd->OtherAlarmReturn;
- OtherAlarmBatLow = epd->OtherAlarmBatLow;
- OtherAlarmCarrier = epd->OtherAlarmCarrier;
- OtherAlarmBatVolt = epd->OtherAlarmBatVolt;
-
- return 1;
- }
-
- int Epd2::SetTime() {
- epd->SetTime();
- return epd->utc;
- }
-
- int Epd2::ReadAlarmConfig() {
- epd->ReadAlarmConfig();
- return epd->numAlarm;
- }
-
- int Epd2::ReadAlarmTresholds() {
- epd->ReadAlarmTresholds();
- return 0;
- }
-
-
- int Epd2::GetStatus()
- {
- GetStatusError = 0; StatusRV = 0; Issued = false;
- WearerID = String::Empty;
- WearerName = String::Empty;
- StatusRV = epd->ReadStatus();
- if (StatusRV != 0)
- GetStatusError = epd->Error;
-
- Issued = epd->EPDIssued;
-
- WearerID = gcnew String((char*)epd->WearerID);
- WearerName = gcnew String((char*)epd->WearerName);
- isOn = (epd->DetectorsOn != 0);
- epdType = (int)epd->EpdType;
- isBG = (epd->EpdType == EpdTypes::Mk2BetaGamma || epd->EpdType == EpdTypes::Mk3BetaGamma);
-
- alarmStatus = epd->AlarmStatus;
- otherAlarms = epd->OtherAlarms;
- errorStatus = epd->ErrorStatus;
- operatingStatus = epd->OperatingStatus;
-
- EpdID = epd->EpdID;
- HardVersion = epd->HardVersion;
- SoftVersion = epd->SoftVersion;
- FunctionFlags = epd->FunctionFlags;
- CountsClock = epd->EpdClock;
- DecodeStatus();
- return StatusRV;
- }
-
- int Epd2::GetDoses()
- {
- Hp10 = Hp07 = 0.0;
- int ReadDosesRV = epd->ReadDoses();
-
- if (ReadDosesRV == 1) {
- GetDosesError = 0;
- Hp10 = (double)epd->Hp10Dose;
- Hp07 = (double)epd->Hp07Dose;
- Hp07Peak = (double)epd->Hp07Peak;
- Hp10Peak = (double)epd->Hp10Peak;
-
- Hp07Total = epd->Hp07Total;
- Hp10Total = epd->Hp10Total;
- }
- else {
- GetDosesError = epd->Error;
- }
-
- if (epd->Hp10Time > 0) {
- //seconds since 2000 ?
- //double x = (epd->EpdClock - epd->Hp10Time) * -1.0;
- Hp10PeakTime = Jan2000->AddSeconds(epd->Hp10Time);
- }
- else
- Hp10PeakTime = System::Nullable();;
- if (epd->Hp07Time > 0) {
- //double x = (epd->EpdClock - epd->Hp07Time) * -1.0;
- Hp07PeakTime = Jan2000->AddSeconds(epd->Hp07Time);
- }
- else
- Hp07PeakTime = System::Nullable();
-
- QualityData = epd->QualityData;
- K1 = epd->K1;
- K2 = epd->K2;
- K3 = epd->K3;
- K4 = epd->K4;
- K5 = epd->K5;
- K6 = epd->K6;
- SG = epd->SG;
- BC = epd->SG;
- FB = epd->FB;
- HG = epd->HG;
-
- return ReadDosesRV;
- }
-
- int Epd2::SetDeIssued()
- {
- return epd->DeIssue();
- }
-
- int Epd2::PrepareForIssue()
- {
- PrepareForIssueError = 0;
- int rv = epd->PrepareForIssue();
- if (rv != 1) PrepareForIssueError = epd->Error;
- return rv;
- }
-
- int Epd2::SetIssued()
- {
- SetIssuedError = 0;
- epd->Hp07THDose = (float)Hp07THDose;
- epd->Hp10THDose1 = (float)Hp10THDose1;
- epd->Hp10THDose2 = (float)Hp10THDose2;
-
- epd->Hp10Rate1On = (float)(Hp10Rate1On);
- epd->Hp10Rate2On = (float)(Hp10Rate2On);
- epd->Hp07RateOn = (float)(Hp07RateOn);
-
- epd->Hp10Rate1Off = (float)(Hp10Rate1Off);
- epd->Hp10Rate2Off = (float)(Hp10Rate2Off);
- epd->Hp07RateOff = (float)(Hp07RateOff);
-
- epd->K3 = K3;
- epd->K4 = K4;
-
- memset(epd->WearerID, ' ', WearerIDLength); epd->WearerID[WearerIDLength] = 0;
- char* str1 = (char*)(void*)Runtime::InteropServices::Marshal::StringToHGlobalAnsi(WearerID);
- int l = strlen(str1);
- if (l > WearerIDLength) l = WearerIDLength;
- _memccpy(epd->WearerID + WearerIDLength - l, str1, l, WearerIDLength - l);
- Runtime::InteropServices::Marshal::FreeHGlobal((IntPtr)str1);
-
- memset(epd->WearerName, 0, WearerNameLength + 1);
- char* str2 = (char*)(void*)Runtime::InteropServices::Marshal::StringToHGlobalAnsi(WearerName);
- l = strlen(str2);
- if (l > WearerNameLength) l = WearerNameLength;
- _memccpy(epd->WearerName, str2, l, WearerNameLength);
- Runtime::InteropServices::Marshal::FreeHGlobal((IntPtr)str2);
-
- int rv = epd->Issue();
- if (rv != 0)
- SetIssuedError = epd->Error;
- return rv;
- }
-
- int Epd2::WriteCalibration()
- {
- epd->K1 = K1;
- epd->K2 = K2;
-
- epd->K3 = K3;
- epd->K4 = K4;
-
- epd->K5 = K5;
- epd->K6 = K6;
-
- //epd->K1 = 903;
- //epd->K2 = 613;
- //epd->K5 = 13100;
- //epd->K6 = 1310;
-
- int rv = epd->WriteCal();
- return rv;
-
- }
-
- int Epd2::ReadTresholds()
- {
- ReadTresholdsError = 0;
- int rv = epd->ReadAlarmTresholds();
- if (rv != 0) ReadTresholdsError = epd->Error;
-
- Hp10THDose1 = (double)epd->Hp10THDose1 / 64.0;
- Hp10THDose2 = (double)epd->Hp10THDose2 / 64.0;
- Hp07THDose = (double)epd->Hp07THDose / 64.0;
-
- Hp10Total = (double)epd->Hp10Total / 64.0;
- Hp07Total = (double)epd->Hp07Total / 64.0;
-
- Hp10Rate1On = (double)epd->Hp10Rate1On;
- Hp10Rate2On = (double)epd->Hp10Rate2On;
- Hp07RateOn = (double)epd->Hp07RateOn;
- Hp10Rate1Off = (double)epd->Hp10Rate1Off;
- Hp10Rate2Off = (double)epd->Hp10Rate2Off;
- Hp07RateOff = (double)epd->Hp07RateOff;
-
- K1 = epd->K1;
- K2 = epd->K2;
- K3 = epd->K3;
- K4 = epd->K4;
- K5 = epd->K5;
- K6 = epd->K6;
- SG = epd->SG;
- BC = epd->BC;
- FB = epd->FB;
- HG = epd->HG;
- return rv;
- }
-
- int Epd2::ReadExtraStatus()
- {
- int rv = epd->EPDReadExtraStatus();
- BatADC = epd->byBatADC;
- SupplyADC = epd->bySupplyADC;
-
- D1 = epd->D1;
- D2 = epd->D2;
- D3 = epd->D3;
- D4 = epd->D4;
- CountsClock = epd->CountsClock;
- CountsClockBase = epd->BaseCountsClock;
- return rv;
- }
-
- int Epd2::ConnectAndStatus()
- {
- int rv = Connect(false);
- if (rv == 0)
- {
- EpdID= epd->Epd.Id;
- isMK3 = (epd->EpdGen == EpdGeneration::Mk3);
- rv = GetStatus();
- }
- return rv;
- }
-
- void Epd2::WaitEpd()
- {
- int rv = 0; //start
- System::Threading::CancellationToken^ token = tokenSource->Token;
-
- do {
- rv = ConnectAndStatus();
- } while (rv != 0 && --readRetries > 0 && !token->IsCancellationRequested);
-
- //if (token->IsCancellationRequested) lastStatusRV = 7;
- if (rv == 0) {
- if (_EpdRead != nullptr)
- _EpdRead(this, gcnew EpdEventArgs(EpdID,Issued,isBG,isMK3));
- } else if (rv > 0 && _EpdError != nullptr) {
- _EpdError(this, gcnew EpdErrorEventArgs(rv));
- }
- return ;
- }
-
- System::Threading::Tasks::Task^ Epd2::Wait(int timeout, int Retries)
- {
- if (waitTask == nullptr)
- {
- tokenSourceTimeout = timeout;
- tokenSource = gcnew System::Threading::CancellationTokenSource(tokenSourceTimeout - 1000);
- readRetries = Retries;
- waitTask = System::Threading::Tasks::Task::Run(gcnew Action(this, &Epd2::WaitEpd)); // System::Threading::Tasks::Task::Factory->cre(gcnew Action(this, &CCard::WaitBadge), tokenSource->Token);
- }
- else {
- readRetries = Retries + 1;
- }
- return waitTask;
- }
- void Epd2::WaitEnd()
- {
- if (waitTask != nullptr)
- {
- tokenSource->Cancel();
- //cbCard->Cancel();
- Sleep(500);
- delete waitTask; waitTask = nullptr;
- delete tokenSource; tokenSource = nullptr;
- }
- }
+#include "pch.h"
+#include "MK3.h"
+
+#pragma managed
+
+namespace MK3 {
+ Epd2::Epd2(int port)
+ {
+ //epdBase = gcnew sEpdBase(this);
+ epd = new Epd2U(port);
+ Jan2000 = gcnew DateTime(2000, 1, 1);
+ this->InitRV = epd->InitRv;
+ epd->StartCom();
+ Issued=isOn=isBG=isMK3=0;
+ }
+
+ Epd2::~Epd2()
+ {
+ delete epd;
+ this->!Epd2();
+ }
+
+ Epd2::!Epd2()
+ {
+ }
+
+ int Epd2::Connect(bool reinit)
+ {
+ ConnectError = 0;
+ EpdID = 0;
+ DeviceCount = 0;
+ DiscRV = 0;
+ if (epd != nullptr) {
+ if (epd->CommsInitialized == 0) epd->StartCom();
+ DiscRV = epd->StartDiscover();
+ if (DiscRV == 1)
+ {
+ DeviceCount = epd->DeviceCount;
+ if (epd->DeviceCount >= 0)
+ {
+ EpdID = epd->DeviceIDs[0];
+ }
+ }
+ else {
+ ConnectError = epd->Error;
+ }
+ }
+ return DiscRV;
+ }
+
+ int Epd2::Close()
+ {
+ EpdID = 0;
+ if (epd != nullptr) epd->CloseDev();
+ return 0;
+ }
+
+ int Epd2::DecodeStatus()
+ {
+ epd->DecodeStatus();
+ //OperatingStatus
+ DetectorsOn = epd->DetectorsOn;
+ EPDIssued = epd->EPDIssued;
+ EPDLocked = epd->EPDLocked;
+ EPDTesting = epd->EPDTesting;
+ EPDProcSec = epd->EPDProcSec;
+ EPDFaulty = epd->EPDFaulty;
+
+ EPDNewFault = epd->EPDNewFault;
+ EPDComFault = epd->EPDComFault;
+ EPDCalFault = epd->EPDCalFault;
+ EPDDetFault = epd->EPDDetFault;
+ EPDEprFault = epd->EPDEprFault;
+ EPDTrhFault = epd->EPDTrhFault;
+ EPDOthFault = epd->EPDOthFault;
+
+ AlarmDoseHP101G = epd->AlarmDoseHP101G;
+ AlarmDoseHP102G = epd->AlarmDoseHP102G;
+ AlarmDoseHP07N = epd->AlarmDoseHP07N;
+ AlarmRateHP101G = epd->AlarmRateHP101G;
+ AlarmRateHP102G = epd->AlarmRateHP102G;
+ AlarmRateHP07N = epd->AlarmRateHP07N;
+
+ OtherAlarmRateHp101G = epd->OtherAlarmRateHp101G;
+ OtherAlarmRateHp102G = epd->OtherAlarmRateHp102G;
+ OtherAlarmRateHp07N = epd->OtherAlarmRateHp07N;
+ OtherAlarmReturn = epd->OtherAlarmReturn;
+ OtherAlarmBatLow = epd->OtherAlarmBatLow;
+ OtherAlarmCarrier = epd->OtherAlarmCarrier;
+ OtherAlarmBatVolt = epd->OtherAlarmBatVolt;
+
+ return 1;
+ }
+
+ int Epd2::SetTime() {
+ epd->SetTime();
+ return epd->utc;
+ }
+
+ int Epd2::ReadAlarmConfig() {
+ epd->ReadAlarmConfig();
+ return epd->numAlarm;
+ }
+
+ int Epd2::ReadAlarmTresholds() {
+ epd->ReadAlarmTresholds();
+ return 0;
+ }
+
+
+ int Epd2::GetStatus()
+ {
+ GetStatusError = 0; StatusRV = 0; Issued = false;
+ WearerID = String::Empty;
+ WearerName = String::Empty;
+ StatusRV = epd->ReadStatus();
+ if (StatusRV != 0)
+ GetStatusError = epd->Error;
+
+ Issued = epd->EPDIssued;
+
+ WearerID = gcnew String((char*)epd->WearerID);
+ WearerName = gcnew String((char*)epd->WearerName);
+ isOn = (epd->DetectorsOn != 0);
+ epdType = (int)epd->EpdType;
+ isBG = (epd->EpdType == EpdTypes::Mk2BetaGamma || epd->EpdType == EpdTypes::Mk3BetaGamma);
+
+ alarmStatus = epd->AlarmStatus;
+ otherAlarms = epd->OtherAlarms;
+ errorStatus = epd->ErrorStatus;
+ operatingStatus = epd->OperatingStatus;
+
+ EpdID = epd->EpdID;
+ HardVersion = epd->HardVersion;
+ SoftVersion = epd->SoftVersion;
+ FunctionFlags = epd->FunctionFlags;
+ CountsClock = epd->EpdClock;
+ DecodeStatus();
+ return StatusRV;
+ }
+
+ int Epd2::GetDoses()
+ {
+ Hp10 = Hp07 = 0.0;
+ int ReadDosesRV = epd->ReadDoses();
+
+ if (ReadDosesRV == 1) {
+ GetDosesError = 0;
+ Hp10 = (double)epd->Hp10Dose;
+ Hp07 = (double)epd->Hp07Dose;
+ Hp07Peak = (double)epd->Hp07Peak;
+ Hp10Peak = (double)epd->Hp10Peak;
+
+ Hp07Total = epd->Hp07Total;
+ Hp10Total = epd->Hp10Total;
+ }
+ else {
+ GetDosesError = epd->Error;
+ }
+
+ if (epd->Hp10Time > 0) {
+ //seconds since 2000 ?
+ //double x = (epd->EpdClock - epd->Hp10Time) * -1.0;
+ Hp10PeakTime = Jan2000->AddSeconds(epd->Hp10Time);
+ }
+ else
+ Hp10PeakTime = System::Nullable();;
+ if (epd->Hp07Time > 0) {
+ //double x = (epd->EpdClock - epd->Hp07Time) * -1.0;
+ Hp07PeakTime = Jan2000->AddSeconds(epd->Hp07Time);
+ }
+ else
+ Hp07PeakTime = System::Nullable();
+
+ QualityData = epd->QualityData;
+ K1 = epd->K1;
+ K2 = epd->K2;
+ K3 = epd->K3;
+ K4 = epd->K4;
+ K5 = epd->K5;
+ K6 = epd->K6;
+ SG = epd->SG;
+ BC = epd->SG;
+ FB = epd->FB;
+ HG = epd->HG;
+
+ return ReadDosesRV;
+ }
+
+ int Epd2::SetDeIssued()
+ {
+ return epd->DeIssue();
+ }
+
+ int Epd2::PrepareForIssue()
+ {
+ PrepareForIssueError = 0;
+ int rv = epd->PrepareForIssue();
+ if (rv != 1) PrepareForIssueError = epd->Error;
+ return rv;
+ }
+
+ int Epd2::SetIssued()
+ {
+ SetIssuedError = 0;
+ epd->Hp07THDose = (float)Hp07THDose;
+ epd->Hp10THDose1 = (float)Hp10THDose1;
+ epd->Hp10THDose2 = (float)Hp10THDose2;
+
+ epd->Hp10Rate1On = (float)(Hp10Rate1On);
+ epd->Hp10Rate2On = (float)(Hp10Rate2On);
+ epd->Hp07RateOn = (float)(Hp07RateOn);
+
+ epd->Hp10Rate1Off = (float)(Hp10Rate1Off);
+ epd->Hp10Rate2Off = (float)(Hp10Rate2Off);
+ epd->Hp07RateOff = (float)(Hp07RateOff);
+
+ epd->K3 = K3;
+ epd->K4 = K4;
+
+ memset(epd->WearerID, ' ', WearerIDLength); epd->WearerID[WearerIDLength] = 0;
+ char* str1 = (char*)(void*)Runtime::InteropServices::Marshal::StringToHGlobalAnsi(WearerID);
+ int l = strlen(str1);
+ if (l > WearerIDLength) l = WearerIDLength;
+ _memccpy(epd->WearerID + WearerIDLength - l, str1, l, WearerIDLength - l);
+ Runtime::InteropServices::Marshal::FreeHGlobal((IntPtr)str1);
+
+ memset(epd->WearerName, 0, WearerNameLength + 1);
+ char* str2 = (char*)(void*)Runtime::InteropServices::Marshal::StringToHGlobalAnsi(WearerName);
+ l = strlen(str2);
+ if (l > WearerNameLength) l = WearerNameLength;
+ _memccpy(epd->WearerName, str2, l, WearerNameLength);
+ Runtime::InteropServices::Marshal::FreeHGlobal((IntPtr)str2);
+
+ int rv = epd->Issue();
+ if (rv != 0)
+ SetIssuedError = epd->Error;
+ return rv;
+ }
+
+ int Epd2::WriteCalibration()
+ {
+ epd->K1 = K1;
+ epd->K2 = K2;
+
+ epd->K3 = K3;
+ epd->K4 = K4;
+
+ epd->K5 = K5;
+ epd->K6 = K6;
+
+ //epd->K1 = 903;
+ //epd->K2 = 613;
+ //epd->K5 = 13100;
+ //epd->K6 = 1310;
+
+ int rv = epd->WriteCal();
+ return rv;
+
+ }
+
+ int Epd2::ReadTresholds()
+ {
+ ReadTresholdsError = 0;
+ int rv = epd->ReadAlarmTresholds();
+ if (rv != 0) ReadTresholdsError = epd->Error;
+
+ Hp10THDose1 = (double)epd->Hp10THDose1 / 64.0;
+ Hp10THDose2 = (double)epd->Hp10THDose2 / 64.0;
+ Hp07THDose = (double)epd->Hp07THDose / 64.0;
+
+ Hp10Total = (double)epd->Hp10Total / 64.0;
+ Hp07Total = (double)epd->Hp07Total / 64.0;
+
+ Hp10Rate1On = (double)epd->Hp10Rate1On;
+ Hp10Rate2On = (double)epd->Hp10Rate2On;
+ Hp07RateOn = (double)epd->Hp07RateOn;
+ Hp10Rate1Off = (double)epd->Hp10Rate1Off;
+ Hp10Rate2Off = (double)epd->Hp10Rate2Off;
+ Hp07RateOff = (double)epd->Hp07RateOff;
+
+ K1 = epd->K1;
+ K2 = epd->K2;
+ K3 = epd->K3;
+ K4 = epd->K4;
+ K5 = epd->K5;
+ K6 = epd->K6;
+ SG = epd->SG;
+ BC = epd->BC;
+ FB = epd->FB;
+ HG = epd->HG;
+ return rv;
+ }
+
+ int Epd2::ReadExtraStatus()
+ {
+ int rv = epd->EPDReadExtraStatus();
+ BatADC = epd->byBatADC;
+ SupplyADC = epd->bySupplyADC;
+
+ D1 = epd->D1;
+ D2 = epd->D2;
+ D3 = epd->D3;
+ D4 = epd->D4;
+ CountsClock = epd->CountsClock;
+ CountsClockBase = epd->BaseCountsClock;
+ return rv;
+ }
+
+ int Epd2::ConnectAndStatus()
+ {
+ int rv = Connect(false);
+ if (rv == 0)
+ {
+ EpdID= epd->Epd.Id;
+ isMK3 = (epd->EpdGen == EpdGeneration::Mk3);
+ rv = GetStatus();
+ }
+ return rv;
+ }
+
+ void Epd2::WaitEpd()
+ {
+ int rv = 0; //start
+ System::Threading::CancellationToken^ token = tokenSource->Token;
+
+ do {
+ rv = ConnectAndStatus();
+ } while (rv != 0 && --readRetries > 0 && !token->IsCancellationRequested);
+
+ //if (token->IsCancellationRequested) lastStatusRV = 7;
+ if (rv == 0) {
+ if (_EpdRead != nullptr)
+ _EpdRead(this, gcnew EpdEventArgs(EpdID,Issued,isBG,isMK3));
+ } else if (rv > 0 && _EpdError != nullptr) {
+ _EpdError(this, gcnew EpdErrorEventArgs(rv));
+ }
+ return ;
+ }
+
+ System::Threading::Tasks::Task^ Epd2::Wait(int timeout, int Retries)
+ {
+ if (waitTask == nullptr)
+ {
+ tokenSourceTimeout = timeout;
+ tokenSource = gcnew System::Threading::CancellationTokenSource(tokenSourceTimeout - 1000);
+ readRetries = Retries;
+ waitTask = System::Threading::Tasks::Task::Run(gcnew Action(this, &Epd2::WaitEpd)); // System::Threading::Tasks::Task::Factory->cre(gcnew Action(this, &CCard::WaitBadge), tokenSource->Token);
+ }
+ else {
+ readRetries = Retries + 1;
+ }
+ return waitTask;
+ }
+ void Epd2::WaitEnd()
+ {
+ if (waitTask != nullptr)
+ {
+ tokenSource->Cancel();
+ //cbCard->Cancel();
+ Sleep(500);
+ delete waitTask; waitTask = nullptr;
+ delete tokenSource; tokenSource = nullptr;
+ }
+ }
+
+ int Epd2::ReadDisplay()
+ {
+
+ int rv = epd->ReadDisplay();
+ String^ s = System::String::Format("numItems: {0}", epd->numItems);
+ System::Diagnostics::Debug::WriteLine(s);
+ for (int i = 0; i < epd->numItems; i++) {
+ s = System::String::Format("{{ {0},0x{1:X4},0x{2:X4} }}", epd->enables[i].MenuId, epd->enables[i].EnableMask, epd->enables[i].Enables);
+ System::Diagnostics::Debug::WriteLine(s);
+ }
+
+ s = System::String::Format("numDisplays: {0}", epd->numDisplays);
+ System::Diagnostics::Debug::WriteLine(s);
+ for (int i = 0; i < epd->numDisplays; i++) {
+ s = System::String::Format("{{ {0},0x{1:X4} }}", epd->displayIds[i].Position, epd->displayIds[i].DisplayId);
+ System::Diagnostics::Debug::WriteLine(s);
+ }
+
+ return rv;
+ }
+
+ int Epd2::SetSettings()
+ {
+ pin_ptr p = &this->ECIn[0];
+ for (int i = 0; i < 32; i++) epd->EC[i] = p[i];
+ int rv = epd->SetSettings();
+ return rv;
+ }
+
+ int Epd2::SetChirp(float Sensitivity)
+ {
+ int rv = epd->SetChirp(Sensitivity);
+ return rv;
+ }
}
\ No newline at end of file
diff --git a/MK3/MK3.h b/MK3/MK3.h
index ca274b5..dc6d4f1 100644
--- a/MK3/MK3.h
+++ b/MK3/MK3.h
@@ -1,256 +1,264 @@
-#pragma once
-#include "MK3Base.h"
-#pragma comment(lib,"Reader3.lib")
-#pragma managed
-
-using namespace System;
-using namespace System::Collections::Generic;
-using namespace System::Runtime::InteropServices;
-#include
-#include
-
-namespace MK3 {
- const char* cEpdError = "Setreader Error";
- ref class Epd2;
-
- public ref class EpdEventArgs : EventArgs
- {
-
- public:
- int deviceID;
- bool isIssued, isBG, isMK3;
-
- EpdEventArgs(int epdID,bool epdIssued, bool isBG, bool isMK3) : EventArgs()
- {
-
- this->deviceID = epdID;
- this->isIssued = epdIssued;
- this->isBG = isBG;
- this->isMK3 = isMK3;
- }
-
- };
- public ref struct EpdException : System::Exception
- {
- public:
- int errorCode;
- EpdException(int r) : System::Exception(gcnew String(cEpdError))
- {
- this->errorCode = r;
- }
- };
- public ref class EpdErrorEventArgs : EventArgs
- {
- public:
- int returnValue;
-
- EpdErrorEventArgs(int ReturnValue) : EventArgs()
- {
- this->returnValue = ReturnValue;
- }
-
- };
-
-
- public ref class Epd2
- {
- private:
- DateTime^ Jan2000;
-
- public:
- delegate void dEpdRead(Epd2^ Sender, EpdEventArgs^ e);
- delegate void dEpdTO(Epd2^ Sender, EventArgs^ e);
- delegate void dEpdError(Epd2^ Sender, EpdErrorEventArgs^ e);
-
- dEpdRead^ _EpdRead;
- dEpdTO^ _EpdTO;
- dEpdError^ _EpdError;
-
- event dEpdRead^ EpdRead
- {
- void add(dEpdRead^ handler)
- {
- _EpdRead += handler;
- }
-
- void remove(dEpdRead^ handler)
- {
- _EpdRead -= handler;
- }
- }
- event dEpdError^ EpdError
- {
- void add(dEpdError^ handler)
- {
- _EpdError += handler;
- }
-
- void remove(dEpdError^ handler)
- {
- _EpdError -= handler;
- }
- }
- event dEpdTO^ EpdTO
- {
- void add(dEpdTO^ handler)
- {
- _EpdTO += handler;
- }
-
- void remove(dEpdTO^ handler)
- {
- _EpdTO -= handler;
- }
- }
-
- Epd2U* epd;
- //int CurrentDeviceID; ==> is EpdID
- DateTime^ RealTime;
-
- String^ WearerName;
- String^ WearerID;
- bool Issued;
- bool isOn;
- bool isBG;
- bool isMK3;
-
- int InitRV;
- int DiscRV;
- int StatusRV;
- int GetStatusError;
- int GetDosesError;
- int ReadTresholdsError;
- int PrepareForIssueError;
- int SetIssuedError;
- int ConnectError;
- int ReadDosesRV;
- int DeviceCount = 0;
-
- double Hp07;
- double Hp10;
- double Hp07Peak;
- double Hp10Peak;
- System::Nullable Hp10PeakTime;
- System::Nullable Hp07PeakTime;
- double Hp07Total;
- double Hp10Total;
-
- double alarmHP07;
- double alarmHP10;
-
-
- double Hp10THDose1;
- double Hp10THDose2;
- double Hp07THDose;
-
- double Hp10Rate1On;
- double Hp10Rate2On;
- double Hp07RateOn;
- double Hp10Rate1Off;
- double Hp10Rate2Off;
- double Hp07RateOff;
-
- float K1;
- float K2;
- float K3;
- float K4;
- float K5;
- float K6;
-
- int SG;
- int BC;
- int FB;
- int HG;
- int QualityData;
-
- unsigned int D1, D2, D3, D4, CountsClock, CountsClockBase;
-
- int epdType;
- AlarmStatusFlags alarmStatus;
- int otherAlarms;
- FaultStatusFlags errorStatus;
- OpStatusFlags operatingStatus;
- unsigned int EpdID;
- int HardVersion;
- int SoftVersion;
- int FunctionFlags;
-
- unsigned short BatADC;
- unsigned short SupplyADC;
-
- //OperatingStatus
- BYTE DetectorsOn = 0;
- BYTE EPDIssued = 0;
- BYTE EPDLocked = 0;
- BYTE EPDTesting = 0;
- BYTE EPDProcSec = 0;
- BYTE EPDFaulty = 0;
-
- //ERrrostatus
- BYTE EPDNewFault = 0;
- BYTE EPDComFault = 0;
- BYTE EPDCalFault = 0;
- BYTE EPDDetFault = 0;
- BYTE EPDEprFault = 0;
- BYTE EPDTrhFault = 0;
- BYTE EPDOthFault = 0;
-
- //AlarmStatus
- BYTE AlarmDoseHP101G = 0;
- BYTE AlarmDoseHP102G = 0;
- BYTE AlarmDoseHP07N = 0;
- BYTE AlarmRateHP101G = 0;
- BYTE AlarmRateHP102G = 0;
- BYTE AlarmRateHP07N = 0;
-
- //OtherAlarm
- BYTE OtherAlarmRateHp101G = 0;
- BYTE OtherAlarmRateHp102G = 0;
- BYTE OtherAlarmRateHp07N = 0;
- BYTE OtherAlarmReturn = 0;
- BYTE OtherAlarmBatLow = 0;
- BYTE OtherAlarmCarrier = 0;
- BYTE OtherAlarmBatVolt = 0;
-
- Epd2(int port);
- ~Epd2();
- !Epd2();
-
- int Connect(bool reinit);
-
- int Close();
-
- int DecodeStatus();
-
- int SetTime();
-
- int ReadAlarmConfig();
-
- int ReadAlarmTresholds();
-
- int GetStatus();
-
- int GetDoses();
- int SetDeIssued();
- int SetIssued();
- int PrepareForIssue();
- int WriteCalibration();
- int ReadTresholds();
- int ReadExtraStatus();
-
- int ConnectAndStatus();
-
- void WaitEpd();
-
- System::Threading::CancellationTokenSource^ tokenSource;
- int tokenSourceTimeout;
- int readRetries;
- System::Threading::Tasks::Task^ waitTask;
- System::Threading::Tasks::Task^ Wait(int timeout, int Retries);
-
- void WaitEnd();
-
-
-
- };
-}
+#pragma once
+#include "MK3Base.h"
+#pragma comment(lib,"Reader3.lib")
+#pragma managed
+
+using namespace System;
+using namespace System::Collections::Generic;
+using namespace System::Runtime::InteropServices;
+#include
+#include
+
+namespace MK3 {
+ const char* cEpdError = "Setreader Error";
+ ref class Epd2;
+
+ public ref class EpdEventArgs : EventArgs
+ {
+
+ public:
+ int deviceID;
+ bool isIssued, isBG, isMK3;
+
+ EpdEventArgs(int epdID,bool epdIssued, bool isBG, bool isMK3) : EventArgs()
+ {
+
+ this->deviceID = epdID;
+ this->isIssued = epdIssued;
+ this->isBG = isBG;
+ this->isMK3 = isMK3;
+ }
+
+ };
+ public ref struct EpdException : System::Exception
+ {
+ public:
+ int errorCode;
+ EpdException(int r) : System::Exception(gcnew String(cEpdError))
+ {
+ this->errorCode = r;
+ }
+ };
+ public ref class EpdErrorEventArgs : EventArgs
+ {
+ public:
+ int returnValue;
+
+ EpdErrorEventArgs(int ReturnValue) : EventArgs()
+ {
+ this->returnValue = ReturnValue;
+ }
+
+ };
+
+
+ public ref class Epd2
+ {
+ private:
+ DateTime^ Jan2000;
+
+ public:
+ delegate void dEpdRead(Epd2^ Sender, EpdEventArgs^ e);
+ delegate void dEpdTO(Epd2^ Sender, EventArgs^ e);
+ delegate void dEpdError(Epd2^ Sender, EpdErrorEventArgs^ e);
+
+ dEpdRead^ _EpdRead;
+ dEpdTO^ _EpdTO;
+ dEpdError^ _EpdError;
+
+ event dEpdRead^ EpdRead
+ {
+ void add(dEpdRead^ handler)
+ {
+ _EpdRead += handler;
+ }
+
+ void remove(dEpdRead^ handler)
+ {
+ _EpdRead -= handler;
+ }
+ }
+ event dEpdError^ EpdError
+ {
+ void add(dEpdError^ handler)
+ {
+ _EpdError += handler;
+ }
+
+ void remove(dEpdError^ handler)
+ {
+ _EpdError -= handler;
+ }
+ }
+ event dEpdTO^ EpdTO
+ {
+ void add(dEpdTO^ handler)
+ {
+ _EpdTO += handler;
+ }
+
+ void remove(dEpdTO^ handler)
+ {
+ _EpdTO -= handler;
+ }
+ }
+
+ Epd2U* epd;
+ //int CurrentDeviceID; ==> is EpdID
+ DateTime^ RealTime;
+
+ String^ WearerName;
+ String^ WearerID;
+ bool Issued;
+ bool isOn;
+ bool isBG;
+ bool isMK3;
+
+ int InitRV;
+ int DiscRV;
+ int StatusRV;
+ int GetStatusError;
+ int GetDosesError;
+ int ReadTresholdsError;
+ int PrepareForIssueError;
+ int SetIssuedError;
+ int ConnectError;
+ int ReadDosesRV;
+ int DeviceCount = 0;
+
+ double Hp07;
+ double Hp10;
+ double Hp07Peak;
+ double Hp10Peak;
+ System::Nullable Hp10PeakTime;
+ System::Nullable Hp07PeakTime;
+ double Hp07Total;
+ double Hp10Total;
+
+ double alarmHP07;
+ double alarmHP10;
+
+
+ double Hp10THDose1;
+ double Hp10THDose2;
+ double Hp07THDose;
+
+ double Hp10Rate1On;
+ double Hp10Rate2On;
+ double Hp07RateOn;
+ double Hp10Rate1Off;
+ double Hp10Rate2Off;
+ double Hp07RateOff;
+
+ float K1;
+ float K2;
+ float K3;
+ float K4;
+ float K5;
+ float K6;
+
+ int SG;
+ int BC;
+ int FB;
+ int HG;
+ int QualityData;
+
+ unsigned int D1, D2, D3, D4, CountsClock, CountsClockBase;
+
+ int epdType;
+ AlarmStatusFlags alarmStatus;
+ int otherAlarms;
+ FaultStatusFlags errorStatus;
+ OpStatusFlags operatingStatus;
+ unsigned int EpdID;
+ int HardVersion;
+ int SoftVersion;
+ int FunctionFlags;
+
+ unsigned short BatADC;
+ unsigned short SupplyADC;
+
+ //OperatingStatus
+ BYTE DetectorsOn = 0;
+ BYTE EPDIssued = 0;
+ BYTE EPDLocked = 0;
+ BYTE EPDTesting = 0;
+ BYTE EPDProcSec = 0;
+ BYTE EPDFaulty = 0;
+
+ //ERrrostatus
+ BYTE EPDNewFault = 0;
+ BYTE EPDComFault = 0;
+ BYTE EPDCalFault = 0;
+ BYTE EPDDetFault = 0;
+ BYTE EPDEprFault = 0;
+ BYTE EPDTrhFault = 0;
+ BYTE EPDOthFault = 0;
+
+ //AlarmStatus
+ BYTE AlarmDoseHP101G = 0;
+ BYTE AlarmDoseHP102G = 0;
+ BYTE AlarmDoseHP07N = 0;
+ BYTE AlarmRateHP101G = 0;
+ BYTE AlarmRateHP102G = 0;
+ BYTE AlarmRateHP07N = 0;
+
+ //OtherAlarm
+ BYTE OtherAlarmRateHp101G = 0;
+ BYTE OtherAlarmRateHp102G = 0;
+ BYTE OtherAlarmRateHp07N = 0;
+ BYTE OtherAlarmReturn = 0;
+ BYTE OtherAlarmBatLow = 0;
+ BYTE OtherAlarmCarrier = 0;
+ BYTE OtherAlarmBatVolt = 0;
+
+ Epd2(int port);
+ ~Epd2();
+ !Epd2();
+
+ int Connect(bool reinit);
+
+ int Close();
+
+ int DecodeStatus();
+
+ int SetTime();
+
+ int ReadAlarmConfig();
+
+ int ReadAlarmTresholds();
+
+ int GetStatus();
+
+ int GetDoses();
+ int SetDeIssued();
+ int SetIssued();
+ int PrepareForIssue();
+ int WriteCalibration();
+ int ReadTresholds();
+ int ReadExtraStatus();
+
+ int ConnectAndStatus();
+
+ void WaitEpd();
+
+ System::Threading::CancellationTokenSource^ tokenSource;
+ int tokenSourceTimeout;
+ int readRetries;
+ System::Threading::Tasks::Task^ waitTask;
+ System::Threading::Tasks::Task^ Wait(int timeout, int Retries);
+
+ void WaitEnd();
+
+ int ReadDisplay();
+
+ int SetSettings();
+
+ int SetChirp(float Sensitivity);
+
+ array^ ECIn;
+
+
+
+ };
+}
diff --git a/MK3/MK3Base.cpp b/MK3/MK3Base.cpp
index 0d1b076..0841838 100644
--- a/MK3/MK3Base.cpp
+++ b/MK3/MK3Base.cpp
@@ -1,1077 +1,1218 @@
-#include "pch.h"
-#include "MK3Base.h"
-#pragma unmanaged
-
-HANDLE Ev1 = INVALID_HANDLE_VALUE;
-MK3::Epd2U* current;
-
-void WINAPI completion(CommsHandle hComms, CompletionToken token)
-{
- SetEvent(Ev1);
-}
-MK3::Epd2U::Epd2U(int _comport)
-{
- port = _comport;
- comPort[3] = 48 + _comport;
- CommsInitialized = 0;
- epdComsHandle = INVALID_HANDLE_VALUE;
- //SetAutoCommit(0); alleen epd2
- Error = 123;
- if (Ev1 != nullptr) Ev1 = CreateEvent(NULL, TRUE, FALSE, NULL);
- if (_comport == 0) return;
-}
-
-WORD MK3::Epd2U::WriteConfig()
-{
- if (port == 0) return 1;
- return 0; // WriteDisplayConfig(00, 2, 40, 10, 2, displayConfig, 56);
-}
-
-DWORD MK3::Epd2U::StartCom()
-{
- ErrorReason = 0;
- int mx = 10;
- epdComsHandle = INVALID_HANDLE_VALUE;
- if (port == 0) {
- CommsInitialized = 1;
- return 1;
- }
- if (CommsInitialized == 0) {
- epdComsHandle = CreateReaderInterface();
- InitRv = OpenReader(epdComsHandle, comPort);
- if (InitRv == 0)
- {
- SetMultipleDiscoveryMode(epdComsHandle, false);
- CommsInitialized = 1;
- }
- }
- return InitRv;
-}
-
-void MK3::Epd2U::EndCom()
-{
- if (CommsInitialized == 1) {
- if (epdComsHandle != INVALID_HANDLE_VALUE) {
- CloseReader(epdComsHandle);
- DestroyReaderInterface(epdComsHandle);
- }
- }
- CommsInitialized = 0;
- epdComsHandle = INVALID_HANDLE_VALUE;
-}
-
-MK3::Epd2U::~Epd2U()
-{
- EndCom();
- if (Ev1 != nullptr) {
- CloseHandle(Ev1); Ev1 = nullptr;
- }
-
-}
-
-void WINAPI discovery(CommsHandle hComms, DiscoveryId const discovered[], int32_t count)
-{
- if (count > 0)
- {
- current->CurrentDeviceID = discovered[0].Id;
- current->DeviceCount = count;
- memcpy(¤t->Epd, &discovered[0], sizeof(DiscoveryId));
- SetEvent(Ev1);
- }
-}
-
-///
-///
-///
-/// 0 = success
-int MK3::Epd2U::StartDiscover()
-{
- int32_t rv;
-
- //System::Diagnostics::Trace::WriteLine("StartDiscover");
- Error = 0;
- if (port == 0) {
- DeviceCount = 1;
- DeviceIDs[0] = 768;
- return 1;
- }
- //
- //Cancel(epdComsHandle);
- //FlushDiscoveryCache(port);
- //FlushBuffers(port);
- int tries = 25; DeviceCount = 0; DiscRV = 1;
- ResetEvent(Ev1);
- while (tries-- > 0 && DeviceCount == 0)
- {
- //memset(DevceIDs, 0, sizeof(DeviceIDs));
- current = this;
- rv = StartDiscovery(epdComsHandle, discovery);
- if (rv==0) rv = WaitForSingleObject(Ev1, 10000);
- }
- if (rv == 0) rv=Connect(epdComsHandle, Epd, true);
- //System::Diagnostics::Trace::WriteLine(System::String::Format("Discover DeviceCount = {0}", DeviceCount));
-
- return rv;
-}
-
-void MK3::Epd2U::Open(DiscoveryId DeviceID)
-{
- CurrentDeviceID = DeviceID.Id;
- if (port > 0) {
- ConRV = Connect(epdComsHandle, DeviceID,true);
- //if (ConRV == 0) Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- //else {
- Open(DeviceID); // OpenDevice(port, CurrentDeviceID);
- //if (OpenRV == 0) Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- }
- //}
- else { OpenRV = ConRV = 1; }
-}
-void MK3::Epd2U::CloseDev()
-{
- if (port > 0) {
- //Close();// CloseDevice();
- Disconnect(epdComsHandle);
- }
- //DeinitComms(port); CommsInitialized = 0;
-}
-
-//void MK3::Epd2U::DecodeFunctionFlags()
-//{
-// EpdType = (FunctionFlags & 0x1F00) >> 8;
-//}
-
-
-byte checkOpStatus(OpStatusFlags status, OpStatusFlags flag)
-{
- if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
-}
-byte checkFailStatus(FaultStatusFlags status, FaultStatusFlags flag)
-{
- if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
-}
-
-byte checkStatus(AlarmStatusFlags status, AlarmStatusFlags flag)
-{
- uint32_t ustatus = (uint32_t)status;
- uint32_t uflag = (uint32_t)flag;
- if ((ustatus & uflag) == uflag) return 1; else return 0;
-}
-
-byte checkStatus( DoseAlarmFlags status, DoseAlarmFlags flag)
-{
- if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
-}
-
-void MK3::Epd2U::DecodeStatus()
-{
- DetectorsOn = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::EpdOn);
- EPDIssued = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::EpdIssued);
- EPDLocked = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::GainAdjustable);
- EPDTesting = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::DetectorTestRequested);
- EPDFaulty = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EpdFaulty);
-
- EPDNewFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EpdFaulty);
- EPDComFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EarlyCommsTermination);
- EPDCalFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::NotCalibrated);
- EPDDetFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::DetectorTestFail);
- EPDEprFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EepromFailure);
- EPDTrhFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::BadThreshold);
-
- for (int ix = 0; ix < 4; ix++)
- {
- DoseAlarmFlags status = epd3status.DoseAlarms[ix].Status;
- switch ((MeasurementId)epd3status.DoseAlarms[ix].Id)
- {
- case MeasurementId::Meas_Hp07:
- case MeasurementId::Meas_Hp10N:
- AlarmDoseHP07N = checkStatus(status ,DoseAlarmFlags::DoseAlarm);
- AlarmRateHP07N = checkStatus(status, DoseAlarmFlags::RateAlarm) ;
- break;
- case MeasurementId::Meas_Hp10:
- case MeasurementId::Meas_Hp10G:
- AlarmDoseHP101G = checkStatus(status, DoseAlarmFlags::DoseAlarm);
- AlarmDoseHP102G = AlarmDoseHP101G;
- AlarmRateHP101G = checkStatus(status, DoseAlarmFlags::RateAlarm);
- AlarmRateHP102G = AlarmRateHP101G;
- break;
- }
- }
- OtherAlarmReturn = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::ReturnForRead);
- OtherAlarmBatLow = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::LowBattery);
- OtherAlarmCarrier = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::TelemetryAlert);
- OtherAlarmBatVolt = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::LowBattery);
-}
-
-void MK3::Epd2U::SetTime() //Only R3
-{
- if (Epd.Gen == EpdGeneration::Mk3) {
- utc = TimeFunctions::NowToEpdTime(Epd.Gen == EpdGeneration::Mk2);
- ResetEvent(Ev1);
- token = BeginWriteRTC_R3(epdComsHandle, utc, completion);
- uint32_t r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndWriteRTC_R3(epdComsHandle, token);
- }
-}
-
-WORD MK3::Epd2U::ReadStatus()
-{
-
- int32_t r; //0=ok
- Error = 0;
- if (port == 0) {
- EpdID = 4567;
- EpdType = EpdTypes::Mk2BetaGamma;
- isBG = 1;
- FunctionFlags = 0x000;
- Epd.Gen = EpdGeneration::None;
- Epd.MaxBaud = 0;
- Epd.Id = EpdID;
- return 0;
- }
-
- OperatingStatus = (OpStatusFlags)0U;
- AlarmStatus = (AlarmStatusFlags)0U;
- ErrorStatus = (FaultStatusFlags)0;
- IssueCount = OtherAlarms = EEPROMBadSectors = 0;
- RealTime = EpdClock = OffTime = EpdID = 0;
- ErrorSource = ErrorReason = ErrorData = 0;
- HardVersion = SoftVersion = FunctionFlags = 0;
-
- SetResponseTimeout(epdComsHandle, 2000);
- //ResetEvent(Ev1);
- token = BeginReadStatus(epdComsHandle, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadStatus(epdComsHandle, token, &epd3status);
-
- if (r != 0) {
- Error = GetErrorCode(); return r;
- }
-
- IssueCount = epd3status.IssueCount;
- OperatingStatus = epd3status.OperatingStatus;
- AlarmStatus = epd3status.AlarmStatus;
- ErrorStatus = epd3status.FaultStatus;
- OtherAlarms = epd3status.OtherBits;
- ReadStatusRV = 0;
-
- uint32_t EpdID32;
- uint32_t capabilities;
- MarkNumber_t MarkNumber;
- VersionNumber_t VersionNumber;
-
- //ResetEvent(Ev1);
- token = BeginReadEpdIdentities(epdComsHandle, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadEpdIdentities(epdComsHandle, token, &EpdID32, (EpdTypes*)&EpdType, &capabilities, &MarkNumber, &VersionNumber, NULL, 0);
-
- if (r != 0) {
- Error = GetErrorCode(); return r;
- }
-
-
- EpdID = EpdID32;
- isBG = (EpdType == EpdTypes::Mk2BetaGamma || EpdType == EpdTypes::Mk3BetaGamma);
-
- DecodeStatus();
- memset(WearerID, 0, WearerIDLength + 1);
- memset(WearerName, 0, WearerNameLength + 1);
-
- uint8_t length = 0;
- countsRead = 0; utc = 0; seconds = 0;
- //ResetEvent(Ev1);
- token = BeginReadCounts(epdComsHandle, nullptr, 0, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadCounts(epdComsHandle,token,Counts,MaxCounts, &countsRead,&utc,&seconds);
- // - 101 = InvalidParam
- // - 104 = FunctionFail,
- if (r != 0 && r!=-104) {
- Error = GetErrorCode(); return r;
- }
- decodeCounters(countsRead); //HG,SG ..
-
- IdString_t mk3WearerID;
- //Mk2 EPDs only support Name and Primary ID
- //ResetEvent(Ev1);
- token = BeginReadWearerId(epdComsHandle, static_cast(WearerIdType::WearerId_Name), nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadWearerId(epdComsHandle, token, &mk3WearerID);
- if (r != 0) {
- Error = GetErrorCode(); return r;
- }
-
- if (mk3WearerID.Length > WearerNameLength) mk3WearerID.Length = WearerNameLength;
- memcpy(WearerName, mk3WearerID.Utf8String, mk3WearerID.Length); WearerName[mk3WearerID.Length] = 0;
-
- //ResetEvent(Ev1);
- token = BeginReadWearerId(epdComsHandle, static_cast(WearerIdType::WearerId_Primary), nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadWearerId(epdComsHandle, token, &mk3WearerID);
- if (r != 0) {
- Error = GetErrorCode(); return r;
- }
-
- if (mk3WearerID.Length > WearerIDLength) mk3WearerID.Length = WearerIDLength;
- memcpy(this->WearerID, mk3WearerID.Utf8String, mk3WearerID.Length); WearerName[mk3WearerID.Length] = 0;
- for (int i = 0; i < mk3WearerID.Length; i++)
- if (WearerID[i] == 0xb) WearerID[i] = '0'; else WearerID[i] |= 0x30;
-
- //1601-01-01T00:00:00Z.
-
- //MK2 .. some utc... but no real time clock
- if (utc == 0) {
- //ResetEvent(Ev1);
- token = BeginReadRTC(epdComsHandle, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadRTC(epdComsHandle, token, &utc); //EpdClock for MK2
- EpdClock = utc;
- utc = TimeFunctions::NowToEpdTime(true);
- }
- else {
- EpdClock = utc;
- }
-
- FILETIME fUTC;
- TimeFunctions::EpdTimeToFileTime(utc, &fUTC, Epd.Gen== EpdGeneration::Mk2);
- FileTimeToSystemTime(&fUTC, &tRealTime);
-
-
-
- //CommitRV = ReadEpdStatus(&EpdClock, &RealTime, &IssueCount, &OffTime, &OperatingStatus, &ErrorStatus, &AlarmStatus, &OtherAlarms, &EEPROMBadSectors);
- //if (port == 0) {
- // EpdClock = 123; ErrorStatus = 0;
- //};
- //if (CommitRV == 1) CommitRV = Commit();
- //if (CommitRV == 1) CommitRV = ReadEpdID(
- // &EpdID,
- // &HardVersion,
- // &SoftVersion,
- // &FunctionFlags);
- //if (CommitRV == 1) CommitRV = Commit();
- //if (CommitRV == 0) {
- // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- // ReadStatusRV = ErrorReason;
- // return 0;
- //}
- //else {
- // if (CurrentDeviceID == 0) CurrentDeviceID = EpdID;
- // time_t t = RealTime;
- // TimeFunctions::UnixTimeToSystemTime(t, &tRealTime);
- // DecodeStatus();
- // DecodeFunctionFlags();
- //}
-
- //if (CommitRV == 1 && EPDIssued == 1)
- //{
- // CommitRV = ReadWearer(
- // WearerID,
- // WearerIDLength,
- // WearerName,
- // WearerNameLength);
- // if (CommitRV == 1) CommitRV = Commit();
- // if (CommitRV == 0) {
- // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- // ReadStatusRV = ErrorReason;
- // return 0;
- // }
- // else {
- // }
- //}
-
-
- //werkt niet voor MK2
- //ResetEvent(Ev1);
- //token = BeginReadMeasurandIds_R3(epdComsHandle, completion);
- //r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- //r = EndReadMeasurandIds_R3(epdComsHandle, token, mIDs, MAX_MEASUREMENTS, &nmIDs);
-
-
- return r;
-}
-
-void MK3::Epd2U::decodeSensitivities(int count) {
-
- K1 = K2 = K3 = K4 = K4 = K6 = 0.0F;
- for (int ix = count - 1; ix >= 0; ix--) {
- switch ((SensitivityId)sensitivities[ix].id)
- {
- case SensitivityId::Hg1Sens10G: K1 = sensitivities[ix].value; break;
- case SensitivityId::Sg1Sens10G: K2 = sensitivities[ix].value; break;
- case SensitivityId::Hg1Sens07G: K3 = sensitivities[ix].value; break; //Neutr=FN
- case SensitivityId::Sg1Sens07G: K4 = sensitivities[ix].value; break; //Neutr=AN
- case SensitivityId::Fb1Sens07B: K5 = sensitivities[ix].value; break;
- case SensitivityId::Sg2Sens07B: K6 = sensitivities[ix].value; break;
- default: break;
- }
- }
-}
-void MK3::Epd2U::decodetotDoses(int count)
-{
- //doses
- Hp10Total = Hp07Total = 0;
- for (int ix = 0; ix < count; ix++)
- {
- switch ((MeasurementId)doses[ix].id) {
- case MeasurementId::Meas_Hp07: Hp07Total = doses[ix].value; break;
- case MeasurementId::Meas_Hp10: Hp10Total = doses[ix].value; break;
- case MeasurementId::Meas_Hp10N: Hp07Total = doses[ix].value; break;
- case MeasurementId::Meas_Hp10G: Hp10Total = doses[ix].value; break;
- }
- }
-}
-void MK3::Epd2U::decodeDoses(int count)
-{
- //doses
- Hp10Dose = Hp07Dose = 0;
- for (int ix = 0; ix < count; ix++)
- {
- switch ((MeasurementId)doses[ix].id) {
- case MeasurementId::Meas_Hp07: Hp07Dose = doses[ix].value; break;
- case MeasurementId::Meas_Hp10: Hp10Dose = doses[ix].value; break;
- case MeasurementId::Meas_Hp10N: Hp07Dose = doses[ix].value; break;
- case MeasurementId::Meas_Hp10G: Hp10Dose= doses[ix].value; break;
- }
- }
-}
-void MK3::Epd2U::decodePeakRates(int count)
-{
- //Rates
- Hp10Peak = Hp07Peak = 0;
- Hp10Time = Hp07Time = 0;
- for (int ix = 0; ix < count; ix++)
- {
- switch ((MeasurementId)peakRates[ix].id) {
- case MeasurementId::Meas_Hp07:
- case MeasurementId::Meas_Hp10N:
- Hp07Peak= peakRates[ix].value;
- Hp07Time = peakRates[ix].timestamp;
- break;
- case MeasurementId::Meas_Hp10:
- case MeasurementId::Meas_Hp10G:
- Hp10Peak = peakRates[ix].value;
- Hp10Time = peakRates[ix].timestamp;
- break;
- }
- }
-}
-void MK3::Epd2U::decodeCounters(int count)
-{
- HG = SG = BC = FB = 0;
- for (int ix = 0; ix < count; ix++)
- {
- switch ((CounterType)Counts[ix].type) {
- case CounterType::Counter_Hg1: HG = Counts[ix].value; break;
- case CounterType::Counter_Sg1: SG = Counts[ix].value; break;
- case CounterType::Counter_Sg2: BC = Counts[ix].value; break;
- case CounterType::Counter_Fb1: FB = Counts[ix].value; break;
- }
- }
-}
-void MK3::Epd2U::decodeBaseCounters(int count)
-{
- for (int ix = 0; ix < count; ix++)
- {
- switch ((CounterType)Counts[ix].type) {
- case CounterType::Counter_Hg1: D1 = Counts[ix].value; break;
- case CounterType::Counter_Sg1: D2 = Counts[ix].value; break;
- case CounterType::Counter_Sg2: D3 = Counts[ix].value; break;
- case CounterType::Counter_Fb1: D4 = Counts[ix].value; break;
- }
- }
-
-}
-void MK3::Epd2U::decodeTreshold(Mk3AlarmThresholds_t* th)
-{
- float* pThDose = nullptr, * pThRate = nullptr, * pTHDoseWarning = nullptr, * pTHRateWarning = nullptr;
- switch ((MeasurementId)th->MeasId)
- {
- case MeasurementId::Meas_Hp07:
- case MeasurementId::Meas_Hp10N:
- Hp07THDose = 0; Hp07RateOn = 0; Hp07RateOff = 0;
- pThDose = &Hp07THDose;
- pThRate = &Hp07RateOn;
- pTHDoseWarning = pTHRateWarning = nullptr;
- break;
- case MeasurementId::Meas_Hp10:
- Hp10THDose1 = 0; Hp10THDose2 = 0;
- Hp10Rate1On = Hp10Rate2On = Hp10Rate1Off = Hp10Rate2Off = 0;
- pThDose = &Hp10THDose2;
- pThRate = &Hp10Rate2On;
- pTHDoseWarning = &Hp10THDose1;
- pTHRateWarning = &Hp10Rate1Off;
- break;
- }
-
- for (int ix = 0; ix < th->NumberThresholds; ix++)
- {
- switch ((ThresholdId)th->Thresholds[ix].Id) {
- case ThresholdId::Thres_DoseAlarm: if (pThDose != nullptr) *pThDose = th->Thresholds[ix].Value; break;
- case ThresholdId::Thres_DoseWarning: if (pTHDoseWarning != nullptr) *pTHDoseWarning = th->Thresholds[ix].Value; break;
- case ThresholdId::Thres_RateAlarm: if (pThRate != nullptr) *pThRate = th->Thresholds[ix].Value; break;
- case ThresholdId::Thres_RateWarning: if (pTHRateWarning != nullptr) *pTHRateWarning = th->Thresholds[ix].Value; break;
- }
- }
-}
-void MK3::Epd2U::encodeTreshold(Mk3AlarmThresholds_t* th)
-{
- //th.MeasId
- float* pThDose , *pThRate , *pTHDoseWarning,* pTHRateWarning;
-
- th->NumberThresholds = 4;
- switch ((MeasurementId)th->MeasId) {
- case MeasurementId::Meas_Hp07:
- case MeasurementId::Meas_Hp10N:
- pThDose = &Hp07THDose;
- pTHDoseWarning = &Hp07THDose;
- pThRate = &Hp07RateOn;
- pTHRateWarning = &Hp07RateOff;
- RatePct[0].MeasId = th->MeasId;
- RatePct[0].Value = 85; // (int)(Hp07RateOff * 100.0 / Hp07RateOn);
- break;
- case MeasurementId::Meas_Hp10:
- case MeasurementId::Meas_Hp10G:
- pThDose = &Hp10THDose2;
- pThRate = &Hp10Rate2On;
- pTHDoseWarning = &Hp10THDose1;
- pTHRateWarning = &Hp10Rate1On;
- RatePct[1].MeasId = th->MeasId;
- RatePct[1].Value = 85; // (int)(Hp10Rate2Off * 100.0 / Hp10Rate2On);
- break;
- default:
- pThDose = &Hp07THDose;
- pTHDoseWarning = &Hp07THDose;
- pThRate = &Hp07RateOn;
- pTHRateWarning = &Hp07RateOff;
- }
-
- th->Thresholds[0].Id = (uint16_t)ThresholdId::Thres_DoseAlarm;
- th->Thresholds[0].Value = *pThDose;
- th->Thresholds[1].Id = (uint16_t)ThresholdId::Thres_RateAlarm;
- th->Thresholds[1].Value = *pThRate;
- th->Thresholds[2].Id = (uint16_t)ThresholdId::Thres_DoseWarning;
- th->Thresholds[2].Value = *pTHDoseWarning;
- th->Thresholds[3].Id = (uint16_t)ThresholdId::Thres_RateWarning;
- th->Thresholds[3].Value = *pTHRateWarning;
-}
-void MK3::Epd2U::decodedTresholds(int numdTresholds)
-{
- for (int ix = 0; ix < numdTresholds; ix++) {
- switch ((CounterType)dTresholds[ix].type) {
- case CounterType::Counter_Hg1: HG = dTresholds[ix].value; break;
- case CounterType::Counter_Sg1: SG = dTresholds[ix].value; break;
- case CounterType::Counter_Sg2: BC = dTresholds[ix].value; break;
- case CounterType::Counter_Fb1: FB = dTresholds[ix].value; break;
- case CounterType::Counter_An1: BC = dTresholds[ix].value; break; //AN-> BC
- case CounterType::Counter_Fn2: FB = dTresholds[ix].value; break; //FN->FB
-
-
- }
- }
-}
-WORD MK3::Epd2U::ReadSensitivitiesAndTresholds()
-{
- int32_t r = 0;
- if (Epd.Gen == EpdGeneration::Mk2) {
- uint16_t HGSens10;
- uint16_t SGSens10;
- uint16_t HGSens07;
- uint16_t SGSens07;
- uint16_t FBSens07;
- uint16_t BCSens07;
- uint16_t SGthresh;
- uint16_t BCthresh;
- uint16_t FBthresh;
- uint16_t HGthresh;
-
- //ResetEvent(Ev1);
- //token = BeginReadDoses(epdComsHandle, new uint8_t[]{ 0, 1 }, 2 , completion);
- token = BeginReadCalibrationData_R2(epdComsHandle, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r=EndReadCalibrationData_R2(epdComsHandle, token,
- &HGSens10,
- &SGSens10,
- &HGSens07,
- &SGSens07,
- &FBSens07,
- &BCSens07,
- &SGthresh,
- &BCthresh,
- &FBthresh,
- &HGthresh
- );
- K1 = HGSens10;
- K2 = SGSens10;
- K3 = HGSens07;
- K4 = SGSens07;
- K5 = FBSens07;
- K6 = BCSens07;
- SG = SGthresh;
- BC = BCthresh;
- FB = FBthresh;
- HG = HGthresh;
- }
- else {
- ResetEvent(Ev1);
- token = BeginReadDetectorThresholds_R3(epdComsHandle,nullptr,0, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadDetectorThresholds_R3(epdComsHandle, token, dTresholds, MaxTresholds, &numTresholds);
- decodedTresholds(numTresholds);
-
- ResetEvent(Ev1);
- token = BeginReadSensitivities(epdComsHandle,nullptr,0, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadSensitivities(epdComsHandle, token, sensitivities,MaxSensitivities,&numSensitivities);
- decodeSensitivities(numSensitivities);
- }
- return 0;
-}
-WORD MK3::Epd2U::ReadDoses()
-{
- int32_t r = 1;
- if (port == 0) {
- Hp10Dose = Hp07Dose = Hp10Total = Hp07Total = 0.0;
- Knocks = Resets = QualityData = 21;
- Hp10Peak = Hp07Peak = 0.0;
- Hp10Time = Hp07Time = 1000;
- ErrorSource = ErrorReason = ErrorData = 0;
- K1 = 1; K2 = 2; K3 = 3; K4 = 4; K5 = 5; K6 = 6;
- SG = 7; BC = 8; FB = 9; HG = 10;
- return 1;
- }
- ReadDosesQualityRV = ReadPeaksRV = CommitRV = 0;
-
- numDoses = 0; utc = 0;
- SetResponseTimeout(epdComsHandle, 2000);
- //ResetEvent(Ev1);
- token = BeginReadDoses(epdComsHandle, nullptr, 0, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadDoses(epdComsHandle, token, doses, MaxDoses, &numDoses, &utc);
- decodeDoses(numDoses);
-
- //ResetEvent(Ev1);
- token = BeginReadTotalDoses(epdComsHandle, nullptr, 0, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadTotalDoses(epdComsHandle, token, totdoses, MaxDoses, &numtotDoses, &utc);
- decodetotDoses(numtotDoses);
-
- ResetEvent(Ev1);
- token = BeginReadQualityData(epdComsHandle, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadQualityData(epdComsHandle, token, &quality);
- Knocks = quality.Knocks;
- Resets = quality.PowerCycles;
- ResetEvent(Ev1);
-
- token = BeginReadPeakRates(epdComsHandle, nullptr, 0, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadPeakRates(epdComsHandle, token, peakRates, MaxPeakRates, &numRates);
- decodePeakRates(numRates);
-
- ReadSensitivitiesAndTresholds();
-
- //ResetEvent(Ev1);
- //token = BeginReadSensitivities(epdComsHandle, nullptr, 0, completion);
- //r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- //r = EndReadSensitivities(epdComsHandle, token, sensitivities, MaxSensitivities, &numSensitivities);
- //decodeSensitivities(numSensitivities);
-
- //ReadDosesQualityRV = ReadDosesQuality(
- // &Hp10Dose,
- // &Hp07Dose,
- // &Hp10Total,
- // &Hp07Total,
- // &Knocks,
- // &Resets,
- // &QualityData);
-
- //if (ReadDosesQualityRV == 0) {
- // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- // return 0;
- //}
-
- //BeginReadPeakRates(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback )
- /*ReadPeaksRV = ReadPeaks(
- &Hp10Peak,
- &Hp07Peak,
- &Hp10Time,
- &Hp07Time);
- if (ReadPeaksRV == 0) {
- Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- return 0;
- }*/
-
- // EPD2 :
- // int32_t EPDDLL_API EndReadCalibrationData_R2 (CommsHandle hComms, CompletionToken token, uint16_t *HGSens10, uint16_t *SGSens10, uint16_t *HGSens07, uint16_t *SGSens07, uint16_t *FBSens07, uint16_t *BCSens07, uint16_t *SGthresh, uint16_t *BCthresh, uint16_t *FBthresh, uint16_t *HGthresh)
- // EPD3
- //
- //CompletionToken EPDDLL_API BeginReadSensitivities_R3(CommsHandle hComms, uint8_t sensIds[], uint8_t length, CompletionCallback callback )
- //ReadCalibrationData(
- // &K1,
- // &K2,
- // &K3,
- // &K4,
- // &K5,
- // &K6,
- // &SG,
- // &BC,
- // &FB,
- // &HG);
- //CommitRV = Commit();
- //if (CommitRV == 0) Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- return 1;
-}
-void MK3::Epd2U::ClearDoses()
-{
- int32_t r = 1;
- ResetEvent(Ev1);
- token = BeginClearDose(epdComsHandle, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndClearDose(epdComsHandle, token);
- if (r != 0)
- goto error;
-
- ResetEvent(Ev1);
- token = BeginClearTotalDose(epdComsHandle, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndClearTotalDose(epdComsHandle, token);
- if (r != 0)
- goto error;
-
- ResetEvent(Ev1);
- token = BeginClearPeakRates(epdComsHandle, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndClearPeakRates(epdComsHandle, token);
- if (r != 0)
- goto error;
-
-error: return ;
-}
-void MK3::Epd2U::ClearAlarms()
-{
- ResetEvent(Ev1);
- token = BeginClearFaultStatus(epdComsHandle, completion);
- int32_t r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndClearFaultStatus(epdComsHandle, token);
-
- ResetEvent(Ev1);
- token = BeginClearLatchedAlarms(epdComsHandle, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndClearLatchedAlarms(epdComsHandle, token);
-
- ResetEvent(Ev1);
- token = BeginClearAllStatus(epdComsHandle, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndClearAllStatus(epdComsHandle, token);
-}
-WORD MK3::Epd2U::PrepareForIssue()
-{
- if (port == 0) return 1;
- CommitRV = WriteConfig();
- ClearDoses();
- ClearAlarms();
- return 0;
-}
-WORD MK3::Epd2U::ReadAlarmConfig() {
- //Alleen MK3 ? leeg bij MK2
- ResetEvent(Ev1);
- token = BeginReadAlarmConfiguration(epdComsHandle, nullptr, 0, completion);
- int32_t r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadAlarmConfiguration(epdComsHandle, token, alarmConfig, MaxAlarmConfig, &numAlarm);
- return numAlarm;
-}
-WORD MK3::Epd2U::ReadAlarmTresholds() {
- //Alleen MK3 ? leeg bij MK2
-
- bool isNeutron = (EpdType == EpdTypes::Mk2Neutron || EpdType == EpdTypes::Mk3Neutron);
- uint8_t measID;
- uint32_t r;
-
-
- if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10N; else measID = (uint8_t)MeasurementId::Meas_Hp07;
-
- SetResponseTimeout(epdComsHandle, 2000);
- //ResetEvent(Ev1);
- hp07tresholds.MeasId = measID;
- token = BeginReadAlarmThresholds(epdComsHandle, (uint8_t) hp07tresholds.MeasId,nullptr,0, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadAlarmThresholds(epdComsHandle, token, &hp07tresholds);
- decodeTreshold(&hp07tresholds);
-
- if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10G; else measID = (uint8_t)MeasurementId::Meas_Hp10;
- hp10tresholds.MeasId = 0;
- //ResetEvent(Ev1);
- token = BeginReadAlarmThresholds(epdComsHandle, (uint8_t)hp10tresholds.MeasId, nullptr, 0, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadAlarmThresholds(epdComsHandle, token, &hp10tresholds);
- decodeTreshold(&hp10tresholds);
- return r;
-}
-WORD MK3::Epd2U::WriteAlarmTresholds() {
- //Alleen MK3 ? leeg bij MK2
- int r;
-
- bool isNeutron = (EpdType == EpdTypes::Mk2Neutron || EpdType == EpdTypes::Mk3Neutron);
- uint8_t measID;
-
- if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10G; else measID = (uint8_t)MeasurementId::Meas_Hp10;
- hp10tresholds.MeasId = measID;
- encodeTreshold(&hp10tresholds);
-
- token = BeginWriteAlarmThresholds(epdComsHandle, (uint8_t)hp10tresholds.MeasId, (uint8_t)hp10tresholds.NumberThresholds, hp10tresholds.Thresholds, nullptr);
- r = Commit(epdComsHandle);
- if (r != 0)
- goto error;
- r = EndWriteAlarmThresholds(epdComsHandle, token);
- if (r != 0)
- goto error;
-
-
- if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10N; else measID = (uint8_t)MeasurementId::Meas_Hp07;
- hp07tresholds.MeasId = measID;
- encodeTreshold(&hp07tresholds);
-
- hp07tresholds.NumberThresholds = 2;
- token = BeginWriteAlarmThresholds(epdComsHandle, (uint8_t)hp07tresholds.MeasId, (uint8_t)hp07tresholds.NumberThresholds, hp07tresholds.Thresholds, nullptr);
- r = Commit(epdComsHandle);
- if (r != 0)
- goto error;
- r = EndWriteAlarmThresholds(epdComsHandle, token);
- if (r != 0)
- goto error;
-
-
-
- token = BeginWriteRateOffPercentage(epdComsHandle, RatePct, 2, nullptr);
- r = Commit(epdComsHandle);
- if (r != 0)
- goto error;
- r = EndWriteRateOffPercentage(epdComsHandle, token);
- if (r != 0)
- goto error;
-
-
- return r;
-
- error:
- return r;
-}
-
-WORD MK3::Epd2U::DeIssue()
-{
- int32_t r = 1;
-// if (!EPDIssued) return 0;
-
- ClearDoseRV = ClearTotalDoseRV = ClearPeakRatesRV = DeIssueEpdRV = 0;
- if (port == 0) return 1;
- ClearDoses();
- ClearAlarms();
-
- if (EPDIssued) {
- token = BeginDeissueEPD(epdComsHandle, nullptr);
- r = Commit(epdComsHandle);
- r = EndDeissueEPD(epdComsHandle, token);
- if (r != 0)
- r = 0;
- }
-
- token = BeginEpdOnOff(epdComsHandle,0, nullptr);
- r = Commit(epdComsHandle);
- r = EndEpdOnOff(epdComsHandle, token);
- if (r != 0)
- goto error;
- EndCom();
- error:
- return r;
-}
-WORD MK3::Epd2U::WriteWearer() {
-
- ResetEvent(Ev1);
- token = BeginSetBaselineCounters(epdComsHandle, completion);
- int32_t r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndSetBaselineCounters(epdComsHandle, token);
-
- IdString_t mk3WearerID;
- //Mk2 EPDs only support Name and Primary ID
-
- mk3WearerID.IdType = (uint16_t)WearerIdType::WearerId_Name;
- mk3WearerID.Length = 23;
- memcpy(mk3WearerID.Utf8String, WearerName, 23);
- ResetEvent(Ev1);
- token = BeginWriteWearerId(epdComsHandle, mk3WearerID, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndWriteWearerId(epdComsHandle, token);
-
- mk3WearerID.IdType = (uint16_t)WearerIdType::WearerId_Primary;
- mk3WearerID.Length = 13;
- memcpy(mk3WearerID.Utf8String, WearerID, 13);
- token = BeginWriteWearerId(epdComsHandle, mk3WearerID, completion);
- r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndWriteWearerId(epdComsHandle, token);
-
- return 0;
-}
-WORD MK3::Epd2U::Issue()
-{
- uint32_t r;
- IssueEpdRV = WriteAlarmDoseThresholdsRV = WriteAlarmRateThresholdsRV = WriteWearerNameRV = OnRV = CommitRV = 0;
- if (port == 0) return 1;
- //WORD OKRV = SetFailFlag(); // all actions have been completed
- //if (OKRV) OKRV = Commit();
- //ClearAlarms();
- r= WriteAlarmTresholds();
- if (r != 0)
- goto error;
- r= WriteWearer();
- if (r != 0)
- goto error;
- r=WriteCal();
- if (r != 0)
- goto error;
-
-
- if (r != 0)
- goto error;
- if (!DetectorsOn) {
- token = BeginEpdOnOff(epdComsHandle, 1, nullptr);
- r = Commit(epdComsHandle);
- //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndEpdOnOff(epdComsHandle, token);
- // OKRV = EpdOn(); OKRV = Commit();
- //Sleep(1500);
- }
- token = BeginIssueEPD(epdComsHandle, nullptr);
- r = Commit(epdComsHandle);
- r = EndIssueEPD(epdComsHandle, token);
- if (r != 0)
- goto error;
- EndCom();
-
- //if (OKRV) OKRV = WriteAlarmDoseThresholds(Hp10THDose1, Hp10THDose2, Hp07THDose);
- //if (OKRV) OKRV = WriteAlarmRateThresholds(Hp10Rate1On, Hp10Rate2On, Hp07RateOn, Hp10Rate1Off, Hp10Rate2Off, Hp07RateOff);
- //if (OKRV) OKRV = Commit();
-
- //if (OKRV) OKRV = IssueEpd(WearerID, WearerIDLength);
- //if (OKRV) OKRV = Commit();
- //if (OKRV) OKRV = WriteWearerName(WearerName, (WORD)strlen((char*)WearerName));
- //if (OKRV) OKRV = Commit();
- //if (OKRV) OKRV = BaseLineCounts();
- //if (OKRV == 0)
- //{
- // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- //}
- //ClearFailFlag(); // all actions have been completed
- //Commit();
-
- //if (!DetectorsOn) {
- // OKRV = EpdOn(); OKRV = Commit(); Sleep(1500);
- //}
-
- //if (OKRV) {
-
- // EndSession(EndSessionControl, 12);
- // Commit();
- //} // Continuous high tone for 1.2 seconds
- //else
- //{
- // FlushBuffers(port);
- // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
- // EndSession(0x5E, 40);
- //}
-
- //Close();
- ////DeinitComms(port);
- //return OKRV;
-
-
- error:
- return r;
-}
-WORD MK3::Epd2U::EPDReadExtraStatus()
-{
- if (port == 0) return 1;
- byBatADC = bySupplyADC = 0;
- /*CommitRV = ReadA2ConfigStatus(
- &byBatADC,
- &bySupplyADC,
- &byStatus3,
- &byStatus4);
- if (CommitRV == 1) CommitRV = Commit();*/
-
- ResetEvent(Ev1);
- token = BeginReadBaselineCounts(epdComsHandle, completion);
- uint32_t r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- r = EndReadBaselineCounts(epdComsHandle, token,Counts,10,&utc,&countsRead);
- decodeBaseCounters(countsRead);
- //if (CommitRV == 1) CommitRV = ReadCounts(&D1, &D2, &D3, &D4, &CountsClock);
- //if (CommitRV == 1) CommitRV = Commit();
- //if (CommitRV == 1) CommitRV = ReadBaseCounts(&BaseD1, &BaseD2, &BaseD3, &BaseD4, &BaseCountsClock);
- //if (CommitRV == 1) CommitRV = Commit();
- return CommitRV;
-}
-WORD MK3::Epd2U::WriteCal()
-{
- uint32_t r = 0;
- if (port == 0) return 0;
-
- if (K6 > 2000)
- {
- r = 0;
- return 0;
- }
-
- if (EpdType == EpdTypes::Mk2Neutron)
- {
- Password = 9;
- ResetEvent(Ev1);
- token = BeginMfrLogin_R2(epdComsHandle, Password, completion);
- uint32_t r = Commit(epdComsHandle);
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- if (r != 0)
- goto error;
- r = EndMfrLogin_R2(epdComsHandle, token);
- if (r != 0)
- goto error;
- token = BeginWriteSensitivities_R2(epdComsHandle, completion, (uint16_t)K1, (uint16_t)K2, (uint16_t)K3, (uint16_t)K4, (uint16_t)K5, (uint16_t)K6);
- r = Commit(epdComsHandle);
- if (r != 0)
- goto error;
- r = WaitForSingleObject(Ev1, 10000); // no time-out interval
- if (r != 0)
- goto error;
- r = EndWriteSensitivities_R2(epdComsHandle, token);
- if (r != 0)
- goto error;
- }
- return r;
- error:
- return r;
+#include "pch.h"
+#include "MK3Base.h"
+#pragma unmanaged
+
+HANDLE Ev1 = INVALID_HANDLE_VALUE;
+MK3::Epd2U* current;
+
+void WINAPI completion(CommsHandle hComms, CompletionToken token)
+{
+ SetEvent(Ev1);
+}
+MK3::Epd2U::Epd2U(int _comport)
+{
+ port = _comport;
+ comPort[3] = 48 + _comport;
+ CommsInitialized = 0;
+ epdComsHandle = INVALID_HANDLE_VALUE;
+ //SetAutoCommit(0); alleen epd2
+ Error = 123;
+ if (Ev1 != nullptr) Ev1 = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if (_comport == 0) return;
+}
+
+WORD MK3::Epd2U::WriteConfig()
+{
+ if (port == 0) return 1;
+ return 0; // WriteDisplayConfig(00, 2, 40, 10, 2, displayConfig, 56);
+}
+
+DWORD MK3::Epd2U::StartCom()
+{
+ ErrorReason = 0;
+ int mx = 10;
+ epdComsHandle = INVALID_HANDLE_VALUE;
+ if (port == 0) {
+ CommsInitialized = 1;
+ return 1;
+ }
+ if (CommsInitialized == 0) {
+ epdComsHandle = CreateReaderInterface();
+ InitRv = OpenReader(epdComsHandle, comPort);
+ if (InitRv == 0)
+ {
+ SetMultipleDiscoveryMode(epdComsHandle, false);
+ CommsInitialized = 1;
+ }
+ }
+ return InitRv;
+}
+
+void MK3::Epd2U::EndCom()
+{
+ if (CommsInitialized == 1) {
+ if (epdComsHandle != INVALID_HANDLE_VALUE) {
+ CloseReader(epdComsHandle);
+ DestroyReaderInterface(epdComsHandle);
+ }
+ }
+ CommsInitialized = 0;
+ epdComsHandle = INVALID_HANDLE_VALUE;
+}
+
+MK3::Epd2U::~Epd2U()
+{
+ EndCom();
+ if (Ev1 != nullptr) {
+ CloseHandle(Ev1); Ev1 = nullptr;
+ }
+
+}
+
+void WINAPI discovery(CommsHandle hComms, DiscoveryId const discovered[], int32_t count)
+{
+ if (count > 0)
+ {
+ current->CurrentDeviceID = discovered[0].Id;
+ current->DeviceCount = count;
+ memcpy(¤t->Epd, &discovered[0], sizeof(DiscoveryId));
+ SetEvent(Ev1);
+ }
+}
+
+///
+///
+///
+/// 0 = success
+int MK3::Epd2U::StartDiscover()
+{
+ int32_t rv;
+
+ //System::Diagnostics::Trace::WriteLine("StartDiscover");
+ Error = 0;
+ if (port == 0) {
+ DeviceCount = 1;
+ DeviceIDs[0] = 768;
+ return 1;
+ }
+ //
+ //Cancel(epdComsHandle);
+ //FlushDiscoveryCache(port);
+ //FlushBuffers(port);
+ int tries = 25; DeviceCount = 0; DiscRV = 1;
+ ResetEvent(Ev1);
+ while (tries-- > 0 && DeviceCount == 0)
+ {
+ //memset(DevceIDs, 0, sizeof(DeviceIDs));
+ current = this;
+ rv = StartDiscovery(epdComsHandle, discovery);
+ if (rv==0) rv = WaitForSingleObject(Ev1, 10000);
+ }
+ if (rv == 0) rv=Connect(epdComsHandle, Epd, true);
+ //System::Diagnostics::Trace::WriteLine(System::String::Format("Discover DeviceCount = {0}", DeviceCount));
+
+ return rv;
+}
+
+void MK3::Epd2U::Open(DiscoveryId DeviceID)
+{
+ CurrentDeviceID = DeviceID.Id;
+ if (port > 0) {
+ ConRV = Connect(epdComsHandle, DeviceID,true);
+ //if (ConRV == 0) Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ //else {
+ Open(DeviceID); // OpenDevice(port, CurrentDeviceID);
+ //if (OpenRV == 0) Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ }
+ //}
+ else { OpenRV = ConRV = 1; }
+}
+void MK3::Epd2U::CloseDev()
+{
+ if (port > 0) {
+ //Close();// CloseDevice();
+ Disconnect(epdComsHandle);
+ }
+ //DeinitComms(port); CommsInitialized = 0;
+}
+
+//void MK3::Epd2U::DecodeFunctionFlags()
+//{
+// EpdType = (FunctionFlags & 0x1F00) >> 8;
+//}
+
+
+byte checkOpStatus(OpStatusFlags status, OpStatusFlags flag)
+{
+ if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
+}
+byte checkFailStatus(FaultStatusFlags status, FaultStatusFlags flag)
+{
+ if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
+}
+
+byte checkStatus(AlarmStatusFlags status, AlarmStatusFlags flag)
+{
+ uint32_t ustatus = (uint32_t)status;
+ uint32_t uflag = (uint32_t)flag;
+ if ((ustatus & uflag) == uflag) return 1; else return 0;
+}
+
+byte checkStatus( DoseAlarmFlags status, DoseAlarmFlags flag)
+{
+ if (((uint32_t)status & (uint32_t)flag) == (uint32_t)flag) return 1; else return 0;
+}
+
+void MK3::Epd2U::DecodeStatus()
+{
+ DetectorsOn = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::EpdOn);
+ EPDIssued = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::EpdIssued);
+ EPDLocked = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::GainAdjustable);
+ EPDTesting = checkOpStatus(epd3status.OperatingStatus, OpStatusFlags::DetectorTestRequested);
+ EPDFaulty = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EpdFaulty);
+
+ EPDNewFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EpdFaulty);
+ EPDComFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EarlyCommsTermination);
+ EPDCalFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::NotCalibrated);
+ EPDDetFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::DetectorTestFail);
+ EPDEprFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::EepromFailure);
+ EPDTrhFault = checkFailStatus(epd3status.FaultStatus, FaultStatusFlags::BadThreshold);
+
+ for (int ix = 0; ix < 4; ix++)
+ {
+ DoseAlarmFlags status = epd3status.DoseAlarms[ix].Status;
+ switch ((MeasurementId)epd3status.DoseAlarms[ix].Id)
+ {
+ case MeasurementId::Meas_Hp07:
+ case MeasurementId::Meas_Hp10N:
+ AlarmDoseHP07N = checkStatus(status ,DoseAlarmFlags::DoseAlarm);
+ AlarmRateHP07N = checkStatus(status, DoseAlarmFlags::RateAlarm) ;
+ break;
+ case MeasurementId::Meas_Hp10:
+ case MeasurementId::Meas_Hp10G:
+ AlarmDoseHP101G = checkStatus(status, DoseAlarmFlags::DoseAlarm);
+ AlarmDoseHP102G = AlarmDoseHP101G;
+ AlarmRateHP101G = checkStatus(status, DoseAlarmFlags::RateAlarm);
+ AlarmRateHP102G = AlarmRateHP101G;
+ break;
+ }
+ }
+ OtherAlarmReturn = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::ReturnForRead);
+ OtherAlarmBatLow = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::LowBattery);
+ OtherAlarmCarrier = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::TelemetryAlert);
+ OtherAlarmBatVolt = checkStatus(epd3status.AlarmStatus, AlarmStatusFlags::LowBattery);
+}
+
+void MK3::Epd2U::SetTime() //Only R3
+{
+ if (Epd.Gen == EpdGeneration::Mk3) {
+ utc = TimeFunctions::NowToEpdTime(Epd.Gen == EpdGeneration::Mk2);
+ ResetEvent(Ev1);
+ token = BeginWriteRTC_R3(epdComsHandle, utc, completion);
+ uint32_t r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteRTC_R3(epdComsHandle, token);
+ }
+}
+
+WORD MK3::Epd2U::ReadStatus()
+{
+
+ int32_t r; //0=ok
+ Error = 0;
+ if (port == 0) {
+ EpdID = 4567;
+ EpdType = EpdTypes::Mk2BetaGamma;
+ isBG = 1;
+ FunctionFlags = 0x000;
+ Epd.Gen = EpdGeneration::None;
+ Epd.MaxBaud = 0;
+ Epd.Id = EpdID;
+ return 0;
+ }
+
+ OperatingStatus = (OpStatusFlags)0U;
+ AlarmStatus = (AlarmStatusFlags)0U;
+ ErrorStatus = (FaultStatusFlags)0;
+ IssueCount = OtherAlarms = EEPROMBadSectors = 0;
+ RealTime = EpdClock = OffTime = EpdID = 0;
+ ErrorSource = ErrorReason = ErrorData = 0;
+ HardVersion = SoftVersion = FunctionFlags = 0;
+
+ SetResponseTimeout(epdComsHandle, 2000);
+ //ResetEvent(Ev1);
+ token = BeginReadStatus(epdComsHandle, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadStatus(epdComsHandle, token, &epd3status);
+
+ if (r != 0) {
+ Error = GetErrorCode(); return r;
+ }
+
+ IssueCount = epd3status.IssueCount;
+ OperatingStatus = epd3status.OperatingStatus;
+ AlarmStatus = epd3status.AlarmStatus;
+ ErrorStatus = epd3status.FaultStatus;
+ OtherAlarms = epd3status.OtherBits;
+ ReadStatusRV = 0;
+
+ uint32_t EpdID32;
+ uint32_t capabilities;
+ MarkNumber_t MarkNumber;
+ VersionNumber_t VersionNumber;
+
+ //ResetEvent(Ev1);
+ token = BeginReadEpdIdentities(epdComsHandle, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadEpdIdentities(epdComsHandle, token, &EpdID32, (EpdTypes*)&EpdType, &capabilities, &MarkNumber, &VersionNumber, NULL, 0);
+
+ if (r != 0) {
+ Error = GetErrorCode(); return r;
+ }
+
+
+ EpdID = EpdID32;
+ isBG = (EpdType == EpdTypes::Mk2BetaGamma || EpdType == EpdTypes::Mk3BetaGamma);
+
+ DecodeStatus();
+ memset(WearerID, 0, WearerIDLength + 1);
+ memset(WearerName, 0, WearerNameLength + 1);
+
+ uint8_t length = 0;
+ countsRead = 0; utc = 0; seconds = 0;
+ //ResetEvent(Ev1);
+ token = BeginReadCounts(epdComsHandle, nullptr, 0, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadCounts(epdComsHandle,token,Counts,MaxCounts, &countsRead,&utc,&seconds);
+ // - 101 = InvalidParam
+ // - 104 = FunctionFail,
+ if (r != 0 && r!=-104) {
+ Error = GetErrorCode(); return r;
+ }
+ decodeCounters(countsRead); //HG,SG ..
+
+ IdString_t mk3WearerID;
+ //Mk2 EPDs only support Name and Primary ID
+ //ResetEvent(Ev1);
+ token = BeginReadWearerId(epdComsHandle, static_cast(WearerIdType::WearerId_Name), nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadWearerId(epdComsHandle, token, &mk3WearerID);
+ if (r != 0) {
+ Error = GetErrorCode(); return r;
+ }
+
+ if (mk3WearerID.Length > WearerNameLength) mk3WearerID.Length = WearerNameLength;
+ memcpy(WearerName, mk3WearerID.Utf8String, mk3WearerID.Length); WearerName[mk3WearerID.Length] = 0;
+
+ //ResetEvent(Ev1);
+ token = BeginReadWearerId(epdComsHandle, static_cast(WearerIdType::WearerId_Primary), nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadWearerId(epdComsHandle, token, &mk3WearerID);
+ if (r != 0) {
+ Error = GetErrorCode(); return r;
+ }
+
+ if (mk3WearerID.Length > WearerIDLength) mk3WearerID.Length = WearerIDLength;
+ memcpy(this->WearerID, mk3WearerID.Utf8String, mk3WearerID.Length); WearerName[mk3WearerID.Length] = 0;
+ for (int i = 0; i < mk3WearerID.Length; i++)
+ if (WearerID[i] == 0xb) WearerID[i] = '0'; else WearerID[i] |= 0x30;
+
+ //1601-01-01T00:00:00Z.
+
+ //MK2 .. some utc... but no real time clock
+ if (utc == 0) {
+ //ResetEvent(Ev1);
+ token = BeginReadRTC(epdComsHandle, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadRTC(epdComsHandle, token, &utc); //EpdClock for MK2
+ EpdClock = utc;
+ utc = TimeFunctions::NowToEpdTime(true);
+ }
+ else {
+ EpdClock = utc;
+ }
+
+ FILETIME fUTC;
+ TimeFunctions::EpdTimeToFileTime(utc, &fUTC, Epd.Gen== EpdGeneration::Mk2);
+ FileTimeToSystemTime(&fUTC, &tRealTime);
+
+
+
+ //CommitRV = ReadEpdStatus(&EpdClock, &RealTime, &IssueCount, &OffTime, &OperatingStatus, &ErrorStatus, &AlarmStatus, &OtherAlarms, &EEPROMBadSectors);
+ //if (port == 0) {
+ // EpdClock = 123; ErrorStatus = 0;
+ //};
+ //if (CommitRV == 1) CommitRV = Commit();
+ //if (CommitRV == 1) CommitRV = ReadEpdID(
+ // &EpdID,
+ // &HardVersion,
+ // &SoftVersion,
+ // &FunctionFlags);
+ //if (CommitRV == 1) CommitRV = Commit();
+ //if (CommitRV == 0) {
+ // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ // ReadStatusRV = ErrorReason;
+ // return 0;
+ //}
+ //else {
+ // if (CurrentDeviceID == 0) CurrentDeviceID = EpdID;
+ // time_t t = RealTime;
+ // TimeFunctions::UnixTimeToSystemTime(t, &tRealTime);
+ // DecodeStatus();
+ // DecodeFunctionFlags();
+ //}
+
+ //if (CommitRV == 1 && EPDIssued == 1)
+ //{
+ // CommitRV = ReadWearer(
+ // WearerID,
+ // WearerIDLength,
+ // WearerName,
+ // WearerNameLength);
+ // if (CommitRV == 1) CommitRV = Commit();
+ // if (CommitRV == 0) {
+ // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ // ReadStatusRV = ErrorReason;
+ // return 0;
+ // }
+ // else {
+ // }
+ //}
+
+
+ //werkt niet voor MK2
+ //ResetEvent(Ev1);
+ //token = BeginReadMeasurandIds_R3(epdComsHandle, completion);
+ //r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ //r = EndReadMeasurandIds_R3(epdComsHandle, token, mIDs, MAX_MEASUREMENTS, &nmIDs);
+
+
+ return r;
+}
+
+void MK3::Epd2U::decodeSensitivities(int count) {
+
+ K1 = K2 = K3 = K4 = K4 = K6 = 0.0F;
+ for (int ix = count - 1; ix >= 0; ix--) {
+ switch ((SensitivityId)sensitivities[ix].id)
+ {
+ case SensitivityId::Hg1Sens10G: K1 = sensitivities[ix].value; break;
+ case SensitivityId::Sg1Sens10G: K2 = sensitivities[ix].value; break;
+ case SensitivityId::Hg1Sens07G: K3 = sensitivities[ix].value; break; //Neutr=FN
+ case SensitivityId::Sg1Sens07G: K4 = sensitivities[ix].value; break; //Neutr=AN
+ case SensitivityId::Fb1Sens07B: K5 = sensitivities[ix].value; break;
+ case SensitivityId::Sg2Sens07B: K6 = sensitivities[ix].value; break;
+ default: break;
+ }
+ }
+}
+void MK3::Epd2U::decodetotDoses(int count)
+{
+ //doses
+ Hp10Total = Hp07Total = 0;
+ for (int ix = 0; ix < count; ix++)
+ {
+ switch ((MeasurementId)doses[ix].id) {
+ case MeasurementId::Meas_Hp07: Hp07Total = doses[ix].value; break;
+ case MeasurementId::Meas_Hp10: Hp10Total = doses[ix].value; break;
+ case MeasurementId::Meas_Hp10N: Hp07Total = doses[ix].value; break;
+ case MeasurementId::Meas_Hp10G: Hp10Total = doses[ix].value; break;
+ }
+ }
+}
+void MK3::Epd2U::decodeDoses(int count)
+{
+ //doses
+ Hp10Dose = Hp07Dose = 0;
+ for (int ix = 0; ix < count; ix++)
+ {
+ switch ((MeasurementId)doses[ix].id) {
+ case MeasurementId::Meas_Hp07: Hp07Dose = doses[ix].value; break;
+ case MeasurementId::Meas_Hp10: Hp10Dose = doses[ix].value; break;
+ case MeasurementId::Meas_Hp10N: Hp07Dose = doses[ix].value; break;
+ case MeasurementId::Meas_Hp10G: Hp10Dose= doses[ix].value; break;
+ }
+ }
+}
+void MK3::Epd2U::decodePeakRates(int count)
+{
+ //Rates
+ Hp10Peak = Hp07Peak = 0;
+ Hp10Time = Hp07Time = 0;
+ for (int ix = 0; ix < count; ix++)
+ {
+ switch ((MeasurementId)peakRates[ix].id) {
+ case MeasurementId::Meas_Hp07:
+ case MeasurementId::Meas_Hp10N:
+ Hp07Peak= peakRates[ix].value;
+ Hp07Time = peakRates[ix].timestamp;
+ break;
+ case MeasurementId::Meas_Hp10:
+ case MeasurementId::Meas_Hp10G:
+ Hp10Peak = peakRates[ix].value;
+ Hp10Time = peakRates[ix].timestamp;
+ break;
+ }
+ }
+}
+void MK3::Epd2U::decodeCounters(int count)
+{
+ HG = SG = BC = FB = 0;
+ for (int ix = 0; ix < count; ix++)
+ {
+ switch ((CounterType)Counts[ix].type) {
+ case CounterType::Counter_Hg1: HG = Counts[ix].value; break;
+ case CounterType::Counter_Sg1: SG = Counts[ix].value; break;
+ case CounterType::Counter_Sg2: BC = Counts[ix].value; break;
+ case CounterType::Counter_Fb1: FB = Counts[ix].value; break;
+ }
+ }
+}
+void MK3::Epd2U::decodeBaseCounters(int count)
+{
+ for (int ix = 0; ix < count; ix++)
+ {
+ switch ((CounterType)Counts[ix].type) {
+ case CounterType::Counter_Hg1: D1 = Counts[ix].value; break;
+ case CounterType::Counter_Sg1: D2 = Counts[ix].value; break;
+ case CounterType::Counter_Sg2: D3 = Counts[ix].value; break;
+ case CounterType::Counter_Fb1: D4 = Counts[ix].value; break;
+ }
+ }
+
+}
+void MK3::Epd2U::decodeTreshold(Mk3AlarmThresholds_t* th)
+{
+ float* pThDose = nullptr, * pThRate = nullptr, * pTHDoseWarning = nullptr, * pTHRateWarning = nullptr;
+ switch ((MeasurementId)th->MeasId)
+ {
+ case MeasurementId::Meas_Hp07:
+ case MeasurementId::Meas_Hp10N:
+ Hp07THDose = 0; Hp07RateOn = 0; Hp07RateOff = 0;
+ pThDose = &Hp07THDose;
+ pThRate = &Hp07RateOn;
+ pTHDoseWarning = pTHRateWarning = nullptr;
+ break;
+ case MeasurementId::Meas_Hp10:
+ Hp10THDose1 = 0; Hp10THDose2 = 0;
+ Hp10Rate1On = Hp10Rate2On = Hp10Rate1Off = Hp10Rate2Off = 0;
+ pThDose = &Hp10THDose2;
+ pThRate = &Hp10Rate2On;
+ pTHDoseWarning = &Hp10THDose1;
+ pTHRateWarning = &Hp10Rate1Off;
+ break;
+ }
+
+ for (int ix = 0; ix < th->NumberThresholds; ix++)
+ {
+ switch ((ThresholdId)th->Thresholds[ix].Id) {
+ case ThresholdId::Thres_DoseAlarm: if (pThDose != nullptr) *pThDose = th->Thresholds[ix].Value; break;
+ case ThresholdId::Thres_DoseWarning: if (pTHDoseWarning != nullptr) *pTHDoseWarning = th->Thresholds[ix].Value; break;
+ case ThresholdId::Thres_RateAlarm: if (pThRate != nullptr) *pThRate = th->Thresholds[ix].Value; break;
+ case ThresholdId::Thres_RateWarning: if (pTHRateWarning != nullptr) *pTHRateWarning = th->Thresholds[ix].Value; break;
+ }
+ }
+}
+void MK3::Epd2U::encodeTreshold(Mk3AlarmThresholds_t* th)
+{
+ //th.MeasId
+ float* pThDose , *pThRate , *pTHDoseWarning,* pTHRateWarning;
+
+ th->NumberThresholds = 4;
+ switch ((MeasurementId)th->MeasId) {
+ case MeasurementId::Meas_Hp07:
+ case MeasurementId::Meas_Hp10N:
+ pThDose = &Hp07THDose;
+ pTHDoseWarning = &Hp07THDose;
+ pThRate = &Hp07RateOn;
+ pTHRateWarning = &Hp07RateOff;
+ RatePct[0].MeasId = th->MeasId;
+ RatePct[0].Value = 85; // (int)(Hp07RateOff * 100.0 / Hp07RateOn);
+ break;
+ case MeasurementId::Meas_Hp10:
+ case MeasurementId::Meas_Hp10G:
+ pThDose = &Hp10THDose2;
+ pThRate = &Hp10Rate2On;
+ pTHDoseWarning = &Hp10THDose1;
+ pTHRateWarning = &Hp10Rate1On;
+ RatePct[1].MeasId = th->MeasId;
+ RatePct[1].Value = 85; // (int)(Hp10Rate2Off * 100.0 / Hp10Rate2On);
+ break;
+ default:
+ pThDose = &Hp07THDose;
+ pTHDoseWarning = &Hp07THDose;
+ pThRate = &Hp07RateOn;
+ pTHRateWarning = &Hp07RateOff;
+ }
+
+ th->Thresholds[0].Id = (uint16_t)ThresholdId::Thres_DoseAlarm;
+ th->Thresholds[0].Value = *pThDose;
+ th->Thresholds[1].Id = (uint16_t)ThresholdId::Thres_RateAlarm;
+ th->Thresholds[1].Value = *pThRate;
+ th->Thresholds[2].Id = (uint16_t)ThresholdId::Thres_DoseWarning;
+ th->Thresholds[2].Value = *pTHDoseWarning;
+ th->Thresholds[3].Id = (uint16_t)ThresholdId::Thres_RateWarning;
+ th->Thresholds[3].Value = *pTHRateWarning;
+}
+void MK3::Epd2U::decodedTresholds(int numdTresholds)
+{
+ for (int ix = 0; ix < numdTresholds; ix++) {
+ switch ((CounterType)dTresholds[ix].type) {
+ case CounterType::Counter_Hg1: HG = dTresholds[ix].value; break;
+ case CounterType::Counter_Sg1: SG = dTresholds[ix].value; break;
+ case CounterType::Counter_Sg2: BC = dTresholds[ix].value; break;
+ case CounterType::Counter_Fb1: FB = dTresholds[ix].value; break;
+ case CounterType::Counter_An1: BC = dTresholds[ix].value; break; //AN-> BC
+ case CounterType::Counter_Fn2: FB = dTresholds[ix].value; break; //FN->FB
+
+
+ }
+ }
+}
+WORD MK3::Epd2U::ReadSensitivitiesAndTresholds()
+{
+ int32_t r = 0;
+ if (Epd.Gen == EpdGeneration::Mk2) {
+ uint16_t HGSens10;
+ uint16_t SGSens10;
+ uint16_t HGSens07;
+ uint16_t SGSens07;
+ uint16_t FBSens07;
+ uint16_t BCSens07;
+ uint16_t SGthresh;
+ uint16_t BCthresh;
+ uint16_t FBthresh;
+ uint16_t HGthresh;
+
+ //ResetEvent(Ev1);
+ //token = BeginReadDoses(epdComsHandle, new uint8_t[]{ 0, 1 }, 2 , completion);
+ token = BeginReadCalibrationData_R2(epdComsHandle, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r=EndReadCalibrationData_R2(epdComsHandle, token,
+ &HGSens10,
+ &SGSens10,
+ &HGSens07,
+ &SGSens07,
+ &FBSens07,
+ &BCSens07,
+ &SGthresh,
+ &BCthresh,
+ &FBthresh,
+ &HGthresh
+ );
+ K1 = HGSens10;
+ K2 = SGSens10;
+ K3 = HGSens07;
+ K4 = SGSens07;
+ K5 = FBSens07;
+ K6 = BCSens07;
+ SG = SGthresh;
+ BC = BCthresh;
+ FB = FBthresh;
+ HG = HGthresh;
+ }
+ else {
+ ResetEvent(Ev1);
+ token = BeginReadDetectorThresholds_R3(epdComsHandle,nullptr,0, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadDetectorThresholds_R3(epdComsHandle, token, dTresholds, MaxTresholds, &numTresholds);
+ decodedTresholds(numTresholds);
+
+ ResetEvent(Ev1);
+ token = BeginReadSensitivities(epdComsHandle,nullptr,0, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadSensitivities(epdComsHandle, token, sensitivities,MaxSensitivities,&numSensitivities);
+ decodeSensitivities(numSensitivities);
+ }
+ return 0;
+}
+WORD MK3::Epd2U::ReadDoses()
+{
+ int32_t r = 1;
+ if (port == 0) {
+ Hp10Dose = Hp07Dose = Hp10Total = Hp07Total = 0.0;
+ Knocks = Resets = QualityData = 21;
+ Hp10Peak = Hp07Peak = 0.0;
+ Hp10Time = Hp07Time = 1000;
+ ErrorSource = ErrorReason = ErrorData = 0;
+ K1 = 1; K2 = 2; K3 = 3; K4 = 4; K5 = 5; K6 = 6;
+ SG = 7; BC = 8; FB = 9; HG = 10;
+ return 1;
+ }
+ ReadDosesQualityRV = ReadPeaksRV = CommitRV = 0;
+
+ numDoses = 0; utc = 0;
+ SetResponseTimeout(epdComsHandle, 2000);
+ //ResetEvent(Ev1);
+ token = BeginReadDoses(epdComsHandle, nullptr, 0, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadDoses(epdComsHandle, token, doses, MaxDoses, &numDoses, &utc);
+ decodeDoses(numDoses);
+
+ //ResetEvent(Ev1);
+ token = BeginReadTotalDoses(epdComsHandle, nullptr, 0, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadTotalDoses(epdComsHandle, token, totdoses, MaxDoses, &numtotDoses, &utc);
+ decodetotDoses(numtotDoses);
+
+ ResetEvent(Ev1);
+ token = BeginReadQualityData(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadQualityData(epdComsHandle, token, &quality);
+ Knocks = quality.Knocks;
+ Resets = quality.PowerCycles;
+ ResetEvent(Ev1);
+
+ token = BeginReadPeakRates(epdComsHandle, nullptr, 0, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadPeakRates(epdComsHandle, token, peakRates, MaxPeakRates, &numRates);
+ decodePeakRates(numRates);
+
+ ReadSensitivitiesAndTresholds();
+
+ //ResetEvent(Ev1);
+ //token = BeginReadSensitivities(epdComsHandle, nullptr, 0, completion);
+ //r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ //r = EndReadSensitivities(epdComsHandle, token, sensitivities, MaxSensitivities, &numSensitivities);
+ //decodeSensitivities(numSensitivities);
+
+ //ReadDosesQualityRV = ReadDosesQuality(
+ // &Hp10Dose,
+ // &Hp07Dose,
+ // &Hp10Total,
+ // &Hp07Total,
+ // &Knocks,
+ // &Resets,
+ // &QualityData);
+
+ //if (ReadDosesQualityRV == 0) {
+ // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ // return 0;
+ //}
+
+ //BeginReadPeakRates(CommsHandle hComms, uint8_t ids[], uint8_t length, CompletionCallback callback )
+ /*ReadPeaksRV = ReadPeaks(
+ &Hp10Peak,
+ &Hp07Peak,
+ &Hp10Time,
+ &Hp07Time);
+ if (ReadPeaksRV == 0) {
+ Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ return 0;
+ }*/
+
+ // EPD2 :
+ // int32_t EPDDLL_API EndReadCalibrationData_R2 (CommsHandle hComms, CompletionToken token, uint16_t *HGSens10, uint16_t *SGSens10, uint16_t *HGSens07, uint16_t *SGSens07, uint16_t *FBSens07, uint16_t *BCSens07, uint16_t *SGthresh, uint16_t *BCthresh, uint16_t *FBthresh, uint16_t *HGthresh)
+ // EPD3
+ //
+ //CompletionToken EPDDLL_API BeginReadSensitivities_R3(CommsHandle hComms, uint8_t sensIds[], uint8_t length, CompletionCallback callback )
+ //ReadCalibrationData(
+ // &K1,
+ // &K2,
+ // &K3,
+ // &K4,
+ // &K5,
+ // &K6,
+ // &SG,
+ // &BC,
+ // &FB,
+ // &HG);
+ //CommitRV = Commit();
+ //if (CommitRV == 0) Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ return 1;
+}
+void MK3::Epd2U::ClearDoses()
+{
+ int32_t r = 1;
+ ResetEvent(Ev1);
+ token = BeginClearDose(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndClearDose(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+
+ ResetEvent(Ev1);
+ token = BeginClearTotalDose(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndClearTotalDose(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+
+ ResetEvent(Ev1);
+ token = BeginClearPeakRates(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndClearPeakRates(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+
+error: return ;
+}
+void MK3::Epd2U::ClearAlarms()
+{
+ ResetEvent(Ev1);
+ token = BeginClearFaultStatus(epdComsHandle, completion);
+ int32_t r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndClearFaultStatus(epdComsHandle, token);
+
+ ResetEvent(Ev1);
+ token = BeginClearLatchedAlarms(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndClearLatchedAlarms(epdComsHandle, token);
+
+ ResetEvent(Ev1);
+ token = BeginClearAllStatus(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndClearAllStatus(epdComsHandle, token);
+}
+WORD MK3::Epd2U::PrepareForIssue()
+{
+ if (port == 0) return 1;
+ CommitRV = WriteConfig();
+ ClearDoses();
+ ClearAlarms();
+ return 0;
+}
+WORD MK3::Epd2U::ReadAlarmConfig() {
+ //Alleen MK3 ? leeg bij MK2
+ ResetEvent(Ev1);
+ token = BeginReadAlarmConfiguration(epdComsHandle, nullptr, 0, completion);
+ int32_t r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadAlarmConfiguration(epdComsHandle, token, alarmConfig, MaxAlarmConfig, &numAlarm);
+ return numAlarm;
+}
+WORD MK3::Epd2U::ReadAlarmTresholds() {
+ //Alleen MK3 ? leeg bij MK2
+
+ bool isNeutron = (EpdType == EpdTypes::Mk2Neutron || EpdType == EpdTypes::Mk3Neutron);
+ uint8_t measID;
+ uint32_t r;
+
+
+ if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10N; else measID = (uint8_t)MeasurementId::Meas_Hp07;
+
+ SetResponseTimeout(epdComsHandle, 2000);
+ //ResetEvent(Ev1);
+ hp07tresholds.MeasId = measID;
+ token = BeginReadAlarmThresholds(epdComsHandle, (uint8_t) hp07tresholds.MeasId,nullptr,0, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadAlarmThresholds(epdComsHandle, token, &hp07tresholds);
+ decodeTreshold(&hp07tresholds);
+
+ if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10G; else measID = (uint8_t)MeasurementId::Meas_Hp10;
+ hp10tresholds.MeasId = 0;
+ //ResetEvent(Ev1);
+ token = BeginReadAlarmThresholds(epdComsHandle, (uint8_t)hp10tresholds.MeasId, nullptr, 0, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadAlarmThresholds(epdComsHandle, token, &hp10tresholds);
+ decodeTreshold(&hp10tresholds);
+ return r;
+}
+WORD MK3::Epd2U::WriteAlarmTresholds() {
+ //Alleen MK3 ? leeg bij MK2
+ int r;
+
+ bool isNeutron = (EpdType == EpdTypes::Mk2Neutron || EpdType == EpdTypes::Mk3Neutron);
+ uint8_t measID;
+
+ if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10G; else measID = (uint8_t)MeasurementId::Meas_Hp10;
+ hp10tresholds.MeasId = measID;
+ encodeTreshold(&hp10tresholds);
+
+ token = BeginWriteAlarmThresholds(epdComsHandle, (uint8_t)hp10tresholds.MeasId, (uint8_t)hp10tresholds.NumberThresholds, hp10tresholds.Thresholds, nullptr);
+ r = Commit(epdComsHandle);
+ if (r != 0)
+ goto error;
+ r = EndWriteAlarmThresholds(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+
+
+ if (isNeutron) measID = (uint8_t)MeasurementId::Meas_Hp10N; else measID = (uint8_t)MeasurementId::Meas_Hp07;
+ hp07tresholds.MeasId = measID;
+ encodeTreshold(&hp07tresholds);
+
+ hp07tresholds.NumberThresholds = 2;
+ token = BeginWriteAlarmThresholds(epdComsHandle, (uint8_t)hp07tresholds.MeasId, (uint8_t)hp07tresholds.NumberThresholds, hp07tresholds.Thresholds, nullptr);
+ r = Commit(epdComsHandle);
+ if (r != 0)
+ goto error;
+ r = EndWriteAlarmThresholds(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+
+
+
+ token = BeginWriteRateOffPercentage(epdComsHandle, RatePct, 2, nullptr);
+ r = Commit(epdComsHandle);
+ if (r != 0)
+ goto error;
+ r = EndWriteRateOffPercentage(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+
+
+ return r;
+
+ error:
+ return r;
+}
+
+WORD MK3::Epd2U::DeIssue()
+{
+ int32_t r = 1;
+// if (!EPDIssued) return 0;
+
+ ClearDoseRV = ClearTotalDoseRV = ClearPeakRatesRV = DeIssueEpdRV = 0;
+ if (port == 0) return 1;
+ ClearDoses();
+ ClearAlarms();
+
+ if (EPDIssued) {
+ token = BeginDeissueEPD(epdComsHandle, nullptr);
+ r = Commit(epdComsHandle);
+ r = EndDeissueEPD(epdComsHandle, token);
+ if (r != 0)
+ r = 0;
+ }
+
+ token = BeginEpdOnOff(epdComsHandle,0, nullptr);
+ r = Commit(epdComsHandle);
+ r = EndEpdOnOff(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+ EndCom();
+ error:
+ return r;
+}
+WORD MK3::Epd2U::WriteWearer() {
+
+ ResetEvent(Ev1);
+ token = BeginSetBaselineCounters(epdComsHandle, completion);
+ int32_t r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndSetBaselineCounters(epdComsHandle, token);
+
+ IdString_t mk3WearerID;
+ //Mk2 EPDs only support Name and Primary ID
+
+ mk3WearerID.IdType = (uint16_t)WearerIdType::WearerId_Name;
+ mk3WearerID.Length = 23;
+ memcpy(mk3WearerID.Utf8String, WearerName, 23);
+ ResetEvent(Ev1);
+ token = BeginWriteWearerId(epdComsHandle, mk3WearerID, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteWearerId(epdComsHandle, token);
+
+ mk3WearerID.IdType = (uint16_t)WearerIdType::WearerId_Primary;
+ mk3WearerID.Length = 13;
+ memcpy(mk3WearerID.Utf8String, WearerID, 13);
+ token = BeginWriteWearerId(epdComsHandle, mk3WearerID, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteWearerId(epdComsHandle, token);
+
+ return 0;
+}
+WORD MK3::Epd2U::Issue()
+{
+ uint32_t r;
+ IssueEpdRV = WriteAlarmDoseThresholdsRV = WriteAlarmRateThresholdsRV = WriteWearerNameRV = OnRV = CommitRV = 0;
+ if (port == 0) return 1;
+ //WORD OKRV = SetFailFlag(); // all actions have been completed
+ //if (OKRV) OKRV = Commit();
+ //ClearAlarms();
+ r= WriteAlarmTresholds();
+ if (r != 0)
+ goto error;
+ r= WriteWearer();
+ if (r != 0)
+ goto error;
+ r=WriteCal();
+ if (r != 0)
+ goto error;
+
+
+ if (r != 0)
+ goto error;
+ if (!DetectorsOn) {
+ token = BeginEpdOnOff(epdComsHandle, 1, nullptr);
+ r = Commit(epdComsHandle);
+ //r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndEpdOnOff(epdComsHandle, token);
+ // OKRV = EpdOn(); OKRV = Commit();
+ //Sleep(1500);
+ }
+ token = BeginIssueEPD(epdComsHandle, nullptr);
+ r = Commit(epdComsHandle);
+ r = EndIssueEPD(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+ EndCom();
+
+ //if (OKRV) OKRV = WriteAlarmDoseThresholds(Hp10THDose1, Hp10THDose2, Hp07THDose);
+ //if (OKRV) OKRV = WriteAlarmRateThresholds(Hp10Rate1On, Hp10Rate2On, Hp07RateOn, Hp10Rate1Off, Hp10Rate2Off, Hp07RateOff);
+ //if (OKRV) OKRV = Commit();
+
+ //if (OKRV) OKRV = IssueEpd(WearerID, WearerIDLength);
+ //if (OKRV) OKRV = Commit();
+ //if (OKRV) OKRV = WriteWearerName(WearerName, (WORD)strlen((char*)WearerName));
+ //if (OKRV) OKRV = Commit();
+ //if (OKRV) OKRV = BaseLineCounts();
+ //if (OKRV == 0)
+ //{
+ // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ //}
+ //ClearFailFlag(); // all actions have been completed
+ //Commit();
+
+ //if (!DetectorsOn) {
+ // OKRV = EpdOn(); OKRV = Commit(); Sleep(1500);
+ //}
+
+ //if (OKRV) {
+
+ // EndSession(EndSessionControl, 12);
+ // Commit();
+ //} // Continuous high tone for 1.2 seconds
+ //else
+ //{
+ // FlushBuffers(port);
+ // Error = GetErrorDetails(&ErrorSource, &ErrorReason, &ErrorData);
+ // EndSession(0x5E, 40);
+ //}
+
+ //Close();
+ ////DeinitComms(port);
+ //return OKRV;
+
+
+ error:
+ return r;
+}
+WORD MK3::Epd2U::EPDReadExtraStatus()
+{
+ if (port == 0) return 1;
+ byBatADC = bySupplyADC = 0;
+ /*CommitRV = ReadA2ConfigStatus(
+ &byBatADC,
+ &bySupplyADC,
+ &byStatus3,
+ &byStatus4);
+ if (CommitRV == 1) CommitRV = Commit();*/
+
+ ResetEvent(Ev1);
+ token = BeginReadBaselineCounts(epdComsHandle, completion);
+ uint32_t r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadBaselineCounts(epdComsHandle, token,Counts,10,&utc,&countsRead);
+ decodeBaseCounters(countsRead);
+ //if (CommitRV == 1) CommitRV = ReadCounts(&D1, &D2, &D3, &D4, &CountsClock);
+ //if (CommitRV == 1) CommitRV = Commit();
+ //if (CommitRV == 1) CommitRV = ReadBaseCounts(&BaseD1, &BaseD2, &BaseD3, &BaseD4, &BaseCountsClock);
+ //if (CommitRV == 1) CommitRV = Commit();
+ return CommitRV;
+}
+WORD MK3::Epd2U::WriteCal()
+{
+ uint32_t r = 0;
+ if (port == 0) return 0;
+
+ if (K6 > 2000)
+ {
+ r = 0;
+ return 0;
+ }
+
+ if (EpdType == EpdTypes::Mk2Neutron)
+ {
+ Password = 9;
+ ResetEvent(Ev1);
+ token = BeginMfrLogin_R2(epdComsHandle, Password, completion);
+ uint32_t r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ if (r != 0)
+ goto error;
+ r = EndMfrLogin_R2(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+ token = BeginWriteSensitivities_R2(epdComsHandle, completion, (uint16_t)K1, (uint16_t)K2, (uint16_t)K3, (uint16_t)K4, (uint16_t)K5, (uint16_t)K6);
+ r = Commit(epdComsHandle);
+ if (r != 0)
+ goto error;
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ if (r != 0)
+ goto error;
+ r = EndWriteSensitivities_R2(epdComsHandle, token);
+ if (r != 0)
+ goto error;
+ }
+ return r;
+ error:
+ return r;
+}
+
+WORD MK3::Epd2U::SetSettings()
+{
+ if (port == 0) return 1;
+ int32_t r=0;
+ ECLen = 32;
+
+ ResetEvent(Ev1);
+ token = BeginWriteAccessLevel(epdComsHandle, AccessLevel_t::Admin, EC, ECLen, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteAccessLevel(epdComsHandle, token);
+
+
+ displayIds = new QuickAccessDisplay_t[6]{
+ { 0,0x0021 },
+ { 1,0x0022 },
+ { 2,0x0031 },
+ { 3,0x0032 },
+ { 4,0x0051 },
+ { 5,0x0062 }
+ };
+ numDisplays=6;
+
+
+ //
+ ResetEvent(Ev1);
+ token = BeginWriteQuickAccessDisplays_R3(epdComsHandle, displayIds, 6, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteQuickAccessDisplays_R3(epdComsHandle, token);
+
+ //numItems = 9;
+ //enables = new DisplayAttributeMap_t[9]{
+ // { 0,0xCB03,0xFFFF },
+ // { 1,0xCB03,0xFFE7 },
+ // { 2,0xCB03,0xFFFF },
+ // { 3,0xCB03,0xFFFF },
+ // { 4,0xCB03,0xFE01 },
+ // { 5,0xCB03,0xFFFF },
+ // { 6,0xCB03,0xFFFF },
+ // { 7,0xCB03,0xFFFB },
+ // { 8,0xCB03,0xFFFF }
+ //};
+
+ numItems = 9;
+ enables = new DisplayAttributeMap_t[9]{
+ { 0, 0x5E96, 0xFFFF },
+ { 1, 0x5E96, 0xFFE1 },
+ { 2, 0x5E96, 0xFFFF },
+ { 3, 0x5E96, 0xFF0F },
+ { 4, 0x5E96, 0xFE01 },
+ { 5, 0x5E96, 0xFF03 },
+ { 6, 0x5E96, 0xFFFF },
+ { 7, 0x5E96, 0xFF81 },
+ { 8, 0x5E96, 0xFFFF }
+ };
+
+ ResetEvent(Ev1);
+ token = BeginWriteDisplayEnables_R3(epdComsHandle, enables, numItems, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteDisplayEnables_R3(epdComsHandle, token);
+
+ return r;
+}
+
+WORD MK3::Epd2U::SetChirp(float Sensitivity)
+{
+ uint32_t r = 1;
+ uint8_t enable = 0;
+ if (Sensitivity > 0.001F) {
+ enable = 1;
+ ResetEvent(Ev1);
+ token = BeginWriteChirpSensitivity(epdComsHandle, Sensitivity, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteChirpSensitivity(epdComsHandle, token);
+ }
+
+ token = BeginWriteChirpEnable_R3(epdComsHandle, enable, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndWriteChirpEnable_R3(epdComsHandle, token);
+
+ return r;
+}
+
+WORD MK3::Epd2U::ReadDisplay()
+{
+ uint8_t value; // 001000 0: no trail zero, 0: small rate=1decimal, 1: 2 decimal, 0 µSv, 00 Sv
+ uint8_t onoff;
+ uint8_t dlock;
+ uint8_t enabled;
+ uint8_t locationIndexes[8];
+
+
+ uint8_t menuIds[100];
+
+
+
+ if (port == 0) return 1;
+ byBatADC = bySupplyADC = 0;
+
+ ResetEvent(Ev1);
+ token = BeginReadDisplayOptions(epdComsHandle, completion);
+ uint32_t r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadDisplayOptions(epdComsHandle, token, &value);
+
+ ResetEvent(Ev1);
+ token = BeginReadSwitchOnFromButton_R3(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadSwitchOnFromButton_R3(epdComsHandle, token, &onoff);
+
+
+ ResetEvent(Ev1);
+ token = BeginReadDisplayOptionsLock_R3(epdComsHandle, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadDisplayOptionsLock_R3(epdComsHandle, token, &dlock);
+
+ displayIds = new QuickAccessDisplay_t[20];
+ ResetEvent(Ev1);
+ token = BeginReadQuickAccessDisplays_R3(epdComsHandle, locationIndexes,0, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadQuickAccessDisplays_R3(epdComsHandle, token,displayIds,20,&numDisplays);
+
+ enables = new DisplayAttributeMap_t[20];
+ ResetEvent(Ev1);
+ token = BeginReadDisplayEnables_R3(epdComsHandle, menuIds, 0, completion);
+ r = Commit(epdComsHandle);
+ r = WaitForSingleObject(Ev1, 10000); // no time-out interval
+ r = EndReadDisplayEnables_R3(epdComsHandle, token, enables, 20, &numItems);
+
+
+
+ return CommitRV;
}
\ No newline at end of file
diff --git a/MK3/MK3Base.h b/MK3/MK3Base.h
index 2825203..da94d9d 100644
--- a/MK3/MK3Base.h
+++ b/MK3/MK3Base.h
@@ -1,305 +1,316 @@
-#pragma once
-#pragma unmanaged
-#include
-#include "EpdCommon.h"
-#include "Epd3.h"
-#include "Epd2.h"
-
-#include "TimeFunctions.h"
-
-#define MaxPeakRates 10
-#define MaxSensitivities 10
-#define MaxDoses 4
-#define MaxCounts 6
-#define MaxAlarmConfig 10
-#define MaxTresholds 10
-
-
-namespace MK3
-{
- class Epd2U
- {
- public:
- char comPort[5] = {"COM4"};
- CommsHandle epdComsHandle;
- uint32_t CurrentDeviceID;
- EpdGeneration EpdGen;
- DiscoveryId Epd;
- CompletionToken token;
- WORD port = 3;
- const WORD MaxDevices = 10;
- WORD DeviceCount = 0;
- DWORD DeviceIDs[10];
- //DWORD CurrentDeviceID;
- //WORD AlarmCtrl = 0b01111110;
- WORD AlarmCtrl = 0b01111010; // NO sound
- WORD EndSessionControl = 0b00010010;
- BYTE displayConfig[56] = { 0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
- DWORD EpdClock;
- DWORD RealTime;
- WORD IssueCount;
- DWORD OffTime;
- OpStatusFlags OperatingStatus;
- FaultStatusFlags ErrorStatus;
- AlarmStatusFlags AlarmStatus;
- WORD OtherAlarms;
- WORD EEPROMBadSectors;
-
- WORD CommsInitialized = 0;
- WORD InitRv = 0;
- WORD DiscRV = 0;
- WORD ConRV = 0;
- WORD OpenRV = 0;
- WORD ReadStatusRV = 0;
- WORD CommitRV = 0;
- WORD OffRV = 0;
- WORD OnRV = 0;
- WORD EndSessionRV = 0;
- WORD ReadConfigRV = 0;
- WORD ReadDoseTresholdRV = 0;
- WORD ReadAlarmRateThresholdsRV = 0;
- WORD ReadCalibrationDataRV = 0;
- WORD ReadWearerRV = 0;
- WORD ReadEpdIDRV = 0;
- WORD ReadDosesQualityRV;
- WORD ReadPeaksRV = 0;
-
- WORD ClearDoseRV;
- WORD ClearTotalDoseRV;
- WORD ClearPeakRatesRV;
- WORD DeIssueEpdRV = 0;
-
- WORD WriteAlarmDoseThresholdsRV = 0;
- WORD WriteAlarmRateThresholdsRV = 0;
- WORD WriteWearerNameRV = 0;
-
- WORD IssueEpdRV = 0;
-
- WORD Error = 0;
-
- WORD ErrorSource;
- WORD ErrorReason;
- WORD ErrorData;
-
- //Identification
-
- DWORD EpdID = 0;
- WORD HardVersion;
- WORD SoftVersion;
- WORD FunctionFlags;
-
- EpdTypes EpdType = EpdTypes::Mk2Gamma;
- bool isBG = false;
- SYSTEMTIME tRealTime;
-
- //Wearer
-#define WearerIDLength 12
- BYTE WearerID[(WearerIDLength)+1];
-#define WearerNameLength 22
- BYTE WearerName[WearerNameLength + 1];
-
-
- // Dose
-
- float Hp10Dose;
- float Hp07Dose;
- float Hp10Total;
- float Hp07Total;
- WORD Knocks;
- WORD Resets;
- WORD QualityData;
-
- //Peaks
- float Hp10Peak;
- float Hp07Peak;
- DWORD Hp10Time;
- DWORD Hp07Time;
-
-
- //AlarmDoseTreshold
- float Hp10THDose1;
- float Hp10THDose2;
- float Hp07THDose;
-
- float Hp10Rate1On;
- float Hp10Rate2On;
- float Hp07RateOn;
- float Hp10Rate1Off;
- float Hp10Rate2Off;
- float Hp07RateOff;
-
-
- float K1;
- float K2;
- float K3;
- float K4;
- float K5;
- float K6;
- uint32_t SG;
- uint32_t BC;
- uint32_t FB;
- uint32_t HG;
-
- DWORD D1;
- DWORD D2;
- DWORD D3;
- DWORD D4;
- DWORD CountsClock;
-
- DWORD BaseD1;
- DWORD BaseD2;
- DWORD BaseD3;
- DWORD BaseD4;
- DWORD BaseCountsClock;
-
-
- //Config
- WORD CountDownTime;
- DWORD ReturnTime;
- WORD ChirpRate;
- WORD TeleBaudSetting;
- WORD SelfTestInterval;
- WORD BatteryLoadTestInt;
- WORD GeneralControl;
- WORD CommsTimeout;
- WORD InhibitTimeout;
- WORD MinTxInterval;
- WORD MaxTxIntervals;
- WORD RandomiseWindow;
- WORD DoseIncThresh;
-
- //OperatingStatus
- BYTE DetectorsOn = 0;
- BYTE EPDIssued = 0;
- BYTE EPDLocked = 0;
- BYTE EPDTesting = 0;
- BYTE EPDProcSec = 0;
- BYTE EPDFaulty = 0;
-
-
- //ERrrostatus
- BYTE EPDNewFault = 0;
- BYTE EPDComFault = 0;
- BYTE EPDCalFault = 0;
- BYTE EPDDetFault = 0;
- BYTE EPDEprFault = 0;
- BYTE EPDTrhFault = 0;
- BYTE EPDOthFault = 0;
-
-
- //AlarmStatus
- BYTE AlarmDoseHP101G = 0;
- BYTE AlarmDoseHP102G = 0;
- BYTE AlarmDoseHP07N = 0;
- BYTE AlarmRateHP101G = 0;
- BYTE AlarmRateHP102G = 0;
- BYTE AlarmRateHP07N = 0;
-
- //OtherAlarm
- BYTE OtherAlarmRateHp101G = 0;
- BYTE OtherAlarmRateHp102G = 0;
- BYTE OtherAlarmRateHp07N = 0;
- BYTE OtherAlarmReturn = 0;
- BYTE OtherAlarmBatLow = 0;
- BYTE OtherAlarmCarrier = 0;
- BYTE OtherAlarmBatVolt = 0;
-
-
-
- DWORD Password = 9;
-
-
- BYTE byBatADC;
- BYTE bySupplyADC;
- BYTE byStatus3;
- BYTE byStatus4;
-
- MeasurementId mIDs[MAX_MEASUREMENTS];
- uint8_t nmIDs = 0;
-
- MeasValue_t doses[MaxDoses];
- MeasValue_t totdoses[MaxDoses];
- PeakRate_t peakRates[MaxPeakRates];
- AlarmConfig_t alarmConfig[MaxAlarmConfig];
- CalSensitivity_t sensitivities[MaxSensitivities];
- Counter_t Counts[MaxCounts];
- uint8_t countsRead;
- uint32_t seconds;
- uint8_t numDoses, numtotDoses, numRates, numSensitivities, numTresholds;
- uint16_t numAlarm;
- uint32_t utc;
- Mk3QualityData_t quality;
- Mk3AlarmThresholds_t hp07tresholds;
- Mk3RatePercentage_t RatePct[2];
- Mk3AlarmThresholds_t hp10tresholds;
-
- DetectorThreshold_t dTresholds[MaxTresholds];
- int StartDiscover();
- void Open(DiscoveryId DeviceID);
- void CloseDev();
-
- void DecodeFunctionFlags();
-
- void DecodeStatus();
- void decodeTreshold(Mk3AlarmThresholds_t *th);
- void encodeTreshold(Mk3AlarmThresholds_t* th);
-
- void decodedTresholds(int numdTresholds);
-
-
-
- Epd2U(int comport);
- WORD WriteConfig();
- DWORD StartCom();
- void EndCom();
-
- WORD ReadStatus();
- //WORD EPDReadExtraStatus();
- WORD EPDReadConfig();
- WORD TurnOff();
- WORD TurnOn();
- WORD WriteCal();
- WORD ReadSensitivitiesAndTresholds();
- //WORD ReadTresHolds();
- WORD ReadDoses();
- void decodetotDoses(int count);
- void decodeDoses(int count);
- void decodeSensitivities(int count);
- void decodePeakRates(int count);
- void decodeCounters(int count);
-
- void decodeBaseCounters(int count);
-
- void SetTime();
- WORD ReadAlarmConfig();
- WORD ReadAlarmTresholds();
- WORD WriteAlarmTresholds();
- WORD WriteWearer();
-
- void ClearDoses();
- void ClearAlarms();
-
- WORD PrepareForIssue();
- WORD DeIssue();
- WORD Issue();
-
- ~Epd2U();
-
- StatusData_t epd3status;
- uint8_t counterIds[MaxCounts]; //max 6 for mk3
- uint8_t counterIdLen;
-
- //Voor read counters
-
- WORD EPDReadExtraStatus();
-
-
- //static HANDLE Ev1 ;
- //static Epd2U* current;
- //void WINAPI discovery (CommsHandle hComms, DiscoveryId const discovered[], int32_t count);
- };
-}
-
-
-
-
+#pragma once
+#pragma unmanaged
+#include
+#include "EpdCommon.h"
+#include "Epd3.h"
+#include "Epd2.h"
+
+#include "TimeFunctions.h"
+
+#define MaxPeakRates 10
+#define MaxSensitivities 10
+#define MaxDoses 4
+#define MaxCounts 6
+#define MaxAlarmConfig 10
+#define MaxTresholds 10
+
+
+namespace MK3
+{
+ class Epd2U
+ {
+ public:
+ char comPort[5] = {"COM4"};
+ CommsHandle epdComsHandle;
+ uint32_t CurrentDeviceID;
+ EpdGeneration EpdGen;
+ DiscoveryId Epd;
+ CompletionToken token;
+ WORD port = 3;
+ const WORD MaxDevices = 10;
+ WORD DeviceCount = 0;
+ DWORD DeviceIDs[10];
+ //DWORD CurrentDeviceID;
+ //WORD AlarmCtrl = 0b01111110;
+ WORD AlarmCtrl = 0b01111010; // NO sound
+ WORD EndSessionControl = 0b00010010;
+ BYTE displayConfig[56] = { 0,0,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
+ DWORD EpdClock;
+ DWORD RealTime;
+ WORD IssueCount;
+ DWORD OffTime;
+ OpStatusFlags OperatingStatus;
+ FaultStatusFlags ErrorStatus;
+ AlarmStatusFlags AlarmStatus;
+ WORD OtherAlarms;
+ WORD EEPROMBadSectors;
+
+ WORD CommsInitialized = 0;
+ WORD InitRv = 0;
+ WORD DiscRV = 0;
+ WORD ConRV = 0;
+ WORD OpenRV = 0;
+ WORD ReadStatusRV = 0;
+ WORD CommitRV = 0;
+ WORD OffRV = 0;
+ WORD OnRV = 0;
+ WORD EndSessionRV = 0;
+ WORD ReadConfigRV = 0;
+ WORD ReadDoseTresholdRV = 0;
+ WORD ReadAlarmRateThresholdsRV = 0;
+ WORD ReadCalibrationDataRV = 0;
+ WORD ReadWearerRV = 0;
+ WORD ReadEpdIDRV = 0;
+ WORD ReadDosesQualityRV;
+ WORD ReadPeaksRV = 0;
+
+ WORD ClearDoseRV;
+ WORD ClearTotalDoseRV;
+ WORD ClearPeakRatesRV;
+ WORD DeIssueEpdRV = 0;
+
+ WORD WriteAlarmDoseThresholdsRV = 0;
+ WORD WriteAlarmRateThresholdsRV = 0;
+ WORD WriteWearerNameRV = 0;
+
+ WORD IssueEpdRV = 0;
+
+ WORD Error = 0;
+
+ WORD ErrorSource;
+ WORD ErrorReason;
+ WORD ErrorData;
+
+ //Identification
+
+ DWORD EpdID = 0;
+ WORD HardVersion;
+ WORD SoftVersion;
+ WORD FunctionFlags;
+
+ EpdTypes EpdType = EpdTypes::Mk2Gamma;
+ bool isBG = false;
+ SYSTEMTIME tRealTime;
+
+ //Wearer
+#define WearerIDLength 12
+ BYTE WearerID[(WearerIDLength)+1];
+#define WearerNameLength 22
+ BYTE WearerName[WearerNameLength + 1];
+
+
+ // Dose
+
+ float Hp10Dose;
+ float Hp07Dose;
+ float Hp10Total;
+ float Hp07Total;
+ WORD Knocks;
+ WORD Resets;
+ WORD QualityData;
+
+ //Peaks
+ float Hp10Peak;
+ float Hp07Peak;
+ DWORD Hp10Time;
+ DWORD Hp07Time;
+
+
+ //AlarmDoseTreshold
+ float Hp10THDose1;
+ float Hp10THDose2;
+ float Hp07THDose;
+
+ float Hp10Rate1On;
+ float Hp10Rate2On;
+ float Hp07RateOn;
+ float Hp10Rate1Off;
+ float Hp10Rate2Off;
+ float Hp07RateOff;
+
+
+ float K1;
+ float K2;
+ float K3;
+ float K4;
+ float K5;
+ float K6;
+ uint32_t SG;
+ uint32_t BC;
+ uint32_t FB;
+ uint32_t HG;
+
+ DWORD D1;
+ DWORD D2;
+ DWORD D3;
+ DWORD D4;
+ DWORD CountsClock;
+
+ DWORD BaseD1;
+ DWORD BaseD2;
+ DWORD BaseD3;
+ DWORD BaseD4;
+ DWORD BaseCountsClock;
+
+
+ //Config
+ WORD CountDownTime;
+ DWORD ReturnTime;
+ WORD ChirpRate;
+ WORD TeleBaudSetting;
+ WORD SelfTestInterval;
+ WORD BatteryLoadTestInt;
+ WORD GeneralControl;
+ WORD CommsTimeout;
+ WORD InhibitTimeout;
+ WORD MinTxInterval;
+ WORD MaxTxIntervals;
+ WORD RandomiseWindow;
+ WORD DoseIncThresh;
+
+ //OperatingStatus
+ BYTE DetectorsOn = 0;
+ BYTE EPDIssued = 0;
+ BYTE EPDLocked = 0;
+ BYTE EPDTesting = 0;
+ BYTE EPDProcSec = 0;
+ BYTE EPDFaulty = 0;
+
+
+ //ERrrostatus
+ BYTE EPDNewFault = 0;
+ BYTE EPDComFault = 0;
+ BYTE EPDCalFault = 0;
+ BYTE EPDDetFault = 0;
+ BYTE EPDEprFault = 0;
+ BYTE EPDTrhFault = 0;
+ BYTE EPDOthFault = 0;
+
+
+ //AlarmStatus
+ BYTE AlarmDoseHP101G = 0;
+ BYTE AlarmDoseHP102G = 0;
+ BYTE AlarmDoseHP07N = 0;
+ BYTE AlarmRateHP101G = 0;
+ BYTE AlarmRateHP102G = 0;
+ BYTE AlarmRateHP07N = 0;
+
+ //OtherAlarm
+ BYTE OtherAlarmRateHp101G = 0;
+ BYTE OtherAlarmRateHp102G = 0;
+ BYTE OtherAlarmRateHp07N = 0;
+ BYTE OtherAlarmReturn = 0;
+ BYTE OtherAlarmBatLow = 0;
+ BYTE OtherAlarmCarrier = 0;
+ BYTE OtherAlarmBatVolt = 0;
+
+
+
+ DWORD Password = 9;
+
+
+ BYTE byBatADC;
+ BYTE bySupplyADC;
+ BYTE byStatus3;
+ BYTE byStatus4;
+
+ MeasurementId mIDs[MAX_MEASUREMENTS];
+ uint8_t nmIDs = 0;
+
+ MeasValue_t doses[MaxDoses];
+ MeasValue_t totdoses[MaxDoses];
+ PeakRate_t peakRates[MaxPeakRates];
+ AlarmConfig_t alarmConfig[MaxAlarmConfig];
+ CalSensitivity_t sensitivities[MaxSensitivities];
+ Counter_t Counts[MaxCounts];
+ uint8_t countsRead;
+ uint32_t seconds;
+ uint8_t numDoses, numtotDoses, numRates, numSensitivities, numTresholds;
+ uint16_t numAlarm;
+ uint32_t utc;
+ Mk3QualityData_t quality;
+ Mk3AlarmThresholds_t hp07tresholds;
+ Mk3RatePercentage_t RatePct[2];
+ Mk3AlarmThresholds_t hp10tresholds;
+
+ DetectorThreshold_t dTresholds[MaxTresholds];
+ int StartDiscover();
+ void Open(DiscoveryId DeviceID);
+ void CloseDev();
+
+ void DecodeFunctionFlags();
+
+ void DecodeStatus();
+ void decodeTreshold(Mk3AlarmThresholds_t *th);
+ void encodeTreshold(Mk3AlarmThresholds_t* th);
+
+ void decodedTresholds(int numdTresholds);
+
+
+
+ Epd2U(int comport);
+ WORD WriteConfig();
+ DWORD StartCom();
+ void EndCom();
+
+ WORD ReadStatus();
+ //WORD EPDReadExtraStatus();
+ WORD EPDReadConfig();
+ WORD TurnOff();
+ WORD TurnOn();
+ WORD WriteCal();
+ WORD SetSettings();
+ WORD SetChirp(float Sensitivity);
+ WORD ReadDisplay();
+ WORD ReadSensitivitiesAndTresholds();
+ //WORD ReadTresHolds();
+ WORD ReadDoses();
+ void decodetotDoses(int count);
+ void decodeDoses(int count);
+ void decodeSensitivities(int count);
+ void decodePeakRates(int count);
+ void decodeCounters(int count);
+
+ void decodeBaseCounters(int count);
+
+ void SetTime();
+ WORD ReadAlarmConfig();
+ WORD ReadAlarmTresholds();
+ WORD WriteAlarmTresholds();
+ WORD WriteWearer();
+
+ void ClearDoses();
+ void ClearAlarms();
+
+ WORD PrepareForIssue();
+ WORD DeIssue();
+ WORD Issue();
+
+ ~Epd2U();
+
+ StatusData_t epd3status;
+ uint8_t counterIds[MaxCounts]; //max 6 for mk3
+ uint8_t counterIdLen;
+
+ //Voor read counters
+
+ WORD EPDReadExtraStatus();
+
+
+ DisplayAttributeMap_t *enables;
+ uint8_t numItems;
+
+ QuickAccessDisplay_t *displayIds;
+ uint8_t numDisplays;
+
+ EncryptionKey EC;
+ uint8_t ECLen;
+ //static HANDLE Ev1 ;
+ //static Epd2U* current;
+ //void WINAPI discovery (CommsHandle hComms, DiscoveryId const discovered[], int32_t count);
+ };
+}
+
+
+
+
diff --git a/TestEPD3Dll/Program.cs b/TestEPD3Dll/Program.cs
index 41cae4c..3afd2f5 100644
--- a/TestEPD3Dll/Program.cs
+++ b/TestEPD3Dll/Program.cs
@@ -1,56 +1,65 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-
-namespace TestEPD3Dll
-{
- class Program
- {
- static void Main(string[] args)
- {
-
- DateTime jan1970 = new DateTime(1970, 1, 1);
- var snow = (DateTime.Now - jan1970).TotalSeconds;
- DateTime dt2 = DateTime.Now.AddSeconds(-254246887);
-
- //254245176
- int rv;
- MK3.Epd2 x = new MK3.Epd2(4);
- x.Connect(false);
- //var rv = x.SetTime();
- rv = x.GetStatus();
- //x.ReadAlarmTresholds();
- //rv = x.GetDoses();
- rv = x.SetDeIssued();
-
- x.Connect(false);
-
- //x.WriteCalibration();
- x.Hp07THDose = 1;
- x.Hp10THDose1 = 2;
- x.Hp10THDose2 = 3;
- x.Hp07RateOn = 4;
- x.Hp07RateOff = 5;
- x.Hp10Rate1On = 6;
- x.Hp10Rate1Off = 7;
- x.Hp10Rate2On = 8;
- x.Hp10Rate2Off = 9;
-
-
- //x.AlarmDoseHP07N = 11;
- //x.AlarmDoseHP101G = 12;
- //x.AlarmDoseHP102G = 13;
- //x.AlarmRateHP07N = 14;
- //x.AlarmRateHP101G = 15;
- //x.AlarmRateHP102G = 16;
- x.K3 = 4; x.K4 = 3;
- x.WearerName = "12345678";
- x.WearerID = "12";
- x.SetIssued();
-
- }
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+
+namespace TestEPD3Dll
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+
+ DateTime jan1970 = new DateTime(1970, 1, 1);
+ var snow = (DateTime.Now - jan1970).TotalSeconds;
+ DateTime dt2 = DateTime.Now.AddSeconds(-254246887);
+
+ //254245176
+ int rv;
+ MK3.Epd2 x = new MK3.Epd2(6);
+ x.Connect(false);
+
+ x.ECIn = System.Security.Cryptography.SHA256.Create().ComputeHash(System.Text.Encoding.UTF8.GetBytes("Administrator"));
+ rv= x.SetChirp(5);
+ x.SetSettings();
+
+ x.ReadDisplay(); // ToDo list
+
+
+ //x.Connect(false);
+ ////var rv = x.SetTime();
+ //rv = x.GetStatus();
+ ////x.ReadAlarmTresholds();
+ ////rv = x.GetDoses();
+ //rv = x.SetDeIssued();
+
+ //x.Connect(false);
+
+ ////x.WriteCalibration();
+ //x.Hp07THDose = 1;
+ //x.Hp10THDose1 = 2;
+ //x.Hp10THDose2 = 3;
+ //x.Hp07RateOn = 4;
+ //x.Hp07RateOff = 5;
+ //x.Hp10Rate1On = 6;
+ //x.Hp10Rate1Off = 7;
+ //x.Hp10Rate2On = 8;
+ //x.Hp10Rate2Off = 9;
+
+
+ ////x.AlarmDoseHP07N = 11;
+ ////x.AlarmDoseHP101G = 12;
+ ////x.AlarmDoseHP102G = 13;
+ ////x.AlarmRateHP07N = 14;
+ ////x.AlarmRateHP101G = 15;
+ ////x.AlarmRateHP102G = 16;
+ //x.K3 = 4; x.K4 = 3;
+ //x.WearerName = "12345678";
+ //x.WearerID = "12";
+ //x.SetIssued();
+
+ }
+ }
+}
diff --git a/eDosLocal/UpdateLocal.sql b/eDosLocal/UpdateLocal.sql
index 9d8f051..812dd4b 100644
--- a/eDosLocal/UpdateLocal.sql
+++ b/eDosLocal/UpdateLocal.sql
@@ -331,7 +331,8 @@ go
CREATE OR ALTER PROCEDURE [dbo].[VisitInfo] @EPDVisitID INT = 51905,
@hasExited BIT = 0 OUT,
- @isManualExit BIT = 0 OUT
+ @isManualExit BIT = 0 OUT,
+ @name VARCHAR(100) = NULL OUT
AS
--DECLARE @EPDVisitID INT= 51905
BEGIN
@@ -339,7 +340,8 @@ BEGIN
DECLARE
@ID_Visit INT,
- @ID_Station INT;
+ @ID_Station INT,
+ @PersID INT;
SET @ID_Station = @EPDVisitID % 100;
SET @ID_Visit = @EPDVisitID / 100;
@@ -348,7 +350,8 @@ BEGIN
SELECT
@hasExited = CONVERT(BIT, CASE WHEN [ReturnTime] IS NOT NULL OR [isManualExit] = 1 THEN 1 ELSE 0 END),
- @isManualExit = ISNULL([isManualExit], 0)
+ @isManualExit = ISNULL([isManualExit], 0),
+ @PersID = @PersID
FROM [dbo].[Visit]
WHERE [ID_Visit] = @ID_Visit
AND [ID_Station] = @ID_Station;
@@ -357,8 +360,14 @@ BEGIN
SELECT [hasExited] = @hasExited;
+ SELECT
+ @name = ISNULL([name] + ' ' + ISNULL([callingname], [firstname]), '?')
+ FROM [dbo].[PersonAll]
+ WHERE [persid] = @PersID;
+
RETURN CASE WHEN ISNULL(@hasExited, 0) = 1 THEN 1 ELSE 0 END + CASE WHEN ISNULL(@isManualExit, 0) = 1 THEN 2 ELSE 0 END;
END;
+
GO
GRANT EXECUTE ON [dbo].[VisitInfo] TO [eDosStation];
diff --git a/eDosLocal/Updates.sql b/eDosLocal/Updates.sql
index 7314acb..37ed931 100644
--- a/eDosLocal/Updates.sql
+++ b/eDosLocal/Updates.sql
@@ -20,6 +20,10 @@ GO
IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id=OBJECT_ID('[dbo].[PersonInfoSnapshot]') AND name='isAgent')
ALTER TABLE [dbo].[PersonInfoSnapshot] ADD isAgent BIT NULL;
GO
+--2022-08-24 ChirpRate
+IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id=OBJECT_ID('[dbo].[TaskInfoSnapshot]') AND name='ChirpRate')
+ALTER TABLE [dbo].[TaskInfoSnapshot] ADD ChirpRate REAL NULL;
+GO
ALTER PROCEDURE [dbo].[GetPersonInfo] @CSN CHAR(14) = NULL,
@PersID INT = NULL,
@@ -360,3 +364,41 @@ END;
GO
GRANT EXECUTE ON [syncLoc].[UpdateRemoteReturns] TO [eDosStation];
GO
+--2022-08-24 ChirpRate
+ALTER PROCEDURE [dbo].[GetTaskInfo] @ID_Task INT = NULL, @WorkerDosisMargin FLOAT = NULL AS
+
+--DECLARE @ID_Task INT =5,@WorkerDosisMargin FLOAT=10
+SELECT
+ [t].[ID_Task],
+ [t].[Inst_CODE],
+ [t].[TaskType_CODE],
+ [t].[Task_Name],
+ [t].[TaskDescription],
+ [t].[EPDRad],
+ [t].[ID_AlarmEPD],
+ [t].[TaskDateStart],
+ [t].[TaskDateEnd],
+ [t].[TaskEnable],
+ [t].[ID_FNGainANGain],
+ [t].[Hp10Dose1],
+ [t].[Hp10Dose2],
+ [t].[Hp07Dose],
+ [t].[HP10Rate1ON],
+ [t].[HP10Rate1OFF],
+ [t].[HP10Rate2ON],
+ [t].[HP10Rate2OFF],
+ [t].[HP07RateON],
+ [t].[HP07RateOFF],
+ [t].[FNGain_ANGainValue],
+ [t].[InstallationActivity],
+ [t].[Description],
+ [t].[Inst_CODE],
+ [t].[MinWorkerDosisMargin],
+ [MarginExceeded] = CONVERT(BIT, CASE WHEN @WorkerDosisMargin IS NULL
+ OR [t].[MinWorkerDosisMargin] > @WorkerDosisMargin THEN 1 ELSE 0 END),
+ [ChirpRate] = CONVERT(REAL,ISNULL([t].[ChirpRate],0.0))
+FROM [dbo].[TaskInfoSnapshot] [t]
+WHERE @ID_Task IS NULL
+ OR [t].[ID_Task] = @ID_Task;
+
+go
diff --git a/eDosStation/DataInterface.cs b/eDosStation/DataInterface.cs
index 924d4b5..589d2db 100644
--- a/eDosStation/DataInterface.cs
+++ b/eDosStation/DataInterface.cs
@@ -268,9 +268,9 @@ namespace eDosStation
,new System.Data.SqlClient.SqlParameter("EPDVisitID",SqlDbType.Int,0,System.Data.ParameterDirection.Input,false,0,0,null,System.Data.DataRowVersion.Default,null)
,new System.Data.SqlClient.SqlParameter("hasExited",SqlDbType.Bit,0,System.Data.ParameterDirection.Output,false,0,0,null,System.Data.DataRowVersion.Default,null)
,new System.Data.SqlClient.SqlParameter("isManualExit",SqlDbType.Bit,0,System.Data.ParameterDirection.Output,false,0,0,null,System.Data.DataRowVersion.Default,null)
+ ,new System.Data.SqlClient.SqlParameter("name",SqlDbType.VarChar,100,System.Data.ParameterDirection.Output,true,0,0,null,System.Data.DataRowVersion.Default,null)
});
-
ReverseSyncCommand = new System.Data.SqlClient.SqlCommand("syncLoc.UpdateRemoteReturns", localConnection) { CommandType = System.Data.CommandType.StoredProcedure };
SqlCommandBuilder.DeriveParameters(ReverseSyncCommand);
ReverseSyncCommand.Parameters["@ID_LocalStation"].Value = DBNull.Value;
@@ -281,10 +281,11 @@ namespace eDosStation
if (oldState == ConnectionState.Closed) localConnection.Close();
}
- public int VisitInfo(int EpdVisitID)
+ public int VisitInfo(int EpdVisitID, out string name)
{
int? rv = 0;
const string taskName = "VisitInfo";
+ name = string.Empty;
try
{
VisitInfoCommand.Parameters["EPDVisitID"].Value = EpdVisitID;
@@ -294,6 +295,7 @@ namespace eDosStation
rv = (int?)VisitInfoCommand.Parameters["RETURN_VALUE"].Value;
bool? hasExited = (bool?)VisitInfoCommand.Parameters["hasExited"].Value;
bool? isManualExit = (bool?)VisitInfoCommand.Parameters["isManualExit"].Value;
+ name = (string )VisitInfoCommand.Parameters["name"].Value;
}
catch (System.Exception ex)
{
diff --git a/eDosStation/DataSet1.Designer.cs b/eDosStation/DataSet1.Designer.cs
index 5eaea4e..65a52df 100644
--- a/eDosStation/DataSet1.Designer.cs
+++ b/eDosStation/DataSet1.Designer.cs
@@ -1,4287 +1,4332 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-#pragma warning disable 1591
-
-namespace eDosStation {
-
-
- ///
- ///Represents a strongly typed in-memory cache of data.
- ///
- [global::System.Serializable()]
- [global::System.ComponentModel.DesignerCategoryAttribute("code")]
- [global::System.ComponentModel.ToolboxItem(true)]
- [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
- [global::System.Xml.Serialization.XmlRootAttribute("DataSet1")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
- public partial class DataSet1 : global::System.Data.DataSet {
-
- private GetTaskInfoDataTable tableGetTaskInfo;
-
- private GetTaskListDataTable tableGetTaskList;
-
- private CommentOnEventDataTable tableCommentOnEvent;
-
- private InstallationDataTable tableInstallation;
-
- private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public DataSet1() {
- this.BeginInit();
- this.InitClass();
- global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- base.Tables.CollectionChanged += schemaChangedHandler;
- base.Relations.CollectionChanged += schemaChangedHandler;
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected DataSet1(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
- base(info, context, false) {
- if ((this.IsBinarySerialized(info, context) == true)) {
- this.InitVars(false);
- global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- this.Tables.CollectionChanged += schemaChangedHandler1;
- this.Relations.CollectionChanged += schemaChangedHandler1;
- return;
- }
- string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
- if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
- global::System.Data.DataSet ds = new global::System.Data.DataSet();
- ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
- if ((ds.Tables["GetTaskInfo"] != null)) {
- base.Tables.Add(new GetTaskInfoDataTable(ds.Tables["GetTaskInfo"]));
- }
- if ((ds.Tables["GetTaskList"] != null)) {
- base.Tables.Add(new GetTaskListDataTable(ds.Tables["GetTaskList"]));
- }
- if ((ds.Tables["CommentOnEvent"] != null)) {
- base.Tables.Add(new CommentOnEventDataTable(ds.Tables["CommentOnEvent"]));
- }
- if ((ds.Tables["Installation"] != null)) {
- base.Tables.Add(new InstallationDataTable(ds.Tables["Installation"]));
- }
- this.DataSetName = ds.DataSetName;
- this.Prefix = ds.Prefix;
- this.Namespace = ds.Namespace;
- this.Locale = ds.Locale;
- this.CaseSensitive = ds.CaseSensitive;
- this.EnforceConstraints = ds.EnforceConstraints;
- this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
- this.InitVars();
- }
- else {
- this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
- }
- this.GetSerializationData(info, context);
- global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
- base.Tables.CollectionChanged += schemaChangedHandler;
- this.Relations.CollectionChanged += schemaChangedHandler;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
- public GetTaskInfoDataTable GetTaskInfo {
- get {
- return this.tableGetTaskInfo;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
- public GetTaskListDataTable GetTaskList {
- get {
- return this.tableGetTaskList;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
- public CommentOnEventDataTable CommentOnEvent {
- get {
- return this.tableCommentOnEvent;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
- public InstallationDataTable Installation {
- get {
- return this.tableInstallation;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.BrowsableAttribute(true)]
- [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
- public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
- get {
- return this._schemaSerializationMode;
- }
- set {
- this._schemaSerializationMode = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
- public new global::System.Data.DataTableCollection Tables {
- get {
- return base.Tables;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
- public new global::System.Data.DataRelationCollection Relations {
- get {
- return base.Relations;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void InitializeDerivedDataSet() {
- this.BeginInit();
- this.InitClass();
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public override global::System.Data.DataSet Clone() {
- DataSet1 cln = ((DataSet1)(base.Clone()));
- cln.InitVars();
- cln.SchemaSerializationMode = this.SchemaSerializationMode;
- return cln;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override bool ShouldSerializeTables() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override bool ShouldSerializeRelations() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
- if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
- this.Reset();
- global::System.Data.DataSet ds = new global::System.Data.DataSet();
- ds.ReadXml(reader);
- if ((ds.Tables["GetTaskInfo"] != null)) {
- base.Tables.Add(new GetTaskInfoDataTable(ds.Tables["GetTaskInfo"]));
- }
- if ((ds.Tables["GetTaskList"] != null)) {
- base.Tables.Add(new GetTaskListDataTable(ds.Tables["GetTaskList"]));
- }
- if ((ds.Tables["CommentOnEvent"] != null)) {
- base.Tables.Add(new CommentOnEventDataTable(ds.Tables["CommentOnEvent"]));
- }
- if ((ds.Tables["Installation"] != null)) {
- base.Tables.Add(new InstallationDataTable(ds.Tables["Installation"]));
- }
- this.DataSetName = ds.DataSetName;
- this.Prefix = ds.Prefix;
- this.Namespace = ds.Namespace;
- this.Locale = ds.Locale;
- this.CaseSensitive = ds.CaseSensitive;
- this.EnforceConstraints = ds.EnforceConstraints;
- this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
- this.InitVars();
- }
- else {
- this.ReadXml(reader);
- this.InitVars();
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
- global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
- this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
- stream.Position = 0;
- return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal void InitVars() {
- this.InitVars(true);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal void InitVars(bool initTable) {
- this.tableGetTaskInfo = ((GetTaskInfoDataTable)(base.Tables["GetTaskInfo"]));
- if ((initTable == true)) {
- if ((this.tableGetTaskInfo != null)) {
- this.tableGetTaskInfo.InitVars();
- }
- }
- this.tableGetTaskList = ((GetTaskListDataTable)(base.Tables["GetTaskList"]));
- if ((initTable == true)) {
- if ((this.tableGetTaskList != null)) {
- this.tableGetTaskList.InitVars();
- }
- }
- this.tableCommentOnEvent = ((CommentOnEventDataTable)(base.Tables["CommentOnEvent"]));
- if ((initTable == true)) {
- if ((this.tableCommentOnEvent != null)) {
- this.tableCommentOnEvent.InitVars();
- }
- }
- this.tableInstallation = ((InstallationDataTable)(base.Tables["Installation"]));
- if ((initTable == true)) {
- if ((this.tableInstallation != null)) {
- this.tableInstallation.InitVars();
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitClass() {
- this.DataSetName = "DataSet1";
- this.Prefix = "";
- this.Namespace = "http://tempuri.org/DataSet1.xsd";
- this.EnforceConstraints = true;
- this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
- this.tableGetTaskInfo = new GetTaskInfoDataTable();
- base.Tables.Add(this.tableGetTaskInfo);
- this.tableGetTaskList = new GetTaskListDataTable();
- base.Tables.Add(this.tableGetTaskList);
- this.tableCommentOnEvent = new CommentOnEventDataTable();
- base.Tables.Add(this.tableCommentOnEvent);
- this.tableInstallation = new InstallationDataTable();
- base.Tables.Add(this.tableInstallation);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private bool ShouldSerializeGetTaskInfo() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private bool ShouldSerializeGetTaskList() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private bool ShouldSerializeCommentOnEvent() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private bool ShouldSerializeInstallation() {
- return false;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
- if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
- this.InitVars();
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
- DataSet1 ds = new DataSet1();
- global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
- global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
- global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
- any.Namespace = ds.Namespace;
- sequence.Items.Add(any);
- type.Particle = sequence;
- global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
- if (xs.Contains(dsSchema.TargetNamespace)) {
- global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
- global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
- try {
- global::System.Xml.Schema.XmlSchema schema = null;
- dsSchema.Write(s1);
- for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
- schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
- s2.SetLength(0);
- schema.Write(s2);
- if ((s1.Length == s2.Length)) {
- s1.Position = 0;
- s2.Position = 0;
- for (; ((s1.Position != s1.Length)
- && (s1.ReadByte() == s2.ReadByte())); ) {
- ;
- }
- if ((s1.Position == s1.Length)) {
- return type;
- }
- }
- }
- }
- finally {
- if ((s1 != null)) {
- s1.Close();
- }
- if ((s2 != null)) {
- s2.Close();
- }
- }
- }
- xs.Add(dsSchema);
- return type;
- }
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public delegate void GetTaskInfoRowChangeEventHandler(object sender, GetTaskInfoRowChangeEvent e);
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public delegate void GetTaskListRowChangeEventHandler(object sender, GetTaskListRowChangeEvent e);
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public delegate void CommentOnEventRowChangeEventHandler(object sender, CommentOnEventRowChangeEvent e);
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public delegate void InstallationRowChangeEventHandler(object sender, InstallationRowChangeEvent e);
-
- ///
- ///Represents the strongly named DataTable class.
- ///
- [global::System.Serializable()]
- [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
- public partial class GetTaskInfoDataTable : global::System.Data.TypedTableBase {
-
- private global::System.Data.DataColumn columnID_Task;
-
- private global::System.Data.DataColumn columnInst_CODE;
-
- private global::System.Data.DataColumn columnTaskType_CODE;
-
- private global::System.Data.DataColumn columnTask_Name;
-
- private global::System.Data.DataColumn columnTaskDescription;
-
- private global::System.Data.DataColumn columnEPDRad;
-
- private global::System.Data.DataColumn columnID_AlarmEPD;
-
- private global::System.Data.DataColumn columnTaskDateStart;
-
- private global::System.Data.DataColumn columnTaskDateEnd;
-
- private global::System.Data.DataColumn columnTaskEnable;
-
- private global::System.Data.DataColumn columnID_FNGainANGain;
-
- private global::System.Data.DataColumn columnHp10Dose1;
-
- private global::System.Data.DataColumn columnHp10Dose2;
-
- private global::System.Data.DataColumn columnHp07Dose;
-
- private global::System.Data.DataColumn columnHP10Rate1ON;
-
- private global::System.Data.DataColumn columnHP10Rate1OFF;
-
- private global::System.Data.DataColumn columnHP10Rate2ON;
-
- private global::System.Data.DataColumn columnHP10Rate2OFF;
-
- private global::System.Data.DataColumn columnHP07RateON;
-
- private global::System.Data.DataColumn columnHP07RateOFF;
-
- private global::System.Data.DataColumn columnFNGain_ANGainValue;
-
- private global::System.Data.DataColumn columnInstallationActivity;
-
- private global::System.Data.DataColumn columnDescription;
-
- private global::System.Data.DataColumn columnInst_CODE1;
-
- private global::System.Data.DataColumn columnMinWorkerDosisMargin;
-
- private global::System.Data.DataColumn columnMarginExceeded;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoDataTable() {
- this.TableName = "GetTaskInfo";
- this.BeginInit();
- this.InitClass();
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal GetTaskInfoDataTable(global::System.Data.DataTable table) {
- this.TableName = table.TableName;
- if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
- this.CaseSensitive = table.CaseSensitive;
- }
- if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
- this.Locale = table.Locale;
- }
- if ((table.Namespace != table.DataSet.Namespace)) {
- this.Namespace = table.Namespace;
- }
- this.Prefix = table.Prefix;
- this.MinimumCapacity = table.MinimumCapacity;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected GetTaskInfoDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
- base(info, context) {
- this.InitVars();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn ID_TaskColumn {
- get {
- return this.columnID_Task;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Inst_CODEColumn {
- get {
- return this.columnInst_CODE;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TaskType_CODEColumn {
- get {
- return this.columnTaskType_CODE;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Task_NameColumn {
- get {
- return this.columnTask_Name;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TaskDescriptionColumn {
- get {
- return this.columnTaskDescription;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn EPDRadColumn {
- get {
- return this.columnEPDRad;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn ID_AlarmEPDColumn {
- get {
- return this.columnID_AlarmEPD;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TaskDateStartColumn {
- get {
- return this.columnTaskDateStart;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TaskDateEndColumn {
- get {
- return this.columnTaskDateEnd;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TaskEnableColumn {
- get {
- return this.columnTaskEnable;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn ID_FNGainANGainColumn {
- get {
- return this.columnID_FNGainANGain;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Hp10Dose1Column {
- get {
- return this.columnHp10Dose1;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Hp10Dose2Column {
- get {
- return this.columnHp10Dose2;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Hp07DoseColumn {
- get {
- return this.columnHp07Dose;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn HP10Rate1ONColumn {
- get {
- return this.columnHP10Rate1ON;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn HP10Rate1OFFColumn {
- get {
- return this.columnHP10Rate1OFF;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn HP10Rate2ONColumn {
- get {
- return this.columnHP10Rate2ON;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn HP10Rate2OFFColumn {
- get {
- return this.columnHP10Rate2OFF;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn HP07RateONColumn {
- get {
- return this.columnHP07RateON;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn HP07RateOFFColumn {
- get {
- return this.columnHP07RateOFF;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn FNGain_ANGainValueColumn {
- get {
- return this.columnFNGain_ANGainValue;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn InstallationActivityColumn {
- get {
- return this.columnInstallationActivity;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn DescriptionColumn {
- get {
- return this.columnDescription;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Inst_CODE1Column {
- get {
- return this.columnInst_CODE1;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn MinWorkerDosisMarginColumn {
- get {
- return this.columnMinWorkerDosisMargin;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn MarginExceededColumn {
- get {
- return this.columnMarginExceeded;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- public int Count {
- get {
- return this.Rows.Count;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoRow this[int index] {
- get {
- return ((GetTaskInfoRow)(this.Rows[index]));
- }
- }
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskInfoRowChangeEventHandler GetTaskInfoRowChanging;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskInfoRowChangeEventHandler GetTaskInfoRowChanged;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskInfoRowChangeEventHandler GetTaskInfoRowDeleting;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskInfoRowChangeEventHandler GetTaskInfoRowDeleted;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void AddGetTaskInfoRow(GetTaskInfoRow row) {
- this.Rows.Add(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoRow AddGetTaskInfoRow(
- int Inst_CODE,
- int TaskType_CODE,
- string Task_Name,
- string TaskDescription,
- string EPDRad,
- int ID_AlarmEPD,
- System.DateTime TaskDateStart,
- System.DateTime TaskDateEnd,
- bool TaskEnable,
- int ID_FNGainANGain,
- double Hp10Dose1,
- double Hp10Dose2,
- double Hp07Dose,
- double HP10Rate1ON,
- double HP10Rate1OFF,
- double HP10Rate2ON,
- double HP10Rate2OFF,
- double HP07RateON,
- double HP07RateOFF,
- double FNGain_ANGainValue,
- string InstallationActivity,
- string Description,
- int Inst_CODE1,
- double MinWorkerDosisMargin,
- bool MarginExceeded) {
- GetTaskInfoRow rowGetTaskInfoRow = ((GetTaskInfoRow)(this.NewRow()));
- object[] columnValuesArray = new object[] {
- null,
- Inst_CODE,
- TaskType_CODE,
- Task_Name,
- TaskDescription,
- EPDRad,
- ID_AlarmEPD,
- TaskDateStart,
- TaskDateEnd,
- TaskEnable,
- ID_FNGainANGain,
- Hp10Dose1,
- Hp10Dose2,
- Hp07Dose,
- HP10Rate1ON,
- HP10Rate1OFF,
- HP10Rate2ON,
- HP10Rate2OFF,
- HP07RateON,
- HP07RateOFF,
- FNGain_ANGainValue,
- InstallationActivity,
- Description,
- Inst_CODE1,
- MinWorkerDosisMargin,
- MarginExceeded};
- rowGetTaskInfoRow.ItemArray = columnValuesArray;
- this.Rows.Add(rowGetTaskInfoRow);
- return rowGetTaskInfoRow;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoRow FindByID_Task(int ID_Task) {
- return ((GetTaskInfoRow)(this.Rows.Find(new object[] {
- ID_Task})));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public override global::System.Data.DataTable Clone() {
- GetTaskInfoDataTable cln = ((GetTaskInfoDataTable)(base.Clone()));
- cln.InitVars();
- return cln;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataTable CreateInstance() {
- return new GetTaskInfoDataTable();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal void InitVars() {
- this.columnID_Task = base.Columns["ID_Task"];
- this.columnInst_CODE = base.Columns["Inst_CODE"];
- this.columnTaskType_CODE = base.Columns["TaskType_CODE"];
- this.columnTask_Name = base.Columns["Task_Name"];
- this.columnTaskDescription = base.Columns["TaskDescription"];
- this.columnEPDRad = base.Columns["EPDRad"];
- this.columnID_AlarmEPD = base.Columns["ID_AlarmEPD"];
- this.columnTaskDateStart = base.Columns["TaskDateStart"];
- this.columnTaskDateEnd = base.Columns["TaskDateEnd"];
- this.columnTaskEnable = base.Columns["TaskEnable"];
- this.columnID_FNGainANGain = base.Columns["ID_FNGainANGain"];
- this.columnHp10Dose1 = base.Columns["Hp10Dose1"];
- this.columnHp10Dose2 = base.Columns["Hp10Dose2"];
- this.columnHp07Dose = base.Columns["Hp07Dose"];
- this.columnHP10Rate1ON = base.Columns["HP10Rate1ON"];
- this.columnHP10Rate1OFF = base.Columns["HP10Rate1OFF"];
- this.columnHP10Rate2ON = base.Columns["HP10Rate2ON"];
- this.columnHP10Rate2OFF = base.Columns["HP10Rate2OFF"];
- this.columnHP07RateON = base.Columns["HP07RateON"];
- this.columnHP07RateOFF = base.Columns["HP07RateOFF"];
- this.columnFNGain_ANGainValue = base.Columns["FNGain_ANGainValue"];
- this.columnInstallationActivity = base.Columns["InstallationActivity"];
- this.columnDescription = base.Columns["Description"];
- this.columnInst_CODE1 = base.Columns["Inst_CODE1"];
- this.columnMinWorkerDosisMargin = base.Columns["MinWorkerDosisMargin"];
- this.columnMarginExceeded = base.Columns["MarginExceeded"];
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitClass() {
- this.columnID_Task = new global::System.Data.DataColumn("ID_Task", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnID_Task);
- this.columnInst_CODE = new global::System.Data.DataColumn("Inst_CODE", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnInst_CODE);
- this.columnTaskType_CODE = new global::System.Data.DataColumn("TaskType_CODE", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTaskType_CODE);
- this.columnTask_Name = new global::System.Data.DataColumn("Task_Name", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTask_Name);
- this.columnTaskDescription = new global::System.Data.DataColumn("TaskDescription", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTaskDescription);
- this.columnEPDRad = new global::System.Data.DataColumn("EPDRad", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnEPDRad);
- this.columnID_AlarmEPD = new global::System.Data.DataColumn("ID_AlarmEPD", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnID_AlarmEPD);
- this.columnTaskDateStart = new global::System.Data.DataColumn("TaskDateStart", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTaskDateStart);
- this.columnTaskDateEnd = new global::System.Data.DataColumn("TaskDateEnd", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTaskDateEnd);
- this.columnTaskEnable = new global::System.Data.DataColumn("TaskEnable", typeof(bool), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTaskEnable);
- this.columnID_FNGainANGain = new global::System.Data.DataColumn("ID_FNGainANGain", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnID_FNGainANGain);
- this.columnHp10Dose1 = new global::System.Data.DataColumn("Hp10Dose1", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHp10Dose1);
- this.columnHp10Dose2 = new global::System.Data.DataColumn("Hp10Dose2", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHp10Dose2);
- this.columnHp07Dose = new global::System.Data.DataColumn("Hp07Dose", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHp07Dose);
- this.columnHP10Rate1ON = new global::System.Data.DataColumn("HP10Rate1ON", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHP10Rate1ON);
- this.columnHP10Rate1OFF = new global::System.Data.DataColumn("HP10Rate1OFF", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHP10Rate1OFF);
- this.columnHP10Rate2ON = new global::System.Data.DataColumn("HP10Rate2ON", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHP10Rate2ON);
- this.columnHP10Rate2OFF = new global::System.Data.DataColumn("HP10Rate2OFF", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHP10Rate2OFF);
- this.columnHP07RateON = new global::System.Data.DataColumn("HP07RateON", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHP07RateON);
- this.columnHP07RateOFF = new global::System.Data.DataColumn("HP07RateOFF", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnHP07RateOFF);
- this.columnFNGain_ANGainValue = new global::System.Data.DataColumn("FNGain_ANGainValue", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnFNGain_ANGainValue);
- this.columnInstallationActivity = new global::System.Data.DataColumn("InstallationActivity", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnInstallationActivity);
- this.columnDescription = new global::System.Data.DataColumn("Description", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnDescription);
- this.columnInst_CODE1 = new global::System.Data.DataColumn("Inst_CODE1", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnInst_CODE1);
- this.columnMinWorkerDosisMargin = new global::System.Data.DataColumn("MinWorkerDosisMargin", typeof(double), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnMinWorkerDosisMargin);
- this.columnMarginExceeded = new global::System.Data.DataColumn("MarginExceeded", typeof(bool), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnMarginExceeded);
- this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
- this.columnID_Task}, true));
- this.columnID_Task.AutoIncrement = true;
- this.columnID_Task.AutoIncrementSeed = -1;
- this.columnID_Task.AutoIncrementStep = -1;
- this.columnID_Task.AllowDBNull = false;
- this.columnID_Task.ReadOnly = true;
- this.columnID_Task.Unique = true;
- this.columnTask_Name.MaxLength = 2147483647;
- this.columnTaskDescription.AllowDBNull = false;
- this.columnTaskDescription.ReadOnly = true;
- this.columnTaskDescription.MaxLength = 50;
- this.columnEPDRad.AllowDBNull = false;
- this.columnEPDRad.MaxLength = 2;
- this.columnInstallationActivity.MaxLength = 100;
- this.columnDescription.MaxLength = 500;
- this.columnMarginExceeded.ReadOnly = true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoRow NewGetTaskInfoRow() {
- return ((GetTaskInfoRow)(this.NewRow()));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
- return new GetTaskInfoRow(builder);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Type GetRowType() {
- return typeof(GetTaskInfoRow);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanged(e);
- if ((this.GetTaskInfoRowChanged != null)) {
- this.GetTaskInfoRowChanged(this, new GetTaskInfoRowChangeEvent(((GetTaskInfoRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanging(e);
- if ((this.GetTaskInfoRowChanging != null)) {
- this.GetTaskInfoRowChanging(this, new GetTaskInfoRowChangeEvent(((GetTaskInfoRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleted(e);
- if ((this.GetTaskInfoRowDeleted != null)) {
- this.GetTaskInfoRowDeleted(this, new GetTaskInfoRowChangeEvent(((GetTaskInfoRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleting(e);
- if ((this.GetTaskInfoRowDeleting != null)) {
- this.GetTaskInfoRowDeleting(this, new GetTaskInfoRowChangeEvent(((GetTaskInfoRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void RemoveGetTaskInfoRow(GetTaskInfoRow row) {
- this.Rows.Remove(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
- global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
- global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
- DataSet1 ds = new DataSet1();
- global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
- any1.Namespace = "http://www.w3.org/2001/XMLSchema";
- any1.MinOccurs = new decimal(0);
- any1.MaxOccurs = decimal.MaxValue;
- any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any1);
- global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
- any2.MinOccurs = new decimal(1);
- any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any2);
- global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute1.Name = "namespace";
- attribute1.FixedValue = ds.Namespace;
- type.Attributes.Add(attribute1);
- global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute2.Name = "tableTypeName";
- attribute2.FixedValue = "GetTaskInfoDataTable";
- type.Attributes.Add(attribute2);
- type.Particle = sequence;
- global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
- if (xs.Contains(dsSchema.TargetNamespace)) {
- global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
- global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
- try {
- global::System.Xml.Schema.XmlSchema schema = null;
- dsSchema.Write(s1);
- for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
- schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
- s2.SetLength(0);
- schema.Write(s2);
- if ((s1.Length == s2.Length)) {
- s1.Position = 0;
- s2.Position = 0;
- for (; ((s1.Position != s1.Length)
- && (s1.ReadByte() == s2.ReadByte())); ) {
- ;
- }
- if ((s1.Position == s1.Length)) {
- return type;
- }
- }
- }
- }
- finally {
- if ((s1 != null)) {
- s1.Close();
- }
- if ((s2 != null)) {
- s2.Close();
- }
- }
- }
- xs.Add(dsSchema);
- return type;
- }
- }
-
- ///
- ///Represents the strongly named DataTable class.
- ///
- [global::System.Serializable()]
- [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
- public partial class GetTaskListDataTable : global::System.Data.TypedTableBase {
-
- private global::System.Data.DataColumn columnID_Task;
-
- private global::System.Data.DataColumn columnInst_CODE;
-
- private global::System.Data.DataColumn columnTaskType_CODE;
-
- private global::System.Data.DataColumn columnTask_Name;
-
- private global::System.Data.DataColumn columnTaskDescription;
-
- private global::System.Data.DataColumn columnEPDRad;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListDataTable() {
- this.TableName = "GetTaskList";
- this.BeginInit();
- this.InitClass();
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal GetTaskListDataTable(global::System.Data.DataTable table) {
- this.TableName = table.TableName;
- if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
- this.CaseSensitive = table.CaseSensitive;
- }
- if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
- this.Locale = table.Locale;
- }
- if ((table.Namespace != table.DataSet.Namespace)) {
- this.Namespace = table.Namespace;
- }
- this.Prefix = table.Prefix;
- this.MinimumCapacity = table.MinimumCapacity;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected GetTaskListDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
- base(info, context) {
- this.InitVars();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn ID_TaskColumn {
- get {
- return this.columnID_Task;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Inst_CODEColumn {
- get {
- return this.columnInst_CODE;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TaskType_CODEColumn {
- get {
- return this.columnTaskType_CODE;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Task_NameColumn {
- get {
- return this.columnTask_Name;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TaskDescriptionColumn {
- get {
- return this.columnTaskDescription;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn EPDRadColumn {
- get {
- return this.columnEPDRad;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- public int Count {
- get {
- return this.Rows.Count;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListRow this[int index] {
- get {
- return ((GetTaskListRow)(this.Rows[index]));
- }
- }
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskListRowChangeEventHandler GetTaskListRowChanging;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskListRowChangeEventHandler GetTaskListRowChanged;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskListRowChangeEventHandler GetTaskListRowDeleting;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event GetTaskListRowChangeEventHandler GetTaskListRowDeleted;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void AddGetTaskListRow(GetTaskListRow row) {
- this.Rows.Add(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListRow AddGetTaskListRow(int Inst_CODE, int TaskType_CODE, string Task_Name, string TaskDescription, string EPDRad) {
- GetTaskListRow rowGetTaskListRow = ((GetTaskListRow)(this.NewRow()));
- object[] columnValuesArray = new object[] {
- null,
- Inst_CODE,
- TaskType_CODE,
- Task_Name,
- TaskDescription,
- EPDRad};
- rowGetTaskListRow.ItemArray = columnValuesArray;
- this.Rows.Add(rowGetTaskListRow);
- return rowGetTaskListRow;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListRow FindByID_Task(int ID_Task) {
- return ((GetTaskListRow)(this.Rows.Find(new object[] {
- ID_Task})));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public override global::System.Data.DataTable Clone() {
- GetTaskListDataTable cln = ((GetTaskListDataTable)(base.Clone()));
- cln.InitVars();
- return cln;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataTable CreateInstance() {
- return new GetTaskListDataTable();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal void InitVars() {
- this.columnID_Task = base.Columns["ID_Task"];
- this.columnInst_CODE = base.Columns["Inst_CODE"];
- this.columnTaskType_CODE = base.Columns["TaskType_CODE"];
- this.columnTask_Name = base.Columns["Task_Name"];
- this.columnTaskDescription = base.Columns["TaskDescription"];
- this.columnEPDRad = base.Columns["EPDRad"];
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitClass() {
- this.columnID_Task = new global::System.Data.DataColumn("ID_Task", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnID_Task);
- this.columnInst_CODE = new global::System.Data.DataColumn("Inst_CODE", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnInst_CODE);
- this.columnTaskType_CODE = new global::System.Data.DataColumn("TaskType_CODE", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTaskType_CODE);
- this.columnTask_Name = new global::System.Data.DataColumn("Task_Name", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTask_Name);
- this.columnTaskDescription = new global::System.Data.DataColumn("TaskDescription", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTaskDescription);
- this.columnEPDRad = new global::System.Data.DataColumn("EPDRad", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnEPDRad);
- this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
- this.columnID_Task}, true));
- this.columnID_Task.AutoIncrement = true;
- this.columnID_Task.AutoIncrementSeed = -1;
- this.columnID_Task.AutoIncrementStep = -1;
- this.columnID_Task.AllowDBNull = false;
- this.columnID_Task.ReadOnly = true;
- this.columnID_Task.Unique = true;
- this.columnTask_Name.MaxLength = 2147483647;
- this.columnTaskDescription.AllowDBNull = false;
- this.columnTaskDescription.ReadOnly = true;
- this.columnTaskDescription.MaxLength = 50;
- this.columnEPDRad.AllowDBNull = false;
- this.columnEPDRad.MaxLength = 2;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListRow NewGetTaskListRow() {
- return ((GetTaskListRow)(this.NewRow()));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
- return new GetTaskListRow(builder);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Type GetRowType() {
- return typeof(GetTaskListRow);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanged(e);
- if ((this.GetTaskListRowChanged != null)) {
- this.GetTaskListRowChanged(this, new GetTaskListRowChangeEvent(((GetTaskListRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanging(e);
- if ((this.GetTaskListRowChanging != null)) {
- this.GetTaskListRowChanging(this, new GetTaskListRowChangeEvent(((GetTaskListRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleted(e);
- if ((this.GetTaskListRowDeleted != null)) {
- this.GetTaskListRowDeleted(this, new GetTaskListRowChangeEvent(((GetTaskListRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleting(e);
- if ((this.GetTaskListRowDeleting != null)) {
- this.GetTaskListRowDeleting(this, new GetTaskListRowChangeEvent(((GetTaskListRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void RemoveGetTaskListRow(GetTaskListRow row) {
- this.Rows.Remove(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
- global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
- global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
- DataSet1 ds = new DataSet1();
- global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
- any1.Namespace = "http://www.w3.org/2001/XMLSchema";
- any1.MinOccurs = new decimal(0);
- any1.MaxOccurs = decimal.MaxValue;
- any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any1);
- global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
- any2.MinOccurs = new decimal(1);
- any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any2);
- global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute1.Name = "namespace";
- attribute1.FixedValue = ds.Namespace;
- type.Attributes.Add(attribute1);
- global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute2.Name = "tableTypeName";
- attribute2.FixedValue = "GetTaskListDataTable";
- type.Attributes.Add(attribute2);
- type.Particle = sequence;
- global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
- if (xs.Contains(dsSchema.TargetNamespace)) {
- global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
- global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
- try {
- global::System.Xml.Schema.XmlSchema schema = null;
- dsSchema.Write(s1);
- for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
- schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
- s2.SetLength(0);
- schema.Write(s2);
- if ((s1.Length == s2.Length)) {
- s1.Position = 0;
- s2.Position = 0;
- for (; ((s1.Position != s1.Length)
- && (s1.ReadByte() == s2.ReadByte())); ) {
- ;
- }
- if ((s1.Position == s1.Length)) {
- return type;
- }
- }
- }
- }
- finally {
- if ((s1 != null)) {
- s1.Close();
- }
- if ((s2 != null)) {
- s2.Close();
- }
- }
- }
- xs.Add(dsSchema);
- return type;
- }
- }
-
- ///
- ///Represents the strongly named DataTable class.
- ///
- [global::System.Serializable()]
- [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
- public partial class CommentOnEventDataTable : global::System.Data.TypedTableBase {
-
- private global::System.Data.DataColumn columnID_CommnentOnEvent;
-
- private global::System.Data.DataColumn columnTriggerTable;
-
- private global::System.Data.DataColumn columnTriggerField;
-
- private global::System.Data.DataColumn columnTriggerStatus;
-
- private global::System.Data.DataColumn columnComment_FR;
-
- private global::System.Data.DataColumn columnComment_NL;
-
- private global::System.Data.DataColumn columnComment_EN;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventDataTable() {
- this.TableName = "CommentOnEvent";
- this.BeginInit();
- this.InitClass();
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal CommentOnEventDataTable(global::System.Data.DataTable table) {
- this.TableName = table.TableName;
- if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
- this.CaseSensitive = table.CaseSensitive;
- }
- if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
- this.Locale = table.Locale;
- }
- if ((table.Namespace != table.DataSet.Namespace)) {
- this.Namespace = table.Namespace;
- }
- this.Prefix = table.Prefix;
- this.MinimumCapacity = table.MinimumCapacity;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected CommentOnEventDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
- base(info, context) {
- this.InitVars();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn ID_CommnentOnEventColumn {
- get {
- return this.columnID_CommnentOnEvent;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TriggerTableColumn {
- get {
- return this.columnTriggerTable;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TriggerFieldColumn {
- get {
- return this.columnTriggerField;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn TriggerStatusColumn {
- get {
- return this.columnTriggerStatus;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Comment_FRColumn {
- get {
- return this.columnComment_FR;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Comment_NLColumn {
- get {
- return this.columnComment_NL;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Comment_ENColumn {
- get {
- return this.columnComment_EN;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- public int Count {
- get {
- return this.Rows.Count;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventRow this[int index] {
- get {
- return ((CommentOnEventRow)(this.Rows[index]));
- }
- }
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event CommentOnEventRowChangeEventHandler CommentOnEventRowChanging;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event CommentOnEventRowChangeEventHandler CommentOnEventRowChanged;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event CommentOnEventRowChangeEventHandler CommentOnEventRowDeleting;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event CommentOnEventRowChangeEventHandler CommentOnEventRowDeleted;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void AddCommentOnEventRow(CommentOnEventRow row) {
- this.Rows.Add(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventRow AddCommentOnEventRow(string TriggerTable, string TriggerField, bool TriggerStatus, string Comment_FR, string Comment_NL, string Comment_EN) {
- CommentOnEventRow rowCommentOnEventRow = ((CommentOnEventRow)(this.NewRow()));
- object[] columnValuesArray = new object[] {
- null,
- TriggerTable,
- TriggerField,
- TriggerStatus,
- Comment_FR,
- Comment_NL,
- Comment_EN};
- rowCommentOnEventRow.ItemArray = columnValuesArray;
- this.Rows.Add(rowCommentOnEventRow);
- return rowCommentOnEventRow;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventRow FindByID_CommnentOnEvent(int ID_CommnentOnEvent) {
- return ((CommentOnEventRow)(this.Rows.Find(new object[] {
- ID_CommnentOnEvent})));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public override global::System.Data.DataTable Clone() {
- CommentOnEventDataTable cln = ((CommentOnEventDataTable)(base.Clone()));
- cln.InitVars();
- return cln;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataTable CreateInstance() {
- return new CommentOnEventDataTable();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal void InitVars() {
- this.columnID_CommnentOnEvent = base.Columns["ID_CommnentOnEvent"];
- this.columnTriggerTable = base.Columns["TriggerTable"];
- this.columnTriggerField = base.Columns["TriggerField"];
- this.columnTriggerStatus = base.Columns["TriggerStatus"];
- this.columnComment_FR = base.Columns["Comment_FR"];
- this.columnComment_NL = base.Columns["Comment_NL"];
- this.columnComment_EN = base.Columns["Comment_EN"];
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitClass() {
- this.columnID_CommnentOnEvent = new global::System.Data.DataColumn("ID_CommnentOnEvent", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnID_CommnentOnEvent);
- this.columnTriggerTable = new global::System.Data.DataColumn("TriggerTable", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTriggerTable);
- this.columnTriggerField = new global::System.Data.DataColumn("TriggerField", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTriggerField);
- this.columnTriggerStatus = new global::System.Data.DataColumn("TriggerStatus", typeof(bool), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnTriggerStatus);
- this.columnComment_FR = new global::System.Data.DataColumn("Comment_FR", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnComment_FR);
- this.columnComment_NL = new global::System.Data.DataColumn("Comment_NL", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnComment_NL);
- this.columnComment_EN = new global::System.Data.DataColumn("Comment_EN", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnComment_EN);
- this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
- this.columnID_CommnentOnEvent}, true));
- this.columnID_CommnentOnEvent.AutoIncrement = true;
- this.columnID_CommnentOnEvent.AutoIncrementSeed = -1;
- this.columnID_CommnentOnEvent.AutoIncrementStep = -1;
- this.columnID_CommnentOnEvent.AllowDBNull = false;
- this.columnID_CommnentOnEvent.ReadOnly = true;
- this.columnID_CommnentOnEvent.Unique = true;
- this.columnTriggerTable.MaxLength = 100;
- this.columnTriggerField.MaxLength = 100;
- this.columnComment_FR.MaxLength = 5000;
- this.columnComment_NL.MaxLength = 5000;
- this.columnComment_EN.MaxLength = 5000;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventRow NewCommentOnEventRow() {
- return ((CommentOnEventRow)(this.NewRow()));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
- return new CommentOnEventRow(builder);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Type GetRowType() {
- return typeof(CommentOnEventRow);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanged(e);
- if ((this.CommentOnEventRowChanged != null)) {
- this.CommentOnEventRowChanged(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanging(e);
- if ((this.CommentOnEventRowChanging != null)) {
- this.CommentOnEventRowChanging(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleted(e);
- if ((this.CommentOnEventRowDeleted != null)) {
- this.CommentOnEventRowDeleted(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleting(e);
- if ((this.CommentOnEventRowDeleting != null)) {
- this.CommentOnEventRowDeleting(this, new CommentOnEventRowChangeEvent(((CommentOnEventRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void RemoveCommentOnEventRow(CommentOnEventRow row) {
- this.Rows.Remove(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
- global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
- global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
- DataSet1 ds = new DataSet1();
- global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
- any1.Namespace = "http://www.w3.org/2001/XMLSchema";
- any1.MinOccurs = new decimal(0);
- any1.MaxOccurs = decimal.MaxValue;
- any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any1);
- global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
- any2.MinOccurs = new decimal(1);
- any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any2);
- global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute1.Name = "namespace";
- attribute1.FixedValue = ds.Namespace;
- type.Attributes.Add(attribute1);
- global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute2.Name = "tableTypeName";
- attribute2.FixedValue = "CommentOnEventDataTable";
- type.Attributes.Add(attribute2);
- type.Particle = sequence;
- global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
- if (xs.Contains(dsSchema.TargetNamespace)) {
- global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
- global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
- try {
- global::System.Xml.Schema.XmlSchema schema = null;
- dsSchema.Write(s1);
- for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
- schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
- s2.SetLength(0);
- schema.Write(s2);
- if ((s1.Length == s2.Length)) {
- s1.Position = 0;
- s2.Position = 0;
- for (; ((s1.Position != s1.Length)
- && (s1.ReadByte() == s2.ReadByte())); ) {
- ;
- }
- if ((s1.Position == s1.Length)) {
- return type;
- }
- }
- }
- }
- finally {
- if ((s1 != null)) {
- s1.Close();
- }
- if ((s2 != null)) {
- s2.Close();
- }
- }
- }
- xs.Add(dsSchema);
- return type;
- }
- }
-
- ///
- ///Represents the strongly named DataTable class.
- ///
- [global::System.Serializable()]
- [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
- public partial class InstallationDataTable : global::System.Data.TypedTableBase {
-
- private global::System.Data.DataColumn columnInst_CODE;
-
- private global::System.Data.DataColumn columnInstallationName;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public InstallationDataTable() {
- this.TableName = "Installation";
- this.BeginInit();
- this.InitClass();
- this.EndInit();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal InstallationDataTable(global::System.Data.DataTable table) {
- this.TableName = table.TableName;
- if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
- this.CaseSensitive = table.CaseSensitive;
- }
- if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
- this.Locale = table.Locale;
- }
- if ((table.Namespace != table.DataSet.Namespace)) {
- this.Namespace = table.Namespace;
- }
- this.Prefix = table.Prefix;
- this.MinimumCapacity = table.MinimumCapacity;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected InstallationDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
- base(info, context) {
- this.InitVars();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn Inst_CODEColumn {
- get {
- return this.columnInst_CODE;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataColumn InstallationNameColumn {
- get {
- return this.columnInstallationName;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- public int Count {
- get {
- return this.Rows.Count;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public InstallationRow this[int index] {
- get {
- return ((InstallationRow)(this.Rows[index]));
- }
- }
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event InstallationRowChangeEventHandler InstallationRowChanging;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event InstallationRowChangeEventHandler InstallationRowChanged;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event InstallationRowChangeEventHandler InstallationRowDeleting;
-
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public event InstallationRowChangeEventHandler InstallationRowDeleted;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void AddInstallationRow(InstallationRow row) {
- this.Rows.Add(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public InstallationRow AddInstallationRow(int Inst_CODE, string InstallationName) {
- InstallationRow rowInstallationRow = ((InstallationRow)(this.NewRow()));
- object[] columnValuesArray = new object[] {
- Inst_CODE,
- InstallationName};
- rowInstallationRow.ItemArray = columnValuesArray;
- this.Rows.Add(rowInstallationRow);
- return rowInstallationRow;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public override global::System.Data.DataTable Clone() {
- InstallationDataTable cln = ((InstallationDataTable)(base.Clone()));
- cln.InitVars();
- return cln;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataTable CreateInstance() {
- return new InstallationDataTable();
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal void InitVars() {
- this.columnInst_CODE = base.Columns["Inst_CODE"];
- this.columnInstallationName = base.Columns["InstallationName"];
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitClass() {
- this.columnInst_CODE = new global::System.Data.DataColumn("Inst_CODE", typeof(int), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnInst_CODE);
- this.columnInstallationName = new global::System.Data.DataColumn("InstallationName", typeof(string), null, global::System.Data.MappingType.Element);
- base.Columns.Add(this.columnInstallationName);
- this.columnInst_CODE.AllowDBNull = false;
- this.columnInstallationName.MaxLength = 50;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public InstallationRow NewInstallationRow() {
- return ((InstallationRow)(this.NewRow()));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
- return new InstallationRow(builder);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override global::System.Type GetRowType() {
- return typeof(InstallationRow);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanged(e);
- if ((this.InstallationRowChanged != null)) {
- this.InstallationRowChanged(this, new InstallationRowChangeEvent(((InstallationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowChanging(e);
- if ((this.InstallationRowChanging != null)) {
- this.InstallationRowChanging(this, new InstallationRowChangeEvent(((InstallationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleted(e);
- if ((this.InstallationRowDeleted != null)) {
- this.InstallationRowDeleted(this, new InstallationRowChangeEvent(((InstallationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
- base.OnRowDeleting(e);
- if ((this.InstallationRowDeleting != null)) {
- this.InstallationRowDeleting(this, new InstallationRowChangeEvent(((InstallationRow)(e.Row)), e.Action));
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void RemoveInstallationRow(InstallationRow row) {
- this.Rows.Remove(row);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
- global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
- global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
- DataSet1 ds = new DataSet1();
- global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
- any1.Namespace = "http://www.w3.org/2001/XMLSchema";
- any1.MinOccurs = new decimal(0);
- any1.MaxOccurs = decimal.MaxValue;
- any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any1);
- global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
- any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
- any2.MinOccurs = new decimal(1);
- any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
- sequence.Items.Add(any2);
- global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute1.Name = "namespace";
- attribute1.FixedValue = ds.Namespace;
- type.Attributes.Add(attribute1);
- global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
- attribute2.Name = "tableTypeName";
- attribute2.FixedValue = "InstallationDataTable";
- type.Attributes.Add(attribute2);
- type.Particle = sequence;
- global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
- if (xs.Contains(dsSchema.TargetNamespace)) {
- global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
- global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
- try {
- global::System.Xml.Schema.XmlSchema schema = null;
- dsSchema.Write(s1);
- for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
- schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
- s2.SetLength(0);
- schema.Write(s2);
- if ((s1.Length == s2.Length)) {
- s1.Position = 0;
- s2.Position = 0;
- for (; ((s1.Position != s1.Length)
- && (s1.ReadByte() == s2.ReadByte())); ) {
- ;
- }
- if ((s1.Position == s1.Length)) {
- return type;
- }
- }
- }
- }
- finally {
- if ((s1 != null)) {
- s1.Close();
- }
- if ((s2 != null)) {
- s2.Close();
- }
- }
- }
- xs.Add(dsSchema);
- return type;
- }
- }
-
- ///
- ///Represents strongly named DataRow class.
- ///
- public partial class GetTaskInfoRow : global::System.Data.DataRow {
-
- private GetTaskInfoDataTable tableGetTaskInfo;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal GetTaskInfoRow(global::System.Data.DataRowBuilder rb) :
- base(rb) {
- this.tableGetTaskInfo = ((GetTaskInfoDataTable)(this.Table));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int ID_Task {
- get {
- return ((int)(this[this.tableGetTaskInfo.ID_TaskColumn]));
- }
- set {
- this[this.tableGetTaskInfo.ID_TaskColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int Inst_CODE {
- get {
- try {
- return ((int)(this[this.tableGetTaskInfo.Inst_CODEColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Inst_CODE\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.Inst_CODEColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int TaskType_CODE {
- get {
- try {
- return ((int)(this[this.tableGetTaskInfo.TaskType_CODEColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TaskType_CODE\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.TaskType_CODEColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string Task_Name {
- get {
- try {
- return ((string)(this[this.tableGetTaskInfo.Task_NameColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Task_Name\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.Task_NameColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string TaskDescription {
- get {
- return ((string)(this[this.tableGetTaskInfo.TaskDescriptionColumn]));
- }
- set {
- this[this.tableGetTaskInfo.TaskDescriptionColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string EPDRad {
- get {
- return ((string)(this[this.tableGetTaskInfo.EPDRadColumn]));
- }
- set {
- this[this.tableGetTaskInfo.EPDRadColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int ID_AlarmEPD {
- get {
- try {
- return ((int)(this[this.tableGetTaskInfo.ID_AlarmEPDColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'ID_AlarmEPD\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.ID_AlarmEPDColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public System.DateTime TaskDateStart {
- get {
- try {
- return ((global::System.DateTime)(this[this.tableGetTaskInfo.TaskDateStartColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TaskDateStart\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.TaskDateStartColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public System.DateTime TaskDateEnd {
- get {
- try {
- return ((global::System.DateTime)(this[this.tableGetTaskInfo.TaskDateEndColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TaskDateEnd\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.TaskDateEndColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool TaskEnable {
- get {
- try {
- return ((bool)(this[this.tableGetTaskInfo.TaskEnableColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TaskEnable\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.TaskEnableColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int ID_FNGainANGain {
- get {
- try {
- return ((int)(this[this.tableGetTaskInfo.ID_FNGainANGainColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'ID_FNGainANGain\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.ID_FNGainANGainColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double Hp10Dose1 {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.Hp10Dose1Column]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Hp10Dose1\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.Hp10Dose1Column] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double Hp10Dose2 {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.Hp10Dose2Column]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Hp10Dose2\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.Hp10Dose2Column] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double Hp07Dose {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.Hp07DoseColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Hp07Dose\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.Hp07DoseColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double HP10Rate1ON {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.HP10Rate1ONColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'HP10Rate1ON\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.HP10Rate1ONColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double HP10Rate1OFF {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.HP10Rate1OFFColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'HP10Rate1OFF\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.HP10Rate1OFFColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double HP10Rate2ON {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.HP10Rate2ONColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'HP10Rate2ON\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.HP10Rate2ONColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double HP10Rate2OFF {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.HP10Rate2OFFColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'HP10Rate2OFF\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.HP10Rate2OFFColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double HP07RateON {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.HP07RateONColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'HP07RateON\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.HP07RateONColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double HP07RateOFF {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.HP07RateOFFColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'HP07RateOFF\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.HP07RateOFFColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double FNGain_ANGainValue {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.FNGain_ANGainValueColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'FNGain_ANGainValue\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.FNGain_ANGainValueColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string InstallationActivity {
- get {
- try {
- return ((string)(this[this.tableGetTaskInfo.InstallationActivityColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'InstallationActivity\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.InstallationActivityColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string Description {
- get {
- try {
- return ((string)(this[this.tableGetTaskInfo.DescriptionColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Description\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.DescriptionColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int Inst_CODE1 {
- get {
- try {
- return ((int)(this[this.tableGetTaskInfo.Inst_CODE1Column]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Inst_CODE1\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.Inst_CODE1Column] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public double MinWorkerDosisMargin {
- get {
- try {
- return ((double)(this[this.tableGetTaskInfo.MinWorkerDosisMarginColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'MinWorkerDosisMargin\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.MinWorkerDosisMarginColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool MarginExceeded {
- get {
- try {
- return ((bool)(this[this.tableGetTaskInfo.MarginExceededColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'MarginExceeded\' in table \'GetTaskInfo\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskInfo.MarginExceededColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsInst_CODENull() {
- return this.IsNull(this.tableGetTaskInfo.Inst_CODEColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetInst_CODENull() {
- this[this.tableGetTaskInfo.Inst_CODEColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTaskType_CODENull() {
- return this.IsNull(this.tableGetTaskInfo.TaskType_CODEColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTaskType_CODENull() {
- this[this.tableGetTaskInfo.TaskType_CODEColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTask_NameNull() {
- return this.IsNull(this.tableGetTaskInfo.Task_NameColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTask_NameNull() {
- this[this.tableGetTaskInfo.Task_NameColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsID_AlarmEPDNull() {
- return this.IsNull(this.tableGetTaskInfo.ID_AlarmEPDColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetID_AlarmEPDNull() {
- this[this.tableGetTaskInfo.ID_AlarmEPDColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTaskDateStartNull() {
- return this.IsNull(this.tableGetTaskInfo.TaskDateStartColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTaskDateStartNull() {
- this[this.tableGetTaskInfo.TaskDateStartColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTaskDateEndNull() {
- return this.IsNull(this.tableGetTaskInfo.TaskDateEndColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTaskDateEndNull() {
- this[this.tableGetTaskInfo.TaskDateEndColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTaskEnableNull() {
- return this.IsNull(this.tableGetTaskInfo.TaskEnableColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTaskEnableNull() {
- this[this.tableGetTaskInfo.TaskEnableColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsID_FNGainANGainNull() {
- return this.IsNull(this.tableGetTaskInfo.ID_FNGainANGainColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetID_FNGainANGainNull() {
- this[this.tableGetTaskInfo.ID_FNGainANGainColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHp10Dose1Null() {
- return this.IsNull(this.tableGetTaskInfo.Hp10Dose1Column);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHp10Dose1Null() {
- this[this.tableGetTaskInfo.Hp10Dose1Column] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHp10Dose2Null() {
- return this.IsNull(this.tableGetTaskInfo.Hp10Dose2Column);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHp10Dose2Null() {
- this[this.tableGetTaskInfo.Hp10Dose2Column] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHp07DoseNull() {
- return this.IsNull(this.tableGetTaskInfo.Hp07DoseColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHp07DoseNull() {
- this[this.tableGetTaskInfo.Hp07DoseColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHP10Rate1ONNull() {
- return this.IsNull(this.tableGetTaskInfo.HP10Rate1ONColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHP10Rate1ONNull() {
- this[this.tableGetTaskInfo.HP10Rate1ONColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHP10Rate1OFFNull() {
- return this.IsNull(this.tableGetTaskInfo.HP10Rate1OFFColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHP10Rate1OFFNull() {
- this[this.tableGetTaskInfo.HP10Rate1OFFColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHP10Rate2ONNull() {
- return this.IsNull(this.tableGetTaskInfo.HP10Rate2ONColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHP10Rate2ONNull() {
- this[this.tableGetTaskInfo.HP10Rate2ONColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHP10Rate2OFFNull() {
- return this.IsNull(this.tableGetTaskInfo.HP10Rate2OFFColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHP10Rate2OFFNull() {
- this[this.tableGetTaskInfo.HP10Rate2OFFColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHP07RateONNull() {
- return this.IsNull(this.tableGetTaskInfo.HP07RateONColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHP07RateONNull() {
- this[this.tableGetTaskInfo.HP07RateONColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsHP07RateOFFNull() {
- return this.IsNull(this.tableGetTaskInfo.HP07RateOFFColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetHP07RateOFFNull() {
- this[this.tableGetTaskInfo.HP07RateOFFColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsFNGain_ANGainValueNull() {
- return this.IsNull(this.tableGetTaskInfo.FNGain_ANGainValueColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetFNGain_ANGainValueNull() {
- this[this.tableGetTaskInfo.FNGain_ANGainValueColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsInstallationActivityNull() {
- return this.IsNull(this.tableGetTaskInfo.InstallationActivityColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetInstallationActivityNull() {
- this[this.tableGetTaskInfo.InstallationActivityColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsDescriptionNull() {
- return this.IsNull(this.tableGetTaskInfo.DescriptionColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetDescriptionNull() {
- this[this.tableGetTaskInfo.DescriptionColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsInst_CODE1Null() {
- return this.IsNull(this.tableGetTaskInfo.Inst_CODE1Column);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetInst_CODE1Null() {
- this[this.tableGetTaskInfo.Inst_CODE1Column] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsMinWorkerDosisMarginNull() {
- return this.IsNull(this.tableGetTaskInfo.MinWorkerDosisMarginColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetMinWorkerDosisMarginNull() {
- this[this.tableGetTaskInfo.MinWorkerDosisMarginColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsMarginExceededNull() {
- return this.IsNull(this.tableGetTaskInfo.MarginExceededColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetMarginExceededNull() {
- this[this.tableGetTaskInfo.MarginExceededColumn] = global::System.Convert.DBNull;
- }
- }
-
- ///
- ///Represents strongly named DataRow class.
- ///
- public partial class GetTaskListRow : global::System.Data.DataRow {
-
- private GetTaskListDataTable tableGetTaskList;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal GetTaskListRow(global::System.Data.DataRowBuilder rb) :
- base(rb) {
- this.tableGetTaskList = ((GetTaskListDataTable)(this.Table));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int ID_Task {
- get {
- return ((int)(this[this.tableGetTaskList.ID_TaskColumn]));
- }
- set {
- this[this.tableGetTaskList.ID_TaskColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int Inst_CODE {
- get {
- try {
- return ((int)(this[this.tableGetTaskList.Inst_CODEColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Inst_CODE\' in table \'GetTaskList\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskList.Inst_CODEColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int TaskType_CODE {
- get {
- try {
- return ((int)(this[this.tableGetTaskList.TaskType_CODEColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TaskType_CODE\' in table \'GetTaskList\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskList.TaskType_CODEColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string Task_Name {
- get {
- try {
- return ((string)(this[this.tableGetTaskList.Task_NameColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Task_Name\' in table \'GetTaskList\' is DBNull.", e);
- }
- }
- set {
- this[this.tableGetTaskList.Task_NameColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string TaskDescription {
- get {
- return ((string)(this[this.tableGetTaskList.TaskDescriptionColumn]));
- }
- set {
- this[this.tableGetTaskList.TaskDescriptionColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string EPDRad {
- get {
- return ((string)(this[this.tableGetTaskList.EPDRadColumn]));
- }
- set {
- this[this.tableGetTaskList.EPDRadColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsInst_CODENull() {
- return this.IsNull(this.tableGetTaskList.Inst_CODEColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetInst_CODENull() {
- this[this.tableGetTaskList.Inst_CODEColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTaskType_CODENull() {
- return this.IsNull(this.tableGetTaskList.TaskType_CODEColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTaskType_CODENull() {
- this[this.tableGetTaskList.TaskType_CODEColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTask_NameNull() {
- return this.IsNull(this.tableGetTaskList.Task_NameColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTask_NameNull() {
- this[this.tableGetTaskList.Task_NameColumn] = global::System.Convert.DBNull;
- }
- }
-
- ///
- ///Represents strongly named DataRow class.
- ///
- public partial class CommentOnEventRow : global::System.Data.DataRow {
-
- private CommentOnEventDataTable tableCommentOnEvent;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal CommentOnEventRow(global::System.Data.DataRowBuilder rb) :
- base(rb) {
- this.tableCommentOnEvent = ((CommentOnEventDataTable)(this.Table));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int ID_CommnentOnEvent {
- get {
- return ((int)(this[this.tableCommentOnEvent.ID_CommnentOnEventColumn]));
- }
- set {
- this[this.tableCommentOnEvent.ID_CommnentOnEventColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string TriggerTable {
- get {
- try {
- return ((string)(this[this.tableCommentOnEvent.TriggerTableColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TriggerTable\' in table \'CommentOnEvent\' is DBNull.", e);
- }
- }
- set {
- this[this.tableCommentOnEvent.TriggerTableColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string TriggerField {
- get {
- try {
- return ((string)(this[this.tableCommentOnEvent.TriggerFieldColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TriggerField\' in table \'CommentOnEvent\' is DBNull.", e);
- }
- }
- set {
- this[this.tableCommentOnEvent.TriggerFieldColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool TriggerStatus {
- get {
- try {
- return ((bool)(this[this.tableCommentOnEvent.TriggerStatusColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'TriggerStatus\' in table \'CommentOnEvent\' is DBNull.", e);
- }
- }
- set {
- this[this.tableCommentOnEvent.TriggerStatusColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string Comment_FR {
- get {
- try {
- return ((string)(this[this.tableCommentOnEvent.Comment_FRColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Comment_FR\' in table \'CommentOnEvent\' is DBNull.", e);
- }
- }
- set {
- this[this.tableCommentOnEvent.Comment_FRColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string Comment_NL {
- get {
- try {
- return ((string)(this[this.tableCommentOnEvent.Comment_NLColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Comment_NL\' in table \'CommentOnEvent\' is DBNull.", e);
- }
- }
- set {
- this[this.tableCommentOnEvent.Comment_NLColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string Comment_EN {
- get {
- try {
- return ((string)(this[this.tableCommentOnEvent.Comment_ENColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'Comment_EN\' in table \'CommentOnEvent\' is DBNull.", e);
- }
- }
- set {
- this[this.tableCommentOnEvent.Comment_ENColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTriggerTableNull() {
- return this.IsNull(this.tableCommentOnEvent.TriggerTableColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTriggerTableNull() {
- this[this.tableCommentOnEvent.TriggerTableColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTriggerFieldNull() {
- return this.IsNull(this.tableCommentOnEvent.TriggerFieldColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTriggerFieldNull() {
- this[this.tableCommentOnEvent.TriggerFieldColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsTriggerStatusNull() {
- return this.IsNull(this.tableCommentOnEvent.TriggerStatusColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetTriggerStatusNull() {
- this[this.tableCommentOnEvent.TriggerStatusColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsComment_FRNull() {
- return this.IsNull(this.tableCommentOnEvent.Comment_FRColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetComment_FRNull() {
- this[this.tableCommentOnEvent.Comment_FRColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsComment_NLNull() {
- return this.IsNull(this.tableCommentOnEvent.Comment_NLColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetComment_NLNull() {
- this[this.tableCommentOnEvent.Comment_NLColumn] = global::System.Convert.DBNull;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsComment_ENNull() {
- return this.IsNull(this.tableCommentOnEvent.Comment_ENColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetComment_ENNull() {
- this[this.tableCommentOnEvent.Comment_ENColumn] = global::System.Convert.DBNull;
- }
- }
-
- ///
- ///Represents strongly named DataRow class.
- ///
- public partial class InstallationRow : global::System.Data.DataRow {
-
- private InstallationDataTable tableInstallation;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal InstallationRow(global::System.Data.DataRowBuilder rb) :
- base(rb) {
- this.tableInstallation = ((InstallationDataTable)(this.Table));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public int Inst_CODE {
- get {
- return ((int)(this[this.tableInstallation.Inst_CODEColumn]));
- }
- set {
- this[this.tableInstallation.Inst_CODEColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public string InstallationName {
- get {
- try {
- return ((string)(this[this.tableInstallation.InstallationNameColumn]));
- }
- catch (global::System.InvalidCastException e) {
- throw new global::System.Data.StrongTypingException("The value for column \'InstallationName\' in table \'Installation\' is DBNull.", e);
- }
- }
- set {
- this[this.tableInstallation.InstallationNameColumn] = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool IsInstallationNameNull() {
- return this.IsNull(this.tableInstallation.InstallationNameColumn);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public void SetInstallationNameNull() {
- this[this.tableInstallation.InstallationNameColumn] = global::System.Convert.DBNull;
- }
- }
-
- ///
- ///Row event argument class
- ///
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public class GetTaskInfoRowChangeEvent : global::System.EventArgs {
-
- private GetTaskInfoRow eventRow;
-
- private global::System.Data.DataRowAction eventAction;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoRowChangeEvent(GetTaskInfoRow row, global::System.Data.DataRowAction action) {
- this.eventRow = row;
- this.eventAction = action;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoRow Row {
- get {
- return this.eventRow;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataRowAction Action {
- get {
- return this.eventAction;
- }
- }
- }
-
- ///
- ///Row event argument class
- ///
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public class GetTaskListRowChangeEvent : global::System.EventArgs {
-
- private GetTaskListRow eventRow;
-
- private global::System.Data.DataRowAction eventAction;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListRowChangeEvent(GetTaskListRow row, global::System.Data.DataRowAction action) {
- this.eventRow = row;
- this.eventAction = action;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListRow Row {
- get {
- return this.eventRow;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataRowAction Action {
- get {
- return this.eventAction;
- }
- }
- }
-
- ///
- ///Row event argument class
- ///
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public class CommentOnEventRowChangeEvent : global::System.EventArgs {
-
- private CommentOnEventRow eventRow;
-
- private global::System.Data.DataRowAction eventAction;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventRowChangeEvent(CommentOnEventRow row, global::System.Data.DataRowAction action) {
- this.eventRow = row;
- this.eventAction = action;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventRow Row {
- get {
- return this.eventRow;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataRowAction Action {
- get {
- return this.eventAction;
- }
- }
- }
-
- ///
- ///Row event argument class
- ///
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public class InstallationRowChangeEvent : global::System.EventArgs {
-
- private InstallationRow eventRow;
-
- private global::System.Data.DataRowAction eventAction;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public InstallationRowChangeEvent(InstallationRow row, global::System.Data.DataRowAction action) {
- this.eventRow = row;
- this.eventAction = action;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public InstallationRow Row {
- get {
- return this.eventRow;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public global::System.Data.DataRowAction Action {
- get {
- return this.eventAction;
- }
- }
- }
- }
-}
-namespace eDosStation.DataSet1TableAdapters {
-
-
- ///
- ///Represents the connection and commands used to retrieve and save data.
- ///
- [global::System.ComponentModel.DesignerCategoryAttribute("code")]
- [global::System.ComponentModel.ToolboxItem(true)]
- [global::System.ComponentModel.DataObjectAttribute(true)]
- [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
- ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- public partial class GetTaskInfoTableAdapter : global::System.ComponentModel.Component {
-
- private global::System.Data.SqlClient.SqlDataAdapter _adapter;
-
- private global::System.Data.SqlClient.SqlConnection _connection;
-
- private global::System.Data.SqlClient.SqlTransaction _transaction;
-
- private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
-
- private bool _clearBeforeFill;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskInfoTableAdapter() {
- this.ClearBeforeFill = true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
- get {
- if ((this._adapter == null)) {
- this.InitAdapter();
- }
- return this._adapter;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlConnection Connection {
- get {
- if ((this._connection == null)) {
- this.InitConnection();
- }
- return this._connection;
- }
- set {
- this._connection = value;
- if ((this.Adapter.InsertCommand != null)) {
- this.Adapter.InsertCommand.Connection = value;
- }
- if ((this.Adapter.DeleteCommand != null)) {
- this.Adapter.DeleteCommand.Connection = value;
- }
- if ((this.Adapter.UpdateCommand != null)) {
- this.Adapter.UpdateCommand.Connection = value;
- }
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- if ((this.CommandCollection[i] != null)) {
- ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
- }
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlTransaction Transaction {
- get {
- return this._transaction;
- }
- set {
- this._transaction = value;
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- this.CommandCollection[i].Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.DeleteCommand != null))) {
- this.Adapter.DeleteCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.InsertCommand != null))) {
- this.Adapter.InsertCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.UpdateCommand != null))) {
- this.Adapter.UpdateCommand.Transaction = this._transaction;
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
- get {
- if ((this._commandCollection == null)) {
- this.InitCommandCollection();
- }
- return this._commandCollection;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool ClearBeforeFill {
- get {
- return this._clearBeforeFill;
- }
- set {
- this._clearBeforeFill = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitAdapter() {
- this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
- global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
- tableMapping.SourceTable = "Table";
- tableMapping.DataSetTable = "GetTaskInfo";
- tableMapping.ColumnMappings.Add("ID_Task", "ID_Task");
- tableMapping.ColumnMappings.Add("Inst_CODE", "Inst_CODE");
- tableMapping.ColumnMappings.Add("TaskType_CODE", "TaskType_CODE");
- tableMapping.ColumnMappings.Add("Task_Name", "Task_Name");
- tableMapping.ColumnMappings.Add("TaskDescription", "TaskDescription");
- tableMapping.ColumnMappings.Add("EPDRad", "EPDRad");
- tableMapping.ColumnMappings.Add("ID_AlarmEPD", "ID_AlarmEPD");
- tableMapping.ColumnMappings.Add("TaskDateStart", "TaskDateStart");
- tableMapping.ColumnMappings.Add("TaskDateEnd", "TaskDateEnd");
- tableMapping.ColumnMappings.Add("TaskEnable", "TaskEnable");
- tableMapping.ColumnMappings.Add("ID_FNGainANGain", "ID_FNGainANGain");
- tableMapping.ColumnMappings.Add("Hp10Dose1", "Hp10Dose1");
- tableMapping.ColumnMappings.Add("Hp10Dose2", "Hp10Dose2");
- tableMapping.ColumnMappings.Add("Hp07Dose", "Hp07Dose");
- tableMapping.ColumnMappings.Add("HP10Rate1ON", "HP10Rate1ON");
- tableMapping.ColumnMappings.Add("HP10Rate1OFF", "HP10Rate1OFF");
- tableMapping.ColumnMappings.Add("HP10Rate2ON", "HP10Rate2ON");
- tableMapping.ColumnMappings.Add("HP10Rate2OFF", "HP10Rate2OFF");
- tableMapping.ColumnMappings.Add("HP07RateON", "HP07RateON");
- tableMapping.ColumnMappings.Add("HP07RateOFF", "HP07RateOFF");
- tableMapping.ColumnMappings.Add("FNGain_ANGainValue", "FNGain_ANGainValue");
- tableMapping.ColumnMappings.Add("InstallationActivity", "InstallationActivity");
- tableMapping.ColumnMappings.Add("Description", "Description");
- tableMapping.ColumnMappings.Add("Inst_CODE1", "Inst_CODE1");
- tableMapping.ColumnMappings.Add("MinWorkerDosisMargin", "MinWorkerDosisMargin");
- tableMapping.ColumnMappings.Add("MarginExceeded", "MarginExceeded");
- this._adapter.TableMappings.Add(tableMapping);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitConnection() {
- this._connection = new global::System.Data.SqlClient.SqlConnection();
- this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.localConnectionString;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
- this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
- this._commandCollection[0].Connection = this.Connection;
- this._commandCollection[0].CommandText = "dbo.GetTaskInfo";
- this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure;
- this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ID_Task", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@WorkerDosisMargin", global::System.Data.SqlDbType.Float, 8, global::System.Data.ParameterDirection.Input, 53, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
- public virtual int Fill(DataSet1.GetTaskInfoDataTable dataTable, global::System.Nullable ID_Task, global::System.Nullable WorkerDosisMargin) {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- if ((ID_Task.HasValue == true)) {
- this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ID_Task.Value));
- }
- else {
- this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
- }
- if ((WorkerDosisMargin.HasValue == true)) {
- this.Adapter.SelectCommand.Parameters[2].Value = ((double)(WorkerDosisMargin.Value));
- }
- else {
- this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
- }
- if ((this.ClearBeforeFill == true)) {
- dataTable.Clear();
- }
- int returnValue = this.Adapter.Fill(dataTable);
- return returnValue;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
- public virtual DataSet1.GetTaskInfoDataTable GetData(global::System.Nullable ID_Task, global::System.Nullable WorkerDosisMargin) {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- if ((ID_Task.HasValue == true)) {
- this.Adapter.SelectCommand.Parameters[1].Value = ((int)(ID_Task.Value));
- }
- else {
- this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
- }
- if ((WorkerDosisMargin.HasValue == true)) {
- this.Adapter.SelectCommand.Parameters[2].Value = ((double)(WorkerDosisMargin.Value));
- }
- else {
- this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value;
- }
- DataSet1.GetTaskInfoDataTable dataTable = new DataSet1.GetTaskInfoDataTable();
- this.Adapter.Fill(dataTable);
- return dataTable;
- }
- }
-
- ///
- ///Represents the connection and commands used to retrieve and save data.
- ///
- [global::System.ComponentModel.DesignerCategoryAttribute("code")]
- [global::System.ComponentModel.ToolboxItem(true)]
- [global::System.ComponentModel.DataObjectAttribute(true)]
- [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
- ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- public partial class GetTaskListTableAdapter : global::System.ComponentModel.Component {
-
- private global::System.Data.SqlClient.SqlDataAdapter _adapter;
-
- private global::System.Data.SqlClient.SqlConnection _connection;
-
- private global::System.Data.SqlClient.SqlTransaction _transaction;
-
- private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
-
- private bool _clearBeforeFill;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public GetTaskListTableAdapter() {
- this.ClearBeforeFill = true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
- get {
- if ((this._adapter == null)) {
- this.InitAdapter();
- }
- return this._adapter;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlConnection Connection {
- get {
- if ((this._connection == null)) {
- this.InitConnection();
- }
- return this._connection;
- }
- set {
- this._connection = value;
- if ((this.Adapter.InsertCommand != null)) {
- this.Adapter.InsertCommand.Connection = value;
- }
- if ((this.Adapter.DeleteCommand != null)) {
- this.Adapter.DeleteCommand.Connection = value;
- }
- if ((this.Adapter.UpdateCommand != null)) {
- this.Adapter.UpdateCommand.Connection = value;
- }
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- if ((this.CommandCollection[i] != null)) {
- ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
- }
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlTransaction Transaction {
- get {
- return this._transaction;
- }
- set {
- this._transaction = value;
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- this.CommandCollection[i].Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.DeleteCommand != null))) {
- this.Adapter.DeleteCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.InsertCommand != null))) {
- this.Adapter.InsertCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.UpdateCommand != null))) {
- this.Adapter.UpdateCommand.Transaction = this._transaction;
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
- get {
- if ((this._commandCollection == null)) {
- this.InitCommandCollection();
- }
- return this._commandCollection;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool ClearBeforeFill {
- get {
- return this._clearBeforeFill;
- }
- set {
- this._clearBeforeFill = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitAdapter() {
- this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
- global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
- tableMapping.SourceTable = "Table";
- tableMapping.DataSetTable = "GetTaskList";
- tableMapping.ColumnMappings.Add("ID_Task", "ID_Task");
- tableMapping.ColumnMappings.Add("Inst_CODE", "Inst_CODE");
- tableMapping.ColumnMappings.Add("TaskType_CODE", "TaskType_CODE");
- tableMapping.ColumnMappings.Add("Task_Name", "Task_Name");
- tableMapping.ColumnMappings.Add("TaskDescription", "TaskDescription");
- tableMapping.ColumnMappings.Add("EPDRad", "EPDRad");
- this._adapter.TableMappings.Add(tableMapping);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitConnection() {
- this._connection = new global::System.Data.SqlClient.SqlConnection();
- this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.localConnectionString;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
- this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
- this._commandCollection[0].Connection = this.Connection;
- this._commandCollection[0].CommandText = "dbo.GetTaskList";
- this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure;
- this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
- public virtual int Fill(DataSet1.GetTaskListDataTable dataTable) {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- if ((this.ClearBeforeFill == true)) {
- dataTable.Clear();
- }
- int returnValue = this.Adapter.Fill(dataTable);
- return returnValue;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
- public virtual DataSet1.GetTaskListDataTable GetData() {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- DataSet1.GetTaskListDataTable dataTable = new DataSet1.GetTaskListDataTable();
- this.Adapter.Fill(dataTable);
- return dataTable;
- }
- }
-
- ///
- ///Represents the connection and commands used to retrieve and save data.
- ///
- [global::System.ComponentModel.DesignerCategoryAttribute("code")]
- [global::System.ComponentModel.ToolboxItem(true)]
- [global::System.ComponentModel.DataObjectAttribute(true)]
- [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
- ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- public partial class CommentOnEventTableAdapter : global::System.ComponentModel.Component {
-
- private global::System.Data.SqlClient.SqlDataAdapter _adapter;
-
- private global::System.Data.SqlClient.SqlConnection _connection;
-
- private global::System.Data.SqlClient.SqlTransaction _transaction;
-
- private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
-
- private bool _clearBeforeFill;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public CommentOnEventTableAdapter() {
- this.ClearBeforeFill = true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
- get {
- if ((this._adapter == null)) {
- this.InitAdapter();
- }
- return this._adapter;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlConnection Connection {
- get {
- if ((this._connection == null)) {
- this.InitConnection();
- }
- return this._connection;
- }
- set {
- this._connection = value;
- if ((this.Adapter.InsertCommand != null)) {
- this.Adapter.InsertCommand.Connection = value;
- }
- if ((this.Adapter.DeleteCommand != null)) {
- this.Adapter.DeleteCommand.Connection = value;
- }
- if ((this.Adapter.UpdateCommand != null)) {
- this.Adapter.UpdateCommand.Connection = value;
- }
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- if ((this.CommandCollection[i] != null)) {
- ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
- }
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlTransaction Transaction {
- get {
- return this._transaction;
- }
- set {
- this._transaction = value;
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- this.CommandCollection[i].Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.DeleteCommand != null))) {
- this.Adapter.DeleteCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.InsertCommand != null))) {
- this.Adapter.InsertCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.UpdateCommand != null))) {
- this.Adapter.UpdateCommand.Transaction = this._transaction;
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
- get {
- if ((this._commandCollection == null)) {
- this.InitCommandCollection();
- }
- return this._commandCollection;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool ClearBeforeFill {
- get {
- return this._clearBeforeFill;
- }
- set {
- this._clearBeforeFill = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitAdapter() {
- this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
- global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
- tableMapping.SourceTable = "Table";
- tableMapping.DataSetTable = "CommentOnEvent";
- tableMapping.ColumnMappings.Add("ID_CommnentOnEvent", "ID_CommnentOnEvent");
- tableMapping.ColumnMappings.Add("TriggerTable", "TriggerTable");
- tableMapping.ColumnMappings.Add("TriggerField", "TriggerField");
- tableMapping.ColumnMappings.Add("TriggerStatus", "TriggerStatus");
- tableMapping.ColumnMappings.Add("Comment_FR", "Comment_FR");
- tableMapping.ColumnMappings.Add("Comment_NL", "Comment_NL");
- tableMapping.ColumnMappings.Add("Comment_EN", "Comment_EN");
- this._adapter.TableMappings.Add(tableMapping);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitConnection() {
- this._connection = new global::System.Data.SqlClient.SqlConnection();
- this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.localConnectionString;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
- this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
- this._commandCollection[0].Connection = this.Connection;
- this._commandCollection[0].CommandText = "dbo.CommentOnEventSelect";
- this._commandCollection[0].CommandType = global::System.Data.CommandType.StoredProcedure;
- this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RETURN_VALUE", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.ReturnValue, 10, 0, null, global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
- public virtual int Fill(DataSet1.CommentOnEventDataTable dataTable) {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- if ((this.ClearBeforeFill == true)) {
- dataTable.Clear();
- }
- int returnValue = this.Adapter.Fill(dataTable);
- return returnValue;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
- public virtual DataSet1.CommentOnEventDataTable GetData() {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- DataSet1.CommentOnEventDataTable dataTable = new DataSet1.CommentOnEventDataTable();
- this.Adapter.Fill(dataTable);
- return dataTable;
- }
- }
-
- ///
- ///Represents the connection and commands used to retrieve and save data.
- ///
- [global::System.ComponentModel.DesignerCategoryAttribute("code")]
- [global::System.ComponentModel.ToolboxItem(true)]
- [global::System.ComponentModel.DataObjectAttribute(true)]
- [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
- ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- public partial class InstallationTableAdapter : global::System.ComponentModel.Component {
-
- private global::System.Data.SqlClient.SqlDataAdapter _adapter;
-
- private global::System.Data.SqlClient.SqlConnection _connection;
-
- private global::System.Data.SqlClient.SqlTransaction _transaction;
-
- private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
-
- private bool _clearBeforeFill;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public InstallationTableAdapter() {
- this.ClearBeforeFill = true;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
- get {
- if ((this._adapter == null)) {
- this.InitAdapter();
- }
- return this._adapter;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlConnection Connection {
- get {
- if ((this._connection == null)) {
- this.InitConnection();
- }
- return this._connection;
- }
- set {
- this._connection = value;
- if ((this.Adapter.InsertCommand != null)) {
- this.Adapter.InsertCommand.Connection = value;
- }
- if ((this.Adapter.DeleteCommand != null)) {
- this.Adapter.DeleteCommand.Connection = value;
- }
- if ((this.Adapter.UpdateCommand != null)) {
- this.Adapter.UpdateCommand.Connection = value;
- }
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- if ((this.CommandCollection[i] != null)) {
- ((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
- }
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- internal global::System.Data.SqlClient.SqlTransaction Transaction {
- get {
- return this._transaction;
- }
- set {
- this._transaction = value;
- for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
- this.CommandCollection[i].Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.DeleteCommand != null))) {
- this.Adapter.DeleteCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.InsertCommand != null))) {
- this.Adapter.InsertCommand.Transaction = this._transaction;
- }
- if (((this.Adapter != null)
- && (this.Adapter.UpdateCommand != null))) {
- this.Adapter.UpdateCommand.Transaction = this._transaction;
- }
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
- get {
- if ((this._commandCollection == null)) {
- this.InitCommandCollection();
- }
- return this._commandCollection;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool ClearBeforeFill {
- get {
- return this._clearBeforeFill;
- }
- set {
- this._clearBeforeFill = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitAdapter() {
- this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
- global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
- tableMapping.SourceTable = "Table";
- tableMapping.DataSetTable = "Installation";
- tableMapping.ColumnMappings.Add("Inst_CODE", "Inst_CODE");
- tableMapping.ColumnMappings.Add("InstallationName", "InstallationName");
- this._adapter.TableMappings.Add(tableMapping);
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitConnection() {
- this._connection = new global::System.Data.SqlClient.SqlConnection();
- this._connection.ConnectionString = global::eDosStation.Properties.Settings.Default.localConnectionString;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private void InitCommandCollection() {
- this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
- this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
- this._commandCollection[0].Connection = this.Connection;
- this._commandCollection[0].CommandText = "SELECT [Inst_CODE] ,[InstallationName]\r\n FROM [eDosLocal].[dbo].[Installation" +
- "] order by [InstallationName]";
- this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
- public virtual int Fill(DataSet1.InstallationDataTable dataTable) {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- if ((this.ClearBeforeFill == true)) {
- dataTable.Clear();
- }
- int returnValue = this.Adapter.Fill(dataTable);
- return returnValue;
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
- [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
- public virtual DataSet1.InstallationDataTable GetData() {
- this.Adapter.SelectCommand = this.CommandCollection[0];
- DataSet1.InstallationDataTable dataTable = new DataSet1.InstallationDataTable();
- this.Adapter.Fill(dataTable);
- return dataTable;
- }
- }
-
- ///
- ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
- ///
- [global::System.ComponentModel.DesignerCategoryAttribute("code")]
- [global::System.ComponentModel.ToolboxItem(true)]
- [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
- "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
- public partial class TableAdapterManager : global::System.ComponentModel.Component {
-
- private UpdateOrderOption _updateOrder;
-
- private bool _backupDataSetBeforeUpdate;
-
- private global::System.Data.IDbConnection _connection;
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public UpdateOrderOption UpdateOrder {
- get {
- return this._updateOrder;
- }
- set {
- this._updateOrder = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public bool BackupDataSetBeforeUpdate {
- get {
- return this._backupDataSetBeforeUpdate;
- }
- set {
- this._backupDataSetBeforeUpdate = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- public global::System.Data.IDbConnection Connection {
- get {
- if ((this._connection != null)) {
- return this._connection;
- }
- return null;
- }
- set {
- this._connection = value;
- }
- }
-
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- [global::System.ComponentModel.Browsable(false)]
- public int TableAdapterInstanceCount {
- get {
- int count = 0;
- return count;
- }
- }
-
- ///
- ///Update rows in top-down order.
- ///
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private int UpdateUpdatedRows(DataSet1 dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) {
- int result = 0;
- return result;
- }
-
- ///
- ///Insert rows in top-down order.
- ///
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private int UpdateInsertedRows(DataSet1 dataSet, global::System.Collections.Generic.List allAddedRows) {
- int result = 0;
- return result;
- }
-
- ///
- ///Delete rows in bottom-up order.
- ///
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private int UpdateDeletedRows(DataSet1 dataSet, global::System.Collections.Generic.List allChangedRows) {
- int result = 0;
- return result;
- }
-
- ///
- ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
- ///
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) {
- if (((updatedRows == null)
- || (updatedRows.Length < 1))) {
- return updatedRows;
- }
- if (((allAddedRows == null)
- || (allAddedRows.Count < 1))) {
- return updatedRows;
- }
- global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List();
- for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
- global::System.Data.DataRow row = updatedRows[i];
- if ((allAddedRows.Contains(row) == false)) {
- realUpdatedRows.Add(row);
- }
- }
- return realUpdatedRows.ToArray();
- }
-
- ///
- ///Update all changes to the dataset.
- ///
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
- public virtual int UpdateAll(DataSet1 dataSet) {
- if ((dataSet == null)) {
- throw new global::System.ArgumentNullException("dataSet");
- }
- if ((dataSet.HasChanges() == false)) {
- return 0;
- }
- global::System.Data.IDbConnection workConnection = this.Connection;
- if ((workConnection == null)) {
- throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
- "ger TableAdapter property to a valid TableAdapter instance.");
- }
- bool workConnOpened = false;
- if (((workConnection.State & global::System.Data.ConnectionState.Broken)
- == global::System.Data.ConnectionState.Broken)) {
- workConnection.Close();
- }
- if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
- workConnection.Open();
- workConnOpened = true;
- }
- global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
- if ((workTransaction == null)) {
- throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" +
- "ctions or the current state is not allowing the transaction to begin.");
- }
- global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List();
- global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List();
- global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List();
- global::System.Collections.Generic.Dictionary