Settings en Chirp MK3 (te valideren)
This commit is contained in:
parent
8ec5fa518b
commit
a9156b0033
21 changed files with 7138 additions and 6690 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
@ -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 )
|
||||
/// </summary>
|
||||
/// <param name="count"></param>
|
||||
|
||||
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() {
|
|||
///
|
||||
/// </summary>
|
||||
/// <returns>0 Success</returns>
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -746,7 +746,7 @@ int EpdBaseClr::Epd2::GetAllDeissue()
|
|||
/// </summary>
|
||||
/// <param name="gain"></param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
35
MK3/MK3.cpp
35
MK3/MK3.cpp
|
|
@ -363,4 +363,39 @@ namespace MK3 {
|
|||
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<Byte> 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -250,6 +250,14 @@ namespace MK3 {
|
|||
|
||||
void WaitEnd();
|
||||
|
||||
int ReadDisplay();
|
||||
|
||||
int SetSettings();
|
||||
|
||||
int SetChirp(float Sensitivity);
|
||||
|
||||
array<Byte>^ ECIn;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
|
|
|||
141
MK3/MK3Base.cpp
141
MK3/MK3Base.cpp
|
|
@ -1075,3 +1075,144 @@ WORD MK3::Epd2U::WriteCal()
|
|||
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;
|
||||
}
|
||||
|
|
@ -259,6 +259,9 @@ namespace MK3
|
|||
WORD TurnOff();
|
||||
WORD TurnOn();
|
||||
WORD WriteCal();
|
||||
WORD SetSettings();
|
||||
WORD SetChirp(float Sensitivity);
|
||||
WORD ReadDisplay();
|
||||
WORD ReadSensitivitiesAndTresholds();
|
||||
//WORD ReadTresHolds();
|
||||
WORD ReadDoses();
|
||||
|
|
@ -294,6 +297,14 @@ namespace MK3
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -18,38 +18,47 @@ namespace TestEPD3Dll
|
|||
|
||||
//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();
|
||||
|
||||
MK3.Epd2 x = new MK3.Epd2(6);
|
||||
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.ECIn = System.Security.Cryptography.SHA256.Create().ComputeHash(System.Text.Encoding.UTF8.GetBytes("Administrator"));
|
||||
rv= x.SetChirp(5);
|
||||
x.SetSettings();
|
||||
|
||||
x.ReadDisplay(); // ToDo list
|
||||
|
||||
|
||||
//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();
|
||||
//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();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
49
eDosStation/DataSet1.Designer.cs
generated
49
eDosStation/DataSet1.Designer.cs
generated
|
|
@ -436,6 +436,8 @@ namespace eDosStation {
|
|||
|
||||
private global::System.Data.DataColumn columnMarginExceeded;
|
||||
|
||||
private global::System.Data.DataColumn columnChirpRate;
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
public GetTaskInfoDataTable() {
|
||||
|
|
@ -677,6 +679,14 @@ namespace eDosStation {
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
public global::System.Data.DataColumn ChirpRateColumn {
|
||||
get {
|
||||
return this.columnChirpRate;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
[global::System.ComponentModel.Browsable(false)]
|
||||
|
|
@ -739,7 +749,8 @@ namespace eDosStation {
|
|||
string Description,
|
||||
int Inst_CODE1,
|
||||
double MinWorkerDosisMargin,
|
||||
bool MarginExceeded) {
|
||||
bool MarginExceeded,
|
||||
float ChirpRate) {
|
||||
GetTaskInfoRow rowGetTaskInfoRow = ((GetTaskInfoRow)(this.NewRow()));
|
||||
object[] columnValuesArray = new object[] {
|
||||
null,
|
||||
|
|
@ -767,7 +778,8 @@ namespace eDosStation {
|
|||
Description,
|
||||
Inst_CODE1,
|
||||
MinWorkerDosisMargin,
|
||||
MarginExceeded};
|
||||
MarginExceeded,
|
||||
ChirpRate};
|
||||
rowGetTaskInfoRow.ItemArray = columnValuesArray;
|
||||
this.Rows.Add(rowGetTaskInfoRow);
|
||||
return rowGetTaskInfoRow;
|
||||
|
|
@ -823,6 +835,7 @@ namespace eDosStation {
|
|||
this.columnInst_CODE1 = base.Columns["Inst_CODE1"];
|
||||
this.columnMinWorkerDosisMargin = base.Columns["MinWorkerDosisMargin"];
|
||||
this.columnMarginExceeded = base.Columns["MarginExceeded"];
|
||||
this.columnChirpRate = base.Columns["ChirpRate"];
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
|
|
@ -880,6 +893,8 @@ namespace eDosStation {
|
|||
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.columnChirpRate = new global::System.Data.DataColumn("ChirpRate", typeof(float), null, global::System.Data.MappingType.Element);
|
||||
base.Columns.Add(this.columnChirpRate);
|
||||
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
|
||||
this.columnID_Task}, true));
|
||||
this.columnID_Task.AutoIncrement = true;
|
||||
|
|
@ -897,6 +912,7 @@ namespace eDosStation {
|
|||
this.columnInstallationActivity.MaxLength = 100;
|
||||
this.columnDescription.MaxLength = 500;
|
||||
this.columnMarginExceeded.ReadOnly = true;
|
||||
this.columnChirpRate.ReadOnly = true;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
|
|
@ -2390,6 +2406,22 @@ namespace eDosStation {
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
public float ChirpRate {
|
||||
get {
|
||||
try {
|
||||
return ((float)(this[this.tableGetTaskInfo.ChirpRateColumn]));
|
||||
}
|
||||
catch (global::System.InvalidCastException e) {
|
||||
throw new global::System.Data.StrongTypingException("The value for column \'ChirpRate\' in table \'GetTaskInfo\' is DBNull.", e);
|
||||
}
|
||||
}
|
||||
set {
|
||||
this[this.tableGetTaskInfo.ChirpRateColumn] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
public bool IsInst_CODENull() {
|
||||
|
|
@ -2665,6 +2697,18 @@ namespace eDosStation {
|
|||
public void SetMarginExceededNull() {
|
||||
this[this.tableGetTaskInfo.MarginExceededColumn] = global::System.Convert.DBNull;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
public bool IsChirpRateNull() {
|
||||
return this.IsNull(this.tableGetTaskInfo.ChirpRateColumn);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "16.0.0.0")]
|
||||
public void SetChirpRateNull() {
|
||||
this[this.tableGetTaskInfo.ChirpRateColumn] = global::System.Convert.DBNull;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -3334,6 +3378,7 @@ namespace eDosStation.DataSet1TableAdapters {
|
|||
tableMapping.ColumnMappings.Add("Inst_CODE1", "Inst_CODE1");
|
||||
tableMapping.ColumnMappings.Add("MinWorkerDosisMargin", "MinWorkerDosisMargin");
|
||||
tableMapping.ColumnMappings.Add("MarginExceeded", "MarginExceeded");
|
||||
tableMapping.ColumnMappings.Add("ChirpRate", "ChirpRate");
|
||||
this._adapter.TableMappings.Add(tableMapping);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
<Mapping SourceColumn="Inst_CODE1" DataSetColumn="Inst_CODE1" />
|
||||
<Mapping SourceColumn="MinWorkerDosisMargin" DataSetColumn="MinWorkerDosisMargin" />
|
||||
<Mapping SourceColumn="MarginExceeded" DataSetColumn="MarginExceeded" />
|
||||
<Mapping SourceColumn="ChirpRate" DataSetColumn="ChirpRate" />
|
||||
</Mappings>
|
||||
<Sources />
|
||||
</TableAdapter>
|
||||
|
|
@ -126,7 +127,7 @@
|
|||
<xs:element name="DataSet1" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="true" msprop:Generator_DataSetName="DataSet1" msprop:Generator_UserDSName="DataSet1">
|
||||
<xs:complexType>
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="GetTaskInfo" msprop:Generator_TableClassName="GetTaskInfoDataTable" msprop:Generator_TableVarName="tableGetTaskInfo" msprop:Generator_TablePropName="GetTaskInfo" msprop:Generator_RowDeletingName="GetTaskInfoRowDeleting" msprop:Generator_RowChangingName="GetTaskInfoRowChanging" msprop:Generator_RowEvHandlerName="GetTaskInfoRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskInfoRowDeleted" msprop:Generator_UserTableName="GetTaskInfo" msprop:Generator_RowChangedName="GetTaskInfoRowChanged" msprop:Generator_RowEvArgName="GetTaskInfoRowChangeEvent" msprop:Generator_RowClassName="GetTaskInfoRow">
|
||||
<xs:element name="GetTaskInfo" msprop:Generator_TableClassName="GetTaskInfoDataTable" msprop:Generator_TableVarName="tableGetTaskInfo" msprop:Generator_RowChangedName="GetTaskInfoRowChanged" msprop:Generator_TablePropName="GetTaskInfo" msprop:Generator_RowDeletingName="GetTaskInfoRowDeleting" msprop:Generator_RowChangingName="GetTaskInfoRowChanging" msprop:Generator_RowEvHandlerName="GetTaskInfoRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskInfoRowDeleted" msprop:Generator_RowClassName="GetTaskInfoRow" msprop:Generator_UserTableName="GetTaskInfo" msprop:Generator_RowEvArgName="GetTaskInfoRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
||||
|
|
@ -185,10 +186,11 @@
|
|||
<xs:element name="Inst_CODE1" msprop:Generator_ColumnVarNameInTable="columnInst_CODE1" msprop:Generator_ColumnPropNameInRow="Inst_CODE1" msprop:Generator_ColumnPropNameInTable="Inst_CODE1Column" msprop:Generator_UserColumnName="Inst_CODE1" type="xs:int" minOccurs="0" />
|
||||
<xs:element name="MinWorkerDosisMargin" msprop:Generator_ColumnVarNameInTable="columnMinWorkerDosisMargin" msprop:Generator_ColumnPropNameInRow="MinWorkerDosisMargin" msprop:Generator_ColumnPropNameInTable="MinWorkerDosisMarginColumn" msprop:Generator_UserColumnName="MinWorkerDosisMargin" type="xs:double" minOccurs="0" />
|
||||
<xs:element name="MarginExceeded" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnMarginExceeded" msprop:Generator_ColumnPropNameInRow="MarginExceeded" msprop:Generator_ColumnPropNameInTable="MarginExceededColumn" msprop:Generator_UserColumnName="MarginExceeded" type="xs:boolean" minOccurs="0" />
|
||||
<xs:element name="ChirpRate" msdata:ReadOnly="true" msprop:Generator_ColumnVarNameInTable="columnChirpRate" msprop:Generator_ColumnPropNameInRow="ChirpRate" msprop:Generator_ColumnPropNameInTable="ChirpRateColumn" msprop:Generator_UserColumnName="ChirpRate" type="xs:float" minOccurs="0" />
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="GetTaskList" msprop:Generator_TableClassName="GetTaskListDataTable" msprop:Generator_TableVarName="tableGetTaskList" msprop:Generator_TablePropName="GetTaskList" msprop:Generator_RowDeletingName="GetTaskListRowDeleting" msprop:Generator_RowChangingName="GetTaskListRowChanging" msprop:Generator_RowEvHandlerName="GetTaskListRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskListRowDeleted" msprop:Generator_UserTableName="GetTaskList" msprop:Generator_RowChangedName="GetTaskListRowChanged" msprop:Generator_RowEvArgName="GetTaskListRowChangeEvent" msprop:Generator_RowClassName="GetTaskListRow">
|
||||
<xs:element name="GetTaskList" msprop:Generator_TableClassName="GetTaskListDataTable" msprop:Generator_TableVarName="tableGetTaskList" msprop:Generator_RowChangedName="GetTaskListRowChanged" msprop:Generator_TablePropName="GetTaskList" msprop:Generator_RowDeletingName="GetTaskListRowDeleting" msprop:Generator_RowChangingName="GetTaskListRowChanging" msprop:Generator_RowEvHandlerName="GetTaskListRowChangeEventHandler" msprop:Generator_RowDeletedName="GetTaskListRowDeleted" msprop:Generator_RowClassName="GetTaskListRow" msprop:Generator_UserTableName="GetTaskList" msprop:Generator_RowEvArgName="GetTaskListRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_Task" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_Task" msprop:Generator_ColumnPropNameInRow="ID_Task" msprop:Generator_ColumnPropNameInTable="ID_TaskColumn" msprop:Generator_UserColumnName="ID_Task" type="xs:int" />
|
||||
|
|
@ -218,7 +220,7 @@
|
|||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="CommentOnEvent" msprop:Generator_TableClassName="CommentOnEventDataTable" msprop:Generator_TableVarName="tableCommentOnEvent" msprop:Generator_TablePropName="CommentOnEvent" msprop:Generator_RowDeletingName="CommentOnEventRowDeleting" msprop:Generator_RowChangingName="CommentOnEventRowChanging" msprop:Generator_RowEvHandlerName="CommentOnEventRowChangeEventHandler" msprop:Generator_RowDeletedName="CommentOnEventRowDeleted" msprop:Generator_UserTableName="CommentOnEvent" msprop:Generator_RowChangedName="CommentOnEventRowChanged" msprop:Generator_RowEvArgName="CommentOnEventRowChangeEvent" msprop:Generator_RowClassName="CommentOnEventRow">
|
||||
<xs:element name="CommentOnEvent" msprop:Generator_TableClassName="CommentOnEventDataTable" msprop:Generator_TableVarName="tableCommentOnEvent" msprop:Generator_RowChangedName="CommentOnEventRowChanged" msprop:Generator_TablePropName="CommentOnEvent" msprop:Generator_RowDeletingName="CommentOnEventRowDeleting" msprop:Generator_RowChangingName="CommentOnEventRowChanging" msprop:Generator_RowEvHandlerName="CommentOnEventRowChangeEventHandler" msprop:Generator_RowDeletedName="CommentOnEventRowDeleted" msprop:Generator_RowClassName="CommentOnEventRow" msprop:Generator_UserTableName="CommentOnEvent" msprop:Generator_RowEvArgName="CommentOnEventRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="ID_CommnentOnEvent" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnID_CommnentOnEvent" msprop:Generator_ColumnPropNameInRow="ID_CommnentOnEvent" msprop:Generator_ColumnPropNameInTable="ID_CommnentOnEventColumn" msprop:Generator_UserColumnName="ID_CommnentOnEvent" type="xs:int" />
|
||||
|
|
@ -261,7 +263,7 @@
|
|||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="Installation" msprop:Generator_TableClassName="InstallationDataTable" msprop:Generator_TableVarName="tableInstallation" msprop:Generator_TablePropName="Installation" msprop:Generator_RowDeletingName="InstallationRowDeleting" msprop:Generator_RowChangingName="InstallationRowChanging" msprop:Generator_RowEvHandlerName="InstallationRowChangeEventHandler" msprop:Generator_RowDeletedName="InstallationRowDeleted" msprop:Generator_UserTableName="Installation" msprop:Generator_RowChangedName="InstallationRowChanged" msprop:Generator_RowEvArgName="InstallationRowChangeEvent" msprop:Generator_RowClassName="InstallationRow">
|
||||
<xs:element name="Installation" msprop:Generator_TableClassName="InstallationDataTable" msprop:Generator_TableVarName="tableInstallation" msprop:Generator_RowChangedName="InstallationRowChanged" msprop:Generator_TablePropName="Installation" msprop:Generator_RowDeletingName="InstallationRowDeleting" msprop:Generator_RowChangingName="InstallationRowChanging" msprop:Generator_RowEvHandlerName="InstallationRowChangeEventHandler" msprop:Generator_RowDeletedName="InstallationRowDeleted" msprop:Generator_RowClassName="InstallationRow" msprop:Generator_UserTableName="Installation" msprop:Generator_RowEvArgName="InstallationRowChangeEvent">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Inst_CODE" msprop:Generator_ColumnVarNameInTable="columnInst_CODE" msprop:Generator_ColumnPropNameInRow="Inst_CODE" msprop:Generator_ColumnPropNameInTable="Inst_CODEColumn" msprop:Generator_UserColumnName="Inst_CODE" type="xs:int" />
|
||||
|
|
|
|||
|
|
@ -300,8 +300,10 @@ namespace eDosStation
|
|||
#endif
|
||||
|
||||
float gain = 100.0F;
|
||||
float ChirpRate = 0F;
|
||||
if (!CurTaskRow.IsFNGain_ANGainValueNull()) gain = (int)CurTaskRow.FNGain_ANGainValue;
|
||||
int rv = ep.IssueAndCheck(gain);
|
||||
if (!CurTaskRow.IsChirpRateNull()) ChirpRate = (int)CurTaskRow.ChirpRate;
|
||||
int rv = ep.IssueAndCheck(gain, ChirpRate);
|
||||
if (rv != 0)
|
||||
{
|
||||
MessageBox.Show($"SetIssued error {rv}");
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
|
|
@ -60,12 +61,15 @@
|
|||
<TextBlock Grid.Row="1" Grid.Column="1" Name="Wearer" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="50,5,20,5" Text="12345" Foreground="{DynamicResource sckbP}" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" Text="Visit:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" Foreground="{DynamicResource sckbP}" FontWeight="Bold" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="3" Name= "EpdVisit" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,5,20,5" Text="12345545" Foreground="{DynamicResource sckbP}" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Dose:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" Foreground="{DynamicResource sckbP}" FontWeight="Bold" />
|
||||
<StackPanel Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Vertical" VerticalAlignment="Center" Name="DosePanel" >
|
||||
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" Name="Name" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50,5,20,5" Text="...." Foreground="{DynamicResource sckbP}" />
|
||||
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Dose:" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="5,5,20,5" Foreground="{DynamicResource sckbP}" FontWeight="Bold" />
|
||||
<StackPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Vertical" VerticalAlignment="Center" Name="DosePanel" >
|
||||
<TextBlock Name="HpDose07" Text="1234" HorizontalAlignment="Left" Margin="50,0,0,0" Foreground="{DynamicResource sckbP}" />
|
||||
<TextBlock Name="HpDose10" Text="1223" HorizontalAlignment="Left" Margin="50,0,0,0" Foreground="{DynamicResource sckbP}" />
|
||||
</StackPanel>
|
||||
<telerik:RadButton Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="4" Name="bCloseExit" Click="BCloseExit_Click" Content="OK" Width="190" Style="{StaticResource OkCancelButton}" Margin="0,50,0,50" VerticalAlignment="Center" />
|
||||
<telerik:RadButton Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="4" Name="bCloseExit" Click="BCloseExit_Click" Content="OK" Width="190" Style="{StaticResource OkCancelButton}" Margin="0,50,0,50" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Name="Alarm" VerticalAlignment="Center" >
|
||||
|
|
|
|||
|
|
@ -133,7 +133,8 @@ namespace eDosStation
|
|||
}
|
||||
|
||||
//Check id EPD is manual exit
|
||||
int Exited = dataInterface.VisitInfo(EpdVisitID);
|
||||
string WearerFullName = string.Empty;
|
||||
int Exited = dataInterface.VisitInfo(EpdVisitID, out WearerFullName);
|
||||
if (Exited>0)
|
||||
{
|
||||
endWithMessage($"This EPD was already returned or had a manual exit (ID:{EpdVisitID % 100})");
|
||||
|
|
@ -166,6 +167,7 @@ namespace eDosStation
|
|||
MessageBox.Show($"GetDoses {rv} er:{ep.GetDosesError}");
|
||||
|
||||
Wearer.Text = $"{ep.WearerName}";
|
||||
Wearer.Name = WearerFullName;
|
||||
EpdVisit.Text = $"{ep.WearerID}";
|
||||
HpDose07.Text = $"{ep.Hp07Name}: {ep.Hp07:0.00} µSv ";
|
||||
HpDose10.Text = $"{ep.Hp10Name}: {ep.Hp10:0.00} µSv";
|
||||
|
|
@ -188,6 +190,7 @@ namespace eDosStation
|
|||
}
|
||||
l.Dispose();
|
||||
}
|
||||
Name.Text = "";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,47 @@
|
|||
check existing user
|
||||
devcon restart "USB\VID_0EBB&PID_0340&MI_00"
|
||||
|
||||
|
||||
|
||||
|
||||
QuickDisplay
|
||||
|
||||
|
||||
0 33 Measurand1 Dose
|
||||
1 34 Measurand1 Rate
|
||||
2 49 0x31 Measurand2 Dose
|
||||
3 50 0x32 Measurand2 Rate
|
||||
4 81 0x51 Wearer Name
|
||||
5 113 0x62 Margin Used
|
||||
|
||||
|
||||
menu ( all enable mask = 17264 of 9298 of 63257)
|
||||
0 65535
|
||||
1 65511
|
||||
2 65031 535
|
||||
3 65031 535
|
||||
4 65025
|
||||
5 65283 535
|
||||
6 65529 535
|
||||
7 65427 531
|
||||
8 65535 535
|
||||
|
||||
|
||||
numDisplays: 6
|
||||
{ 0,0x0021 }
|
||||
{ 1,0x0022 }
|
||||
{ 2,0x0031 }
|
||||
{ 3,0x0032 }
|
||||
{ 4,0x0051 }
|
||||
{ 5,0x0062 }
|
||||
|
||||
numItems: 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 }
|
||||
Loading…
Add table
Reference in a new issue