diff --git a/EpdBase/EpdBase.h b/EpdBase/EpdBase.h index 31215a4..9476593 100644 --- a/EpdBase/EpdBase.h +++ b/EpdBase/EpdBase.h @@ -1,6 +1,6 @@ #pragma once #include -#include "dll2/ex15.mif" +#include "dll2/reader2.h" #include "TimeFunctions.h" diff --git a/EpdBase/dll2/Reader2.dll b/EpdBase/dll2 - Copy/Reader2.dll similarity index 100% rename from EpdBase/dll2/Reader2.dll rename to EpdBase/dll2 - Copy/Reader2.dll diff --git a/EpdBase/dll2 - Copy/Reader2.exp b/EpdBase/dll2 - Copy/Reader2.exp new file mode 100644 index 0000000..948a0ba Binary files /dev/null and b/EpdBase/dll2 - Copy/Reader2.exp differ diff --git a/EpdBase/dll2 - Copy/Reader2.lib1 b/EpdBase/dll2 - Copy/Reader2.lib1 new file mode 100644 index 0000000..3e4941f Binary files /dev/null and b/EpdBase/dll2 - Copy/Reader2.lib1 differ diff --git a/EpdBase/dll2/ex15.mif b/EpdBase/dll2 - Copy/ex15.mif similarity index 100% rename from EpdBase/dll2/ex15.mif rename to EpdBase/dll2 - Copy/ex15.mif diff --git a/EpdBase/dll2 - Copy/reader2.def b/EpdBase/dll2 - Copy/reader2.def new file mode 100644 index 0000000..fe83b1e --- /dev/null +++ b/EpdBase/dll2 - Copy/reader2.def @@ -0,0 +1,132 @@ +EXPORTS +?GetLogDirectory@@YGXPA_WG@Z +?GetLogFilename@@YGXPA_WG@Z +?GetLogIniFilename@@YGXPA_WG@Z +?GetLoggingLevel@@YGGXZ +?GetRawLoggingLevel@@YGGXZ +?GetRejectLogFilename@@YGXPA_WG@Z +?GetRejectLoggingLevel@@YGGXZ +?InitLogDirectory@@YGXXZ +?Initialize@@YGXXZ +?Log@@YAXQBDIGQB_WZZ +?LogPort@@YGXPA_WG@Z +?LogReject@@YGXGPAEK@Z +?SetLogFilename@@YGXQB_W@Z +?SetLogIniFilename@@YGXQB_W@Z +?SetLoggingLevel@@YGXG@Z +?SetRawLoggingLevel@@YGXG@Z +?SetRejectLogFilename@@YGXQB_W@Z +?SetRejectLoggingLevel@@YGXG@Z +ADSClearData +ADSClearOffEnable +ADSClearWearer +ADSDeIssue +ADSIssue +ADSLogin +ADSReadData +ADSReadWearer +ADSSetOffEnable +ADSWritePassword +Abort +AllocateMemory +BaseLineCounts +ClearDose +ClearErrorStore +ClearFailFlag +ClearFaultFlags +ClearLatchedAlarms +ClearPeakRates +ClearTotalDose +CloseDevice +Commit +Connect +DeIssueEpd +DeinitComms +Discover +DisplayFaultCode +EndSession +EpdOff +EpdOn +GetDataMetric +GetErrorDetails +InitComms +IssueEpd +MFRClearAlwaysCount +MFRClearGolden +MFRFormatEEPROM +MFRLogin +MFRResetEpd +MFRSetAlwaysCount +MFRSetGolden +MFRWriteASIC +MFRWriteCalFactors +MFRWriteDetectorThresholds +MFRWriteDirectEEPROM +MFRWriteEpdID +MFRWritePassword +MFRWriteRAM +MemoryAllocated +OpenDevice +ReadA2Config +ReadA2ConfigStatus +ReadASIC +ReadAlarmConfig +ReadAlarmDoseThresholds +ReadAlarmRateThresholds +ReadBaseCounts +ReadCalibrationData +ReadCommsStats +ReadConfig +ReadCounts +ReadDirectEEPROM +ReadDisplayConfig +ReadDoseProfile +ReadDoseProfileCache +ReadDoseProfileSince +ReadDosesQuality +ReadEpdID +ReadEpdStatus +ReadErrorStore +ReadMemory +ReadPeaks +ReadProfileControl +ReadRAM +ReadRates +ReadScratchPad +ReadSpecialDoseStore +ReadSpecialWriteTimes +ReadWearer +ReadWearerID +ReadWearerName +ReleaseMemory +SetAutoCommit +SetDiscoveryExpirationPeriod +SetDiscoveryTimeslotCount +SetDiscoveryTimeslotPeriod +SetFailFlag +SetRetryCounts +SetTimeouts +TestBattery +TestDetectors +WriteA2Config +WriteAlarmConfig +WriteAlarmDoseThresholds +WriteAlarmRateThresholds +WriteChirpRate +WriteConfig +WriteCountdownTimer +WriteDisplayConfig +WriteDisplayControlBits +WriteDisplayEnables +WriteDose +WriteMemory +WriteProfileControl +WriteReturnForReadTime +WriteScratchPad +WriteSpecialWriteTimes +WriteTotalDose +WriteWearerName +_FlushBuffers@4 +_FlushDiscoveryCache@4 +_Receive@8 +_Transmit@8 diff --git a/EpdBase/dll2 - Copy/reader2.exports b/EpdBase/dll2 - Copy/reader2.exports new file mode 100644 index 0000000..c490e19 --- /dev/null +++ b/EpdBase/dll2 - Copy/reader2.exports @@ -0,0 +1,158 @@ +Microsoft (R) COFF/PE Dumper Version 14.16.27027.1 +Copyright (C) Microsoft Corporation. All rights reserved. + + +Dump of file reader2.dll + +File Type: DLL + + Section contains the following exports for IR_READER_MS_DLL.dll + + 00000000 characteristics + 534E87DE time date stamp Wed Apr 16 15:38:38 2014 + 0.00 version + 1 ordinal base + 131 number of functions + 131 number of names + + ordinal hint RVA name + + 1 0 00007D60 ?GetLogDirectory@@YGXPA_WG@Z + 2 1 00008370 ?GetLogFilename@@YGXPA_WG@Z + 3 2 000082A0 ?GetLogIniFilename@@YGXPA_WG@Z + 4 3 000084F0 ?GetLoggingLevel@@YGGXZ + 5 4 00008550 ?GetRawLoggingLevel@@YGGXZ + 6 5 00008430 ?GetRejectLogFilename@@YGXPA_WG@Z + 7 6 00008520 ?GetRejectLoggingLevel@@YGGXZ + 8 7 00007DB0 ?InitLogDirectory@@YGXXZ + 9 8 00008160 ?Initialize@@YGXXZ + 10 9 00008580 ?Log@@YAXQBDIGQB_WZZ + 11 A 00007D90 ?LogPort@@YGXPA_WG@Z + 12 B 00008740 ?LogReject@@YGXGPAEK@Z + 13 C 000083A0 ?SetLogFilename@@YGXQB_W@Z + 14 D 000082D0 ?SetLogIniFilename@@YGXQB_W@Z + 15 E 00008500 ?SetLoggingLevel@@YGXG@Z + 16 F 00008560 ?SetRawLoggingLevel@@YGXG@Z + 17 10 00008460 ?SetRejectLogFilename@@YGXQB_W@Z + 18 11 00008530 ?SetRejectLoggingLevel@@YGXG@Z + 19 12 00005520 ADSClearData + 20 13 000055B0 ADSClearOffEnable + 21 14 00005420 ADSClearWearer + 22 15 00005500 ADSDeIssue + 23 16 00005490 ADSIssue + 24 17 000053D0 ADSLogin + 25 18 00003DB0 ADSReadData + 26 19 00005440 ADSReadWearer + 27 1A 00005590 ADSSetOffEnable + 28 1B 00005540 ADSWritePassword + 29 1C 00002940 Abort + 30 1D 00002540 AllocateMemory + 31 1E 000039B0 BaseLineCounts + 32 1F 00004840 ClearDose + 33 20 00009560 ClearErrorStore + 34 21 000039F0 ClearFailFlag + 35 22 00003A30 ClearFaultFlags + 36 23 00003A10 ClearLatchedAlarms + 37 24 000049A0 ClearPeakRates + 38 25 00004920 ClearTotalDose + 39 26 00003670 CloseDevice + 40 27 00002F90 Commit + 41 28 00002F10 Connect + 42 29 00003930 DeIssueEpd + 43 2A 00002880 DeinitComms + 44 2B 00002BE0 Discover + 45 2C 00003D90 DisplayFaultCode + 46 2D 00005100 EndSession + 47 2E 00003030 EpdOff + 48 2F 00003750 EpdOn + 51 30 00002790 GetDataMetric + 52 31 00002740 GetErrorDetails + 53 32 000027A0 InitComms + 54 33 000038D0 IssueEpd + 55 34 00003580 MFRClearAlwaysCount + 56 35 00003580 MFRClearGolden + 57 36 00003580 MFRFormatEEPROM + 58 37 000055D0 MFRLogin + 59 38 00003580 MFRResetEpd + 60 39 00003580 MFRSetAlwaysCount + 61 3A 00003580 MFRSetGolden + 62 3B 00003570 MFRWriteASIC + 63 3C 00005620 MFRWriteCalFactors + 64 3D 000056B0 MFRWriteDetectorThresholds + 65 3E 00003560 MFRWriteDirectEEPROM + 66 3F 00003590 MFRWriteEpdID + 67 40 00005980 MFRWritePassword + 68 41 00003560 MFRWriteRAM + 69 42 00002590 MemoryAllocated + 70 43 00002DD0 OpenDevice + 71 44 000059D0 ReadA2Config + 72 45 00005A30 ReadA2ConfigStatus + 73 46 00005320 ReadASIC + 74 47 00004560 ReadAlarmConfig + 75 48 00003CF0 ReadAlarmDoseThresholds + 76 49 00003D30 ReadAlarmRateThresholds + 77 4A 00003B90 ReadBaseCounts + 78 4B 00003BE0 ReadCalibrationData + 79 4C 000036F0 ReadCommsStats + 80 4D 000044D0 ReadConfig + 81 4E 00003AB0 ReadCounts + 82 4F 00005360 ReadDirectEEPROM + 83 50 000045B0 ReadDisplayConfig + 84 51 00004390 ReadDoseProfile + 85 52 00003390 ReadDoseProfileCache + 86 53 00004430 ReadDoseProfileSince + 87 54 00003A50 ReadDosesQuality + 88 55 00003080 ReadEpdID + 89 56 00003770 ReadEpdStatus + 90 57 00004610 ReadErrorStore + 91 58 00002620 ReadMemory + 92 59 00003B00 ReadPeaks + 93 5A 00003E20 ReadProfileControl + 94 5B 000052B0 ReadRAM + 95 5C 00003B50 ReadRates + 96 5D 00005130 ReadScratchPad + 97 5E 000047A0 ReadSpecialDoseStore + 98 5F 00004760 ReadSpecialWriteTimes + 99 60 00003880 ReadWearer + 100 61 00003800 ReadWearerID + 101 62 00003840 ReadWearerName + 103 63 000025D0 ReleaseMemory + 104 64 00002CF0 SetAutoCommit + 105 65 00002A20 SetDiscoveryExpirationPeriod + 106 66 00002B00 SetDiscoveryTimeslotCount + 107 67 00002A90 SetDiscoveryTimeslotPeriod + 108 68 000039D0 SetFailFlag + 109 69 00002CA0 SetRetryCounts + 110 6A 000029A0 SetTimeouts + 111 6B 00005C50 TestBattery + 112 6C 000037E0 TestDetectors + 114 6D 00005A80 WriteA2Config + 115 6E 00004B10 WriteAlarmConfig + 116 6F 00004A10 WriteAlarmDoseThresholds + 117 70 00004A80 WriteAlarmRateThresholds + 118 71 00005260 WriteChirpRate + 119 72 00004EE0 WriteConfig + 120 73 000048C0 WriteCountdownTimer + 121 74 00004CB0 WriteDisplayConfig + 122 75 00005830 WriteDisplayControlBits + 123 76 00005860 WriteDisplayEnables + 124 77 00004860 WriteDose + 125 78 000026B0 WriteMemory + 126 79 00004FB0 WriteProfileControl + 127 7A 000049C0 WriteReturnForReadTime + 128 7B 000051A0 WriteScratchPad + 129 7C 00005010 WriteSpecialWriteTimes + 130 7D 00004940 WriteTotalDose + 131 7E 00003950 WriteWearerName + 49 7F 00002EA0 _FlushBuffers@4 + 50 80 00002B70 _FlushDiscoveryCache@4 + 102 81 00002D80 _Receive@8 + 113 82 00002D30 _Transmit@8 + + Summary + + 4000 .data + 5000 .rdata + 2000 .reloc + 1000 .rsrc + 1E000 .text diff --git a/EpdBaseClr/dll2/ex15.mif b/EpdBase/dll2 - Copy/reader2.h similarity index 100% rename from EpdBaseClr/dll2/ex15.mif rename to EpdBase/dll2 - Copy/reader2.h diff --git a/EpdBase/dll2 - Copy/reader2.lib b/EpdBase/dll2 - Copy/reader2.lib new file mode 100644 index 0000000..4662cb2 Binary files /dev/null and b/EpdBase/dll2 - Copy/reader2.lib differ diff --git a/EpdBaseClr/dll2/Reader2.dll b/EpdBase/dll2 - Copy/save/Reader2.dll similarity index 100% rename from EpdBaseClr/dll2/Reader2.dll rename to EpdBase/dll2 - Copy/save/Reader2.dll diff --git a/EpdBase/dll2/Reader2.exp b/EpdBase/dll2 - Copy/save/Reader2.exp similarity index 100% rename from EpdBase/dll2/Reader2.exp rename to EpdBase/dll2 - Copy/save/Reader2.exp diff --git a/EpdBase/dll2 - Copy/save/Reader2.lib b/EpdBase/dll2 - Copy/save/Reader2.lib new file mode 100644 index 0000000..3e4941f Binary files /dev/null and b/EpdBase/dll2 - Copy/save/Reader2.lib differ diff --git a/EpdBase/dll2 - Copy/save/ex15.mif b/EpdBase/dll2 - Copy/save/ex15.mif new file mode 100644 index 0000000..2cc2b02 --- /dev/null +++ b/EpdBase/dll2 - Copy/save/ex15.mif @@ -0,0 +1,1374 @@ +/****************************************************************************** + * + * Module Name : 32 Bit Ex15 Interface DLL + * + * Module Part No. : 611/TA/40571/000 + * + * File Name : EX15.MIF + * + * File Description : Top level functions exported by the DLL. + * + * Authors: : K Ferguson + * + ****************************************************************************** + * + * This is an unpublished work, the copyright of which vests in Siemens + * plc. All rights reserved. + * + * The information contained herein is the property of Siemens plc and is + * supplied without liability for errors or omissions and no part may be + * reproduced, used or disclosed except as authorised by contract or other + * written permission. The copyright and the foregoing restriction on + * reproduction, use and disclosure extends to all the media in which this + * information may be embodied. + * + ****************************************************************************** + ****************************************************************************** + * + * MODIFICATION HISTORY + * ==================== + * + * Mod Date Inits PR Description + * --- ---- ----- --- ----------- + * AA 11/07/97 KLF - Initial version. + * AB 18/07/97 JMS - Modified to use AWP protocol. + * AC 23/07/97 JMS - Moved error source & code values from THREAD.LIF as + * they are used by external modules. + * AD 05/08/97 JMS - Added SetTimeouts() function to allow the user + * to set the comms. timeouts. + * AE 05/08/97 JMS - Clarified Discover() parameter names. + * AF 07/08/97 JMS - Seperated SetAutoCommit() from OpenDevice() + * function and added Port parameter to OpenDevice(). + * Removed now redundant TestCounts parameter from + * the ReadConfig() and WriteConfig() functions. + * AG 08/08/97 JMS - Added Connect() function. + * AH 11/08/97 JMS - Extended some of the error reporting. + * AI 12/08/97 JMS - Revamped timeouts to timeout at message/frame-level + * rather than at lower comms. levels. + * AH 15/08/97 JMS - Extended error reporting. + * Added SetDiscoveryTimeslotPeriod() function. + * AI 26/08/97 JMS - Added Transmit() and Receive() functions to allow + * lower-level calls (eg. from EXCOMM) to bypass some + * of the message layer functionality. + * AJ 27/08/97 JMS - Fixed a typo from the previous changes. + * AK 29/08/97 JMS - Added extra tests and error codes for frame buffer + * overflow and retries exceed conditions. + * AL 02/01/97 JMS - Added FlushDiscoveryCache() function to allow the + * cache to be flushed by the application. + * AM 02/10/97 JMS - Added FlushBuffers() function to allow the Tx and + * Rx buffers to be flushed by the application. + * AN 14/10/97 JMS - Corrected the type of the Hp07Dose parameter of the + * WriteAlarmDoseThresholds() function from WORD to + * DWORD. + * AO 16/10/97 JMS - Added part number, function headers, etc. following + * review. + * AP 17/10/97 JMS - Added SetRetryCounts() to allow the retry counts + * to be set by the application. + * AQ 22/10/97 JMS - Removed now redundant error codes (ERR_*). + * AR 24/10/97 JMS - Added part number for Developer's Guide doc. + * AS 02/12/97 KLF - Various corrections after testing on version 1A. + * BA 11/05/99 JMS - Changed timestamps and timeouts to use instances + * of the Timex class rather than TickCount times, as + * TickCount times will wrap-around after 49.7 days + * of continuous up-time. Changed the timeout periods + * to be long types rather than DWORD to match the + * Timex convention. + * BB 04/02/00 EMH - Added WriteDisplayControlBits and WriteDisplayEnables + * BC 30/01/01 JMP - ERR_INVALID_ALARM_SETTINGS added + * BD 30/01/01 JMP - ERR_INVALID_NUMBER_OF_ALARMS added + * BE 08/02/01 JMP - ERR_INVALID_CONFIGURATION_LENGTH added + * ERR_INVALID_DISPLAY_CONTROL added + * BF 21/02/01 JMP - ERR_SCRATCH_OFFSET_PLUS_LEN added + * BG 15/08/02 JMP - Added new ANALOG2 commands + * BH 04/10/02 JMP - Modified Analog2 interface + * BI 02/06/03 PEB - Modified for compatibility with Microsoft Embedded Tools + * & PDA version of DLL + ******************************************************************************/ + +/* + * + * IMPORTANT NOTE TO DEVELOPERS + * + * When using the DLL and not using the AutoCommit feature - that is to say + * functions are combined and processed upon a call to Commit - the following + * should be noted. + * + * 1) + * Data will not be assigned to pointers passed into functions until AFTER + * the Commit function has been called successfully. Developers should take + * care that the areas of memory that are referenced by the pointers remain + * valid until after the Commit function is called. + * + * 2) + * Functions are processed in the order that they are called. Should a call + * to the Commit function fail then the error information can be retrieved + * using the GetErrorDetails function. If the error information indicates + * that one of the combined functions failed, then the developer should assume + * that all the functions called BEFORE the one that failed, have been + * completed successfully. All the functions AFTER and INCLUDING the function + * which failed will NOT have been completed. The exception to this is Read + * functions which will NOT be completed in the conditions described above + * even if they were called BEFORE the function which failed. + * + */ + +/*============================================================================*/ + +#define SRC_NONE 0 // no error occured +#define SRC_INT 1 // internal error +#define SRC_DLL 2 // DLL logical error +#define SRC_EX15 3 // error from Ex15 + +#define ERR_NONE 0 // No error code (internal error) +#define ERR_MSG 1 // Message not expected +#define ERR_SHORT 2 // Message too short +#define ERR_LENGTH 3 // Message data length not correct +#define ERR_QUEUE 4 // Message queue overflow +#define ERR_OVER 5 // Message buffer overflow +#define ERR_PARAM 6 // Parameter error +#define ERR_MEMORY 7 // Memory allocation failed +#define ERR_NO_THREAD 8 // No thread object available +#define ERR_NO_MSG 9 // No message layer available +#define ERR_DEVICE_OPEN 10 // A device is already open +#define ERR_AWP_USER_BUFF_TOO_SMALL 11 // AWP user supplied buffer too small +#define ERR_AWP_TX_MSG_BUFF_OVERFLOW 12 // AWP message too big for buffer +#define ERR_AWP_SEQ_MISMATCH 13 // AWP sequence number mismatch +#define ERR_DISCOVERY_IN_PROGRESS 14 // Discovery in progress +#define ERR_MSG_OPEN_FAILED 15 // Message layer Open failed +#define ERR_MSG_NOT_ACTIVE 16 // Message layer not active +#define ERR_LINK_OPEN_FAILED 17 // Link layer Open failed +#define ERR_INVALID_FRAME 18 // Link layer invalid frame +#define ERR_FRAME_TX_TIMEOUT 19 // Link layer frame Tx timeout +#define ERR_OPEN_PORT_FAILED 20 // Link open device port failed +#define ERR_CLOSE_PORT_FAILED 21 // Link close device port failed +#define ERR_SET_PORT_TIMEOUTS_FAILED 22 // Link set port timeouts failed +#define ERR_FRAME_RX_BUFF_OVERFLOW 23 // Frame Rx buffer overflowed +#define ERR_FRAME_TX_RETRIES_EXCEEDED 24 // Frame Tx retry count exceeded +#define ERR_FRAME_RX_RETRIES_EXCEEDED 25 // Frame Rx retry count exceeded +#define ERR_FRAME_RX_RESULT_UNKNOWN 26 // Frame Receive() result unknown +#define ERR_INDEX_TOO_LARGE 27 // index greater than profile entries +#define ERR_INVALID_ALARM_SETTINGS 28 // This EPD may NOT have alarms 'off' +#define ERR_INVALID_NUMBER_OF_ALARMS 29 // Passed Alarm array is incorrect size. +#define ERR_INVALID_CONFIGURATION_LENGTH 30 // Passed Display Configuration is incorrect size. +#define ERR_INVALID_DISPLAY_CONTROL 31 // This EPD may NOT have Display Units Changed. +#define ERR_SCRATCH_OFFSET_PLUS_LEN 32 // This area of scratchpad may not be written. + +/*============================================================================*/ + +#ifdef __BORLANDC__ + #define EPDDLL_API _export +#else //assume microsoft + #ifdef EPDDLL_EXPORTS + #define EPDDLL_API __declspec(dllexport) + #else + #define EPDDLL_API __declspec(dllimport) + #endif +#endif + +#ifdef _WIN32_WCE //Windows CE / pocket PC +#define PDA_BUILD +#endif + +extern "C" +{ + +#ifndef PDA_BUILD //Only included on Desktop DLLs +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +EPDDLL_API void* WINAPI AllocateMemory( DWORD Size ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MemoryAllocated( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReleaseMemory( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +#endif //PDA BUILD + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetErrorDetails( + + WORD* const Source, WORD* const Reason, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetDataMetric( WORD MetricNumber, WORD* const Metric ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI InitComms( + + WORD Port, DWORD Baud, WORD Data, WORD Parity, WORD Stop ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeinitComms( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Abort( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetTimeouts( WORD Port, long RxByteTimeout, + long RxMessageTimeout, long TxMessageTimeout ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryExpirationPeriod( WORD Port, + long ExpirationPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotPeriod( WORD Port, long TimeslotPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotCount( WORD Port, WORD TimeslotCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushDiscoveryCache( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Discover( WORD Port, DWORD* DeviceIDs, WORD MaxDevices, + WORD* const Count ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetRetryCounts( WORD RxRetryCount, WORD TxRetryCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetAutoCommit( WORD AutoCommit ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI OpenDevice( WORD Port, DWORD DeviceID ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI CloseDevice( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushBuffers( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Connect( DWORD DeviceID ); + +#define ALLOW_LOW_LEVEL +#ifdef ALLOW_LOW_LEVEL +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Transmit( BYTE* TxBuffer, DWORD TxLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Receive( BYTE* RxBuffer, DWORD* RxLength ); +#endif /* ALLOW_LOW_LEVEL */ + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Commit( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCommsStats( + + WORD* const XBOFSeen, + WORD* const TotalTxFrames, + WORD* const TotalRxFrames, + WORD* const GoodRxFrames, + WORD* const BadRxFrames, + WORD* const TotalWakeups, + WORD* const RxErrors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOn( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOff( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdID( + + DWORD* const EpdID, + WORD* const HardVersion, + WORD* const SoftVersion, + WORD* const FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdStatus( + + DWORD* const EpdClock, + DWORD* const RealTime, + WORD* const IssueCount, + DWORD* const OffTime, + WORD* const OperatingStatus, + WORD* const ErrorStatus, + WORD* const AlarmsStatus, + WORD* const OtherAlarms, + WORD* const EEPROMBadSectors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestDetectors( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerID( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI IssueEpd( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeIssueEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI BaseLineCounts( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearLatchedAlarms( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFaultFlags( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDosesQuality( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + DWORD* const Hp10Total, DWORD* const Hp07Total, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadPeaks( + + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRates( DWORD* const Hp10Rate, DWORD* const Hp07Rate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadBaseCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCalibrationData( + + WORD* const K1, WORD* const K2, WORD* const K3, + WORD* const K4, WORD* const K5, WORD* const K6, + WORD* const SG, WORD* const BC, WORD* const FB, WORD* const HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmDoseThresholds( + + DWORD* const Hp10Dose1, DWORD* const Hp10Dose2, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmRateThresholds( + + DWORD* const Hp10Rate1On, DWORD* const Hp10Rate2On, DWORD* const Hp07RateOn, + DWORD* const Hp10Rate1Off, DWORD* const Hp10Rate2Off, DWORD* const Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DisplayFaultCode( WORD FaultCode ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadData( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData, + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadProfileControl( + + WORD* const Interval, DWORD* const TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfile( WORD* const ProfileEntries ); + +WORD EPDDLL_API WINAPI ReadDoseProfileSince( + + DWORD EpdClock, WORD* const ProfileEntries ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfileCache( + + WORD Index, + DWORD* const EpdClock, WORD* const Interval, + DWORD* const Hp10Dose, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadConfig( + + WORD* const CountDownTime, + DWORD* const ReturnTime, + WORD* const ChirpRate, + WORD* const TeleBaudSetting, + WORD* const SelfTestInterval, + WORD* const BatteryLoadTestInt, + WORD* const GeneralControl, + WORD* const CommsTimeout, + WORD* const InhibitTimeout, + WORD* const MinTxInterval, + WORD* const MaxTxIntervals, + WORD* const RandomiseWindow, + WORD* const DoseIncThresh ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDisplayConfig( + + WORD* const Control, + WORD* const LongSwitchTime, + WORD* const DoubleClickTime, + WORD* const DisplayDefaultTime, + WORD* const Default, + BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadErrorStore( + + DWORD* const ErrorTime, WORD TimeLength, + BYTE* const ErrorCode, WORD CodeLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialWriteTimes( DWORD* const WriteTimes, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialDoseStore( + + WORD Index, WORD Count, + DWORD* const Hp10Dose, WORD Hp10Length, + DWORD* const Hp07Dose, WORD Hp07Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearErrorStore( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDose( DWORD Hp10Dose, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteCountdownTimer( WORD wCountDownTime, WORD wStartNow ); + +/*----------------------------------------------------------------------------* + * + * This function (WriteCountdownTimer) was written after the Developers Guide + * to the Ex15 Interface DLL (611/HB/40571/000) + * The first parameter wdCountDownTime is the count down time in seconds + * The second param byStartNow is a boolean to start the timer now + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearTotalDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteTotalDose( DWORD Hp10Total, DWORD Hp07Total ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearPeakRates( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteReturnForReadTime( DWORD ReturnTime ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmDoseThresholds( + + DWORD Hp10Dose1, DWORD Hp10Dose2, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmRateThresholds( + + DWORD Hp10Rate1On, DWORD Hp10Rate2On, DWORD Hp07RateOn, + DWORD Hp10Rate1Off, DWORD Hp10Rate2Off, DWORD Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayConfig( + WORD Control, + WORD LongSwitchTime, + WORD DoubleClickTime, + WORD DisplayDefaultTime, + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayControlBits( WORD DisplayControlBits ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteDisplayEnables( + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteConfig( + + 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 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteProfileControl( WORD Interval, DWORD TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteSpecialWriteTimes( + + DWORD* const WriteTimes, WORD Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EndSession( WORD AlarmCtrl, WORD Duration ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteChirpRate( WORD ChirpRate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRAM( + + WORD Offset, WORD Length , void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadASIC( WORD Register, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearWearer( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSIssue( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSDeIssue( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearData( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSWritePassword( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSSetOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteCalFactors( + + WORD K1, WORD K2, WORD K3, WORD K4, WORD K5, WORD K6 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDetectorThresholds( + + WORD SG, WORD BC, WORD FB, WORD HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteRAM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRResetEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRFormatEEPROM( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteASIC( WORD Register, WORD Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteEpdID( + + DWORD EpdID, + WORD HardVersion, + WORD SoftVersion, + WORD FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWritePassword( DWORD Password ); + + + +//additional commands for ANALOG2 +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2Config( + BYTE* const byADC_LA, + BYTE* const byADC_LL, + BYTE* const byADC_SUPPLY, + BYTE* const byADC_BAT_TYPE, + WORD* const wOffDisplay, + BYTE* const byConfig7, + BYTE* const byConfig8); +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2ConfigStatus( + BYTE* const byBatADC, + BYTE* const bySupplyADC, + BYTE* const byStatus3, + BYTE* const byStatus4); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteA2Config( + BYTE byADC_LA, + BYTE byADC_LL, + BYTE byADC_SUPPLY, + BYTE byADC_BAT_TYPE, + WORD wOffDisplay, + BYTE byConfig7, + BYTE byConfig8 ); + + /*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestBattery( void ); + + + +} diff --git a/EpdBase/dll2/reader2.h b/EpdBase/dll2/reader2.h new file mode 100644 index 0000000..2cc2b02 --- /dev/null +++ b/EpdBase/dll2/reader2.h @@ -0,0 +1,1374 @@ +/****************************************************************************** + * + * Module Name : 32 Bit Ex15 Interface DLL + * + * Module Part No. : 611/TA/40571/000 + * + * File Name : EX15.MIF + * + * File Description : Top level functions exported by the DLL. + * + * Authors: : K Ferguson + * + ****************************************************************************** + * + * This is an unpublished work, the copyright of which vests in Siemens + * plc. All rights reserved. + * + * The information contained herein is the property of Siemens plc and is + * supplied without liability for errors or omissions and no part may be + * reproduced, used or disclosed except as authorised by contract or other + * written permission. The copyright and the foregoing restriction on + * reproduction, use and disclosure extends to all the media in which this + * information may be embodied. + * + ****************************************************************************** + ****************************************************************************** + * + * MODIFICATION HISTORY + * ==================== + * + * Mod Date Inits PR Description + * --- ---- ----- --- ----------- + * AA 11/07/97 KLF - Initial version. + * AB 18/07/97 JMS - Modified to use AWP protocol. + * AC 23/07/97 JMS - Moved error source & code values from THREAD.LIF as + * they are used by external modules. + * AD 05/08/97 JMS - Added SetTimeouts() function to allow the user + * to set the comms. timeouts. + * AE 05/08/97 JMS - Clarified Discover() parameter names. + * AF 07/08/97 JMS - Seperated SetAutoCommit() from OpenDevice() + * function and added Port parameter to OpenDevice(). + * Removed now redundant TestCounts parameter from + * the ReadConfig() and WriteConfig() functions. + * AG 08/08/97 JMS - Added Connect() function. + * AH 11/08/97 JMS - Extended some of the error reporting. + * AI 12/08/97 JMS - Revamped timeouts to timeout at message/frame-level + * rather than at lower comms. levels. + * AH 15/08/97 JMS - Extended error reporting. + * Added SetDiscoveryTimeslotPeriod() function. + * AI 26/08/97 JMS - Added Transmit() and Receive() functions to allow + * lower-level calls (eg. from EXCOMM) to bypass some + * of the message layer functionality. + * AJ 27/08/97 JMS - Fixed a typo from the previous changes. + * AK 29/08/97 JMS - Added extra tests and error codes for frame buffer + * overflow and retries exceed conditions. + * AL 02/01/97 JMS - Added FlushDiscoveryCache() function to allow the + * cache to be flushed by the application. + * AM 02/10/97 JMS - Added FlushBuffers() function to allow the Tx and + * Rx buffers to be flushed by the application. + * AN 14/10/97 JMS - Corrected the type of the Hp07Dose parameter of the + * WriteAlarmDoseThresholds() function from WORD to + * DWORD. + * AO 16/10/97 JMS - Added part number, function headers, etc. following + * review. + * AP 17/10/97 JMS - Added SetRetryCounts() to allow the retry counts + * to be set by the application. + * AQ 22/10/97 JMS - Removed now redundant error codes (ERR_*). + * AR 24/10/97 JMS - Added part number for Developer's Guide doc. + * AS 02/12/97 KLF - Various corrections after testing on version 1A. + * BA 11/05/99 JMS - Changed timestamps and timeouts to use instances + * of the Timex class rather than TickCount times, as + * TickCount times will wrap-around after 49.7 days + * of continuous up-time. Changed the timeout periods + * to be long types rather than DWORD to match the + * Timex convention. + * BB 04/02/00 EMH - Added WriteDisplayControlBits and WriteDisplayEnables + * BC 30/01/01 JMP - ERR_INVALID_ALARM_SETTINGS added + * BD 30/01/01 JMP - ERR_INVALID_NUMBER_OF_ALARMS added + * BE 08/02/01 JMP - ERR_INVALID_CONFIGURATION_LENGTH added + * ERR_INVALID_DISPLAY_CONTROL added + * BF 21/02/01 JMP - ERR_SCRATCH_OFFSET_PLUS_LEN added + * BG 15/08/02 JMP - Added new ANALOG2 commands + * BH 04/10/02 JMP - Modified Analog2 interface + * BI 02/06/03 PEB - Modified for compatibility with Microsoft Embedded Tools + * & PDA version of DLL + ******************************************************************************/ + +/* + * + * IMPORTANT NOTE TO DEVELOPERS + * + * When using the DLL and not using the AutoCommit feature - that is to say + * functions are combined and processed upon a call to Commit - the following + * should be noted. + * + * 1) + * Data will not be assigned to pointers passed into functions until AFTER + * the Commit function has been called successfully. Developers should take + * care that the areas of memory that are referenced by the pointers remain + * valid until after the Commit function is called. + * + * 2) + * Functions are processed in the order that they are called. Should a call + * to the Commit function fail then the error information can be retrieved + * using the GetErrorDetails function. If the error information indicates + * that one of the combined functions failed, then the developer should assume + * that all the functions called BEFORE the one that failed, have been + * completed successfully. All the functions AFTER and INCLUDING the function + * which failed will NOT have been completed. The exception to this is Read + * functions which will NOT be completed in the conditions described above + * even if they were called BEFORE the function which failed. + * + */ + +/*============================================================================*/ + +#define SRC_NONE 0 // no error occured +#define SRC_INT 1 // internal error +#define SRC_DLL 2 // DLL logical error +#define SRC_EX15 3 // error from Ex15 + +#define ERR_NONE 0 // No error code (internal error) +#define ERR_MSG 1 // Message not expected +#define ERR_SHORT 2 // Message too short +#define ERR_LENGTH 3 // Message data length not correct +#define ERR_QUEUE 4 // Message queue overflow +#define ERR_OVER 5 // Message buffer overflow +#define ERR_PARAM 6 // Parameter error +#define ERR_MEMORY 7 // Memory allocation failed +#define ERR_NO_THREAD 8 // No thread object available +#define ERR_NO_MSG 9 // No message layer available +#define ERR_DEVICE_OPEN 10 // A device is already open +#define ERR_AWP_USER_BUFF_TOO_SMALL 11 // AWP user supplied buffer too small +#define ERR_AWP_TX_MSG_BUFF_OVERFLOW 12 // AWP message too big for buffer +#define ERR_AWP_SEQ_MISMATCH 13 // AWP sequence number mismatch +#define ERR_DISCOVERY_IN_PROGRESS 14 // Discovery in progress +#define ERR_MSG_OPEN_FAILED 15 // Message layer Open failed +#define ERR_MSG_NOT_ACTIVE 16 // Message layer not active +#define ERR_LINK_OPEN_FAILED 17 // Link layer Open failed +#define ERR_INVALID_FRAME 18 // Link layer invalid frame +#define ERR_FRAME_TX_TIMEOUT 19 // Link layer frame Tx timeout +#define ERR_OPEN_PORT_FAILED 20 // Link open device port failed +#define ERR_CLOSE_PORT_FAILED 21 // Link close device port failed +#define ERR_SET_PORT_TIMEOUTS_FAILED 22 // Link set port timeouts failed +#define ERR_FRAME_RX_BUFF_OVERFLOW 23 // Frame Rx buffer overflowed +#define ERR_FRAME_TX_RETRIES_EXCEEDED 24 // Frame Tx retry count exceeded +#define ERR_FRAME_RX_RETRIES_EXCEEDED 25 // Frame Rx retry count exceeded +#define ERR_FRAME_RX_RESULT_UNKNOWN 26 // Frame Receive() result unknown +#define ERR_INDEX_TOO_LARGE 27 // index greater than profile entries +#define ERR_INVALID_ALARM_SETTINGS 28 // This EPD may NOT have alarms 'off' +#define ERR_INVALID_NUMBER_OF_ALARMS 29 // Passed Alarm array is incorrect size. +#define ERR_INVALID_CONFIGURATION_LENGTH 30 // Passed Display Configuration is incorrect size. +#define ERR_INVALID_DISPLAY_CONTROL 31 // This EPD may NOT have Display Units Changed. +#define ERR_SCRATCH_OFFSET_PLUS_LEN 32 // This area of scratchpad may not be written. + +/*============================================================================*/ + +#ifdef __BORLANDC__ + #define EPDDLL_API _export +#else //assume microsoft + #ifdef EPDDLL_EXPORTS + #define EPDDLL_API __declspec(dllexport) + #else + #define EPDDLL_API __declspec(dllimport) + #endif +#endif + +#ifdef _WIN32_WCE //Windows CE / pocket PC +#define PDA_BUILD +#endif + +extern "C" +{ + +#ifndef PDA_BUILD //Only included on Desktop DLLs +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +EPDDLL_API void* WINAPI AllocateMemory( DWORD Size ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MemoryAllocated( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReleaseMemory( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +#endif //PDA BUILD + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetErrorDetails( + + WORD* const Source, WORD* const Reason, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetDataMetric( WORD MetricNumber, WORD* const Metric ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI InitComms( + + WORD Port, DWORD Baud, WORD Data, WORD Parity, WORD Stop ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeinitComms( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Abort( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetTimeouts( WORD Port, long RxByteTimeout, + long RxMessageTimeout, long TxMessageTimeout ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryExpirationPeriod( WORD Port, + long ExpirationPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotPeriod( WORD Port, long TimeslotPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotCount( WORD Port, WORD TimeslotCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushDiscoveryCache( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Discover( WORD Port, DWORD* DeviceIDs, WORD MaxDevices, + WORD* const Count ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetRetryCounts( WORD RxRetryCount, WORD TxRetryCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetAutoCommit( WORD AutoCommit ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI OpenDevice( WORD Port, DWORD DeviceID ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI CloseDevice( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushBuffers( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Connect( DWORD DeviceID ); + +#define ALLOW_LOW_LEVEL +#ifdef ALLOW_LOW_LEVEL +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Transmit( BYTE* TxBuffer, DWORD TxLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Receive( BYTE* RxBuffer, DWORD* RxLength ); +#endif /* ALLOW_LOW_LEVEL */ + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Commit( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCommsStats( + + WORD* const XBOFSeen, + WORD* const TotalTxFrames, + WORD* const TotalRxFrames, + WORD* const GoodRxFrames, + WORD* const BadRxFrames, + WORD* const TotalWakeups, + WORD* const RxErrors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOn( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOff( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdID( + + DWORD* const EpdID, + WORD* const HardVersion, + WORD* const SoftVersion, + WORD* const FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdStatus( + + DWORD* const EpdClock, + DWORD* const RealTime, + WORD* const IssueCount, + DWORD* const OffTime, + WORD* const OperatingStatus, + WORD* const ErrorStatus, + WORD* const AlarmsStatus, + WORD* const OtherAlarms, + WORD* const EEPROMBadSectors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestDetectors( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerID( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI IssueEpd( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeIssueEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI BaseLineCounts( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearLatchedAlarms( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFaultFlags( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDosesQuality( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + DWORD* const Hp10Total, DWORD* const Hp07Total, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadPeaks( + + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRates( DWORD* const Hp10Rate, DWORD* const Hp07Rate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadBaseCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCalibrationData( + + WORD* const K1, WORD* const K2, WORD* const K3, + WORD* const K4, WORD* const K5, WORD* const K6, + WORD* const SG, WORD* const BC, WORD* const FB, WORD* const HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmDoseThresholds( + + DWORD* const Hp10Dose1, DWORD* const Hp10Dose2, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmRateThresholds( + + DWORD* const Hp10Rate1On, DWORD* const Hp10Rate2On, DWORD* const Hp07RateOn, + DWORD* const Hp10Rate1Off, DWORD* const Hp10Rate2Off, DWORD* const Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DisplayFaultCode( WORD FaultCode ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadData( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData, + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadProfileControl( + + WORD* const Interval, DWORD* const TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfile( WORD* const ProfileEntries ); + +WORD EPDDLL_API WINAPI ReadDoseProfileSince( + + DWORD EpdClock, WORD* const ProfileEntries ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfileCache( + + WORD Index, + DWORD* const EpdClock, WORD* const Interval, + DWORD* const Hp10Dose, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadConfig( + + WORD* const CountDownTime, + DWORD* const ReturnTime, + WORD* const ChirpRate, + WORD* const TeleBaudSetting, + WORD* const SelfTestInterval, + WORD* const BatteryLoadTestInt, + WORD* const GeneralControl, + WORD* const CommsTimeout, + WORD* const InhibitTimeout, + WORD* const MinTxInterval, + WORD* const MaxTxIntervals, + WORD* const RandomiseWindow, + WORD* const DoseIncThresh ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDisplayConfig( + + WORD* const Control, + WORD* const LongSwitchTime, + WORD* const DoubleClickTime, + WORD* const DisplayDefaultTime, + WORD* const Default, + BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadErrorStore( + + DWORD* const ErrorTime, WORD TimeLength, + BYTE* const ErrorCode, WORD CodeLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialWriteTimes( DWORD* const WriteTimes, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialDoseStore( + + WORD Index, WORD Count, + DWORD* const Hp10Dose, WORD Hp10Length, + DWORD* const Hp07Dose, WORD Hp07Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearErrorStore( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDose( DWORD Hp10Dose, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteCountdownTimer( WORD wCountDownTime, WORD wStartNow ); + +/*----------------------------------------------------------------------------* + * + * This function (WriteCountdownTimer) was written after the Developers Guide + * to the Ex15 Interface DLL (611/HB/40571/000) + * The first parameter wdCountDownTime is the count down time in seconds + * The second param byStartNow is a boolean to start the timer now + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearTotalDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteTotalDose( DWORD Hp10Total, DWORD Hp07Total ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearPeakRates( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteReturnForReadTime( DWORD ReturnTime ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmDoseThresholds( + + DWORD Hp10Dose1, DWORD Hp10Dose2, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmRateThresholds( + + DWORD Hp10Rate1On, DWORD Hp10Rate2On, DWORD Hp07RateOn, + DWORD Hp10Rate1Off, DWORD Hp10Rate2Off, DWORD Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayConfig( + WORD Control, + WORD LongSwitchTime, + WORD DoubleClickTime, + WORD DisplayDefaultTime, + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayControlBits( WORD DisplayControlBits ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteDisplayEnables( + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteConfig( + + 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 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteProfileControl( WORD Interval, DWORD TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteSpecialWriteTimes( + + DWORD* const WriteTimes, WORD Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EndSession( WORD AlarmCtrl, WORD Duration ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteChirpRate( WORD ChirpRate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRAM( + + WORD Offset, WORD Length , void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadASIC( WORD Register, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearWearer( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSIssue( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSDeIssue( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearData( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSWritePassword( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSSetOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteCalFactors( + + WORD K1, WORD K2, WORD K3, WORD K4, WORD K5, WORD K6 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDetectorThresholds( + + WORD SG, WORD BC, WORD FB, WORD HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteRAM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRResetEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRFormatEEPROM( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteASIC( WORD Register, WORD Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteEpdID( + + DWORD EpdID, + WORD HardVersion, + WORD SoftVersion, + WORD FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWritePassword( DWORD Password ); + + + +//additional commands for ANALOG2 +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2Config( + BYTE* const byADC_LA, + BYTE* const byADC_LL, + BYTE* const byADC_SUPPLY, + BYTE* const byADC_BAT_TYPE, + WORD* const wOffDisplay, + BYTE* const byConfig7, + BYTE* const byConfig8); +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2ConfigStatus( + BYTE* const byBatADC, + BYTE* const bySupplyADC, + BYTE* const byStatus3, + BYTE* const byStatus4); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteA2Config( + BYTE byADC_LA, + BYTE byADC_LL, + BYTE byADC_SUPPLY, + BYTE byADC_BAT_TYPE, + WORD wOffDisplay, + BYTE byConfig7, + BYTE byConfig8 ); + + /*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestBattery( void ); + + + +} diff --git a/EpdBaseClr/dll2/IR_READER_MS_DLL.dll b/EpdBase/dll2/test/IR_READER_MS_DLL.dll similarity index 100% rename from EpdBaseClr/dll2/IR_READER_MS_DLL.dll rename to EpdBase/dll2/test/IR_READER_MS_DLL.dll diff --git a/EpdBase/dll2/test/Reader2.dll b/EpdBase/dll2/test/Reader2.dll new file mode 100644 index 0000000..3edbef2 Binary files /dev/null and b/EpdBase/dll2/test/Reader2.dll differ diff --git a/EpdBase/dll2/test/Reader2.exp b/EpdBase/dll2/test/Reader2.exp new file mode 100644 index 0000000..a0a0dc0 Binary files /dev/null and b/EpdBase/dll2/test/Reader2.exp differ diff --git a/EpdBase/dll2/test/Reader2.lib1 b/EpdBase/dll2/test/Reader2.lib1 new file mode 100644 index 0000000..3e4941f Binary files /dev/null and b/EpdBase/dll2/test/Reader2.lib1 differ diff --git a/EpdBase/dll2/test/ex15.mif b/EpdBase/dll2/test/ex15.mif new file mode 100644 index 0000000..2cc2b02 --- /dev/null +++ b/EpdBase/dll2/test/ex15.mif @@ -0,0 +1,1374 @@ +/****************************************************************************** + * + * Module Name : 32 Bit Ex15 Interface DLL + * + * Module Part No. : 611/TA/40571/000 + * + * File Name : EX15.MIF + * + * File Description : Top level functions exported by the DLL. + * + * Authors: : K Ferguson + * + ****************************************************************************** + * + * This is an unpublished work, the copyright of which vests in Siemens + * plc. All rights reserved. + * + * The information contained herein is the property of Siemens plc and is + * supplied without liability for errors or omissions and no part may be + * reproduced, used or disclosed except as authorised by contract or other + * written permission. The copyright and the foregoing restriction on + * reproduction, use and disclosure extends to all the media in which this + * information may be embodied. + * + ****************************************************************************** + ****************************************************************************** + * + * MODIFICATION HISTORY + * ==================== + * + * Mod Date Inits PR Description + * --- ---- ----- --- ----------- + * AA 11/07/97 KLF - Initial version. + * AB 18/07/97 JMS - Modified to use AWP protocol. + * AC 23/07/97 JMS - Moved error source & code values from THREAD.LIF as + * they are used by external modules. + * AD 05/08/97 JMS - Added SetTimeouts() function to allow the user + * to set the comms. timeouts. + * AE 05/08/97 JMS - Clarified Discover() parameter names. + * AF 07/08/97 JMS - Seperated SetAutoCommit() from OpenDevice() + * function and added Port parameter to OpenDevice(). + * Removed now redundant TestCounts parameter from + * the ReadConfig() and WriteConfig() functions. + * AG 08/08/97 JMS - Added Connect() function. + * AH 11/08/97 JMS - Extended some of the error reporting. + * AI 12/08/97 JMS - Revamped timeouts to timeout at message/frame-level + * rather than at lower comms. levels. + * AH 15/08/97 JMS - Extended error reporting. + * Added SetDiscoveryTimeslotPeriod() function. + * AI 26/08/97 JMS - Added Transmit() and Receive() functions to allow + * lower-level calls (eg. from EXCOMM) to bypass some + * of the message layer functionality. + * AJ 27/08/97 JMS - Fixed a typo from the previous changes. + * AK 29/08/97 JMS - Added extra tests and error codes for frame buffer + * overflow and retries exceed conditions. + * AL 02/01/97 JMS - Added FlushDiscoveryCache() function to allow the + * cache to be flushed by the application. + * AM 02/10/97 JMS - Added FlushBuffers() function to allow the Tx and + * Rx buffers to be flushed by the application. + * AN 14/10/97 JMS - Corrected the type of the Hp07Dose parameter of the + * WriteAlarmDoseThresholds() function from WORD to + * DWORD. + * AO 16/10/97 JMS - Added part number, function headers, etc. following + * review. + * AP 17/10/97 JMS - Added SetRetryCounts() to allow the retry counts + * to be set by the application. + * AQ 22/10/97 JMS - Removed now redundant error codes (ERR_*). + * AR 24/10/97 JMS - Added part number for Developer's Guide doc. + * AS 02/12/97 KLF - Various corrections after testing on version 1A. + * BA 11/05/99 JMS - Changed timestamps and timeouts to use instances + * of the Timex class rather than TickCount times, as + * TickCount times will wrap-around after 49.7 days + * of continuous up-time. Changed the timeout periods + * to be long types rather than DWORD to match the + * Timex convention. + * BB 04/02/00 EMH - Added WriteDisplayControlBits and WriteDisplayEnables + * BC 30/01/01 JMP - ERR_INVALID_ALARM_SETTINGS added + * BD 30/01/01 JMP - ERR_INVALID_NUMBER_OF_ALARMS added + * BE 08/02/01 JMP - ERR_INVALID_CONFIGURATION_LENGTH added + * ERR_INVALID_DISPLAY_CONTROL added + * BF 21/02/01 JMP - ERR_SCRATCH_OFFSET_PLUS_LEN added + * BG 15/08/02 JMP - Added new ANALOG2 commands + * BH 04/10/02 JMP - Modified Analog2 interface + * BI 02/06/03 PEB - Modified for compatibility with Microsoft Embedded Tools + * & PDA version of DLL + ******************************************************************************/ + +/* + * + * IMPORTANT NOTE TO DEVELOPERS + * + * When using the DLL and not using the AutoCommit feature - that is to say + * functions are combined and processed upon a call to Commit - the following + * should be noted. + * + * 1) + * Data will not be assigned to pointers passed into functions until AFTER + * the Commit function has been called successfully. Developers should take + * care that the areas of memory that are referenced by the pointers remain + * valid until after the Commit function is called. + * + * 2) + * Functions are processed in the order that they are called. Should a call + * to the Commit function fail then the error information can be retrieved + * using the GetErrorDetails function. If the error information indicates + * that one of the combined functions failed, then the developer should assume + * that all the functions called BEFORE the one that failed, have been + * completed successfully. All the functions AFTER and INCLUDING the function + * which failed will NOT have been completed. The exception to this is Read + * functions which will NOT be completed in the conditions described above + * even if they were called BEFORE the function which failed. + * + */ + +/*============================================================================*/ + +#define SRC_NONE 0 // no error occured +#define SRC_INT 1 // internal error +#define SRC_DLL 2 // DLL logical error +#define SRC_EX15 3 // error from Ex15 + +#define ERR_NONE 0 // No error code (internal error) +#define ERR_MSG 1 // Message not expected +#define ERR_SHORT 2 // Message too short +#define ERR_LENGTH 3 // Message data length not correct +#define ERR_QUEUE 4 // Message queue overflow +#define ERR_OVER 5 // Message buffer overflow +#define ERR_PARAM 6 // Parameter error +#define ERR_MEMORY 7 // Memory allocation failed +#define ERR_NO_THREAD 8 // No thread object available +#define ERR_NO_MSG 9 // No message layer available +#define ERR_DEVICE_OPEN 10 // A device is already open +#define ERR_AWP_USER_BUFF_TOO_SMALL 11 // AWP user supplied buffer too small +#define ERR_AWP_TX_MSG_BUFF_OVERFLOW 12 // AWP message too big for buffer +#define ERR_AWP_SEQ_MISMATCH 13 // AWP sequence number mismatch +#define ERR_DISCOVERY_IN_PROGRESS 14 // Discovery in progress +#define ERR_MSG_OPEN_FAILED 15 // Message layer Open failed +#define ERR_MSG_NOT_ACTIVE 16 // Message layer not active +#define ERR_LINK_OPEN_FAILED 17 // Link layer Open failed +#define ERR_INVALID_FRAME 18 // Link layer invalid frame +#define ERR_FRAME_TX_TIMEOUT 19 // Link layer frame Tx timeout +#define ERR_OPEN_PORT_FAILED 20 // Link open device port failed +#define ERR_CLOSE_PORT_FAILED 21 // Link close device port failed +#define ERR_SET_PORT_TIMEOUTS_FAILED 22 // Link set port timeouts failed +#define ERR_FRAME_RX_BUFF_OVERFLOW 23 // Frame Rx buffer overflowed +#define ERR_FRAME_TX_RETRIES_EXCEEDED 24 // Frame Tx retry count exceeded +#define ERR_FRAME_RX_RETRIES_EXCEEDED 25 // Frame Rx retry count exceeded +#define ERR_FRAME_RX_RESULT_UNKNOWN 26 // Frame Receive() result unknown +#define ERR_INDEX_TOO_LARGE 27 // index greater than profile entries +#define ERR_INVALID_ALARM_SETTINGS 28 // This EPD may NOT have alarms 'off' +#define ERR_INVALID_NUMBER_OF_ALARMS 29 // Passed Alarm array is incorrect size. +#define ERR_INVALID_CONFIGURATION_LENGTH 30 // Passed Display Configuration is incorrect size. +#define ERR_INVALID_DISPLAY_CONTROL 31 // This EPD may NOT have Display Units Changed. +#define ERR_SCRATCH_OFFSET_PLUS_LEN 32 // This area of scratchpad may not be written. + +/*============================================================================*/ + +#ifdef __BORLANDC__ + #define EPDDLL_API _export +#else //assume microsoft + #ifdef EPDDLL_EXPORTS + #define EPDDLL_API __declspec(dllexport) + #else + #define EPDDLL_API __declspec(dllimport) + #endif +#endif + +#ifdef _WIN32_WCE //Windows CE / pocket PC +#define PDA_BUILD +#endif + +extern "C" +{ + +#ifndef PDA_BUILD //Only included on Desktop DLLs +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +EPDDLL_API void* WINAPI AllocateMemory( DWORD Size ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MemoryAllocated( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReleaseMemory( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +#endif //PDA BUILD + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetErrorDetails( + + WORD* const Source, WORD* const Reason, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetDataMetric( WORD MetricNumber, WORD* const Metric ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI InitComms( + + WORD Port, DWORD Baud, WORD Data, WORD Parity, WORD Stop ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeinitComms( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Abort( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetTimeouts( WORD Port, long RxByteTimeout, + long RxMessageTimeout, long TxMessageTimeout ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryExpirationPeriod( WORD Port, + long ExpirationPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotPeriod( WORD Port, long TimeslotPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotCount( WORD Port, WORD TimeslotCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushDiscoveryCache( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Discover( WORD Port, DWORD* DeviceIDs, WORD MaxDevices, + WORD* const Count ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetRetryCounts( WORD RxRetryCount, WORD TxRetryCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetAutoCommit( WORD AutoCommit ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI OpenDevice( WORD Port, DWORD DeviceID ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI CloseDevice( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushBuffers( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Connect( DWORD DeviceID ); + +#define ALLOW_LOW_LEVEL +#ifdef ALLOW_LOW_LEVEL +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Transmit( BYTE* TxBuffer, DWORD TxLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Receive( BYTE* RxBuffer, DWORD* RxLength ); +#endif /* ALLOW_LOW_LEVEL */ + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Commit( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCommsStats( + + WORD* const XBOFSeen, + WORD* const TotalTxFrames, + WORD* const TotalRxFrames, + WORD* const GoodRxFrames, + WORD* const BadRxFrames, + WORD* const TotalWakeups, + WORD* const RxErrors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOn( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOff( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdID( + + DWORD* const EpdID, + WORD* const HardVersion, + WORD* const SoftVersion, + WORD* const FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdStatus( + + DWORD* const EpdClock, + DWORD* const RealTime, + WORD* const IssueCount, + DWORD* const OffTime, + WORD* const OperatingStatus, + WORD* const ErrorStatus, + WORD* const AlarmsStatus, + WORD* const OtherAlarms, + WORD* const EEPROMBadSectors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestDetectors( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerID( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI IssueEpd( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeIssueEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI BaseLineCounts( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearLatchedAlarms( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFaultFlags( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDosesQuality( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + DWORD* const Hp10Total, DWORD* const Hp07Total, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadPeaks( + + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRates( DWORD* const Hp10Rate, DWORD* const Hp07Rate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadBaseCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCalibrationData( + + WORD* const K1, WORD* const K2, WORD* const K3, + WORD* const K4, WORD* const K5, WORD* const K6, + WORD* const SG, WORD* const BC, WORD* const FB, WORD* const HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmDoseThresholds( + + DWORD* const Hp10Dose1, DWORD* const Hp10Dose2, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmRateThresholds( + + DWORD* const Hp10Rate1On, DWORD* const Hp10Rate2On, DWORD* const Hp07RateOn, + DWORD* const Hp10Rate1Off, DWORD* const Hp10Rate2Off, DWORD* const Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DisplayFaultCode( WORD FaultCode ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadData( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData, + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadProfileControl( + + WORD* const Interval, DWORD* const TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfile( WORD* const ProfileEntries ); + +WORD EPDDLL_API WINAPI ReadDoseProfileSince( + + DWORD EpdClock, WORD* const ProfileEntries ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfileCache( + + WORD Index, + DWORD* const EpdClock, WORD* const Interval, + DWORD* const Hp10Dose, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadConfig( + + WORD* const CountDownTime, + DWORD* const ReturnTime, + WORD* const ChirpRate, + WORD* const TeleBaudSetting, + WORD* const SelfTestInterval, + WORD* const BatteryLoadTestInt, + WORD* const GeneralControl, + WORD* const CommsTimeout, + WORD* const InhibitTimeout, + WORD* const MinTxInterval, + WORD* const MaxTxIntervals, + WORD* const RandomiseWindow, + WORD* const DoseIncThresh ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDisplayConfig( + + WORD* const Control, + WORD* const LongSwitchTime, + WORD* const DoubleClickTime, + WORD* const DisplayDefaultTime, + WORD* const Default, + BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadErrorStore( + + DWORD* const ErrorTime, WORD TimeLength, + BYTE* const ErrorCode, WORD CodeLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialWriteTimes( DWORD* const WriteTimes, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialDoseStore( + + WORD Index, WORD Count, + DWORD* const Hp10Dose, WORD Hp10Length, + DWORD* const Hp07Dose, WORD Hp07Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearErrorStore( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDose( DWORD Hp10Dose, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteCountdownTimer( WORD wCountDownTime, WORD wStartNow ); + +/*----------------------------------------------------------------------------* + * + * This function (WriteCountdownTimer) was written after the Developers Guide + * to the Ex15 Interface DLL (611/HB/40571/000) + * The first parameter wdCountDownTime is the count down time in seconds + * The second param byStartNow is a boolean to start the timer now + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearTotalDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteTotalDose( DWORD Hp10Total, DWORD Hp07Total ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearPeakRates( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteReturnForReadTime( DWORD ReturnTime ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmDoseThresholds( + + DWORD Hp10Dose1, DWORD Hp10Dose2, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmRateThresholds( + + DWORD Hp10Rate1On, DWORD Hp10Rate2On, DWORD Hp07RateOn, + DWORD Hp10Rate1Off, DWORD Hp10Rate2Off, DWORD Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayConfig( + WORD Control, + WORD LongSwitchTime, + WORD DoubleClickTime, + WORD DisplayDefaultTime, + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayControlBits( WORD DisplayControlBits ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteDisplayEnables( + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteConfig( + + 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 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteProfileControl( WORD Interval, DWORD TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteSpecialWriteTimes( + + DWORD* const WriteTimes, WORD Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EndSession( WORD AlarmCtrl, WORD Duration ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteChirpRate( WORD ChirpRate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRAM( + + WORD Offset, WORD Length , void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadASIC( WORD Register, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearWearer( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSIssue( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSDeIssue( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearData( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSWritePassword( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSSetOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteCalFactors( + + WORD K1, WORD K2, WORD K3, WORD K4, WORD K5, WORD K6 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDetectorThresholds( + + WORD SG, WORD BC, WORD FB, WORD HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteRAM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRResetEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRFormatEEPROM( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteASIC( WORD Register, WORD Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteEpdID( + + DWORD EpdID, + WORD HardVersion, + WORD SoftVersion, + WORD FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWritePassword( DWORD Password ); + + + +//additional commands for ANALOG2 +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2Config( + BYTE* const byADC_LA, + BYTE* const byADC_LL, + BYTE* const byADC_SUPPLY, + BYTE* const byADC_BAT_TYPE, + WORD* const wOffDisplay, + BYTE* const byConfig7, + BYTE* const byConfig8); +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2ConfigStatus( + BYTE* const byBatADC, + BYTE* const bySupplyADC, + BYTE* const byStatus3, + BYTE* const byStatus4); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteA2Config( + BYTE byADC_LA, + BYTE byADC_LL, + BYTE byADC_SUPPLY, + BYTE byADC_BAT_TYPE, + WORD wOffDisplay, + BYTE byConfig7, + BYTE byConfig8 ); + + /*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestBattery( void ); + + + +} diff --git a/EpdBase/dll2/test/reader2.def b/EpdBase/dll2/test/reader2.def new file mode 100644 index 0000000..fe83b1e --- /dev/null +++ b/EpdBase/dll2/test/reader2.def @@ -0,0 +1,132 @@ +EXPORTS +?GetLogDirectory@@YGXPA_WG@Z +?GetLogFilename@@YGXPA_WG@Z +?GetLogIniFilename@@YGXPA_WG@Z +?GetLoggingLevel@@YGGXZ +?GetRawLoggingLevel@@YGGXZ +?GetRejectLogFilename@@YGXPA_WG@Z +?GetRejectLoggingLevel@@YGGXZ +?InitLogDirectory@@YGXXZ +?Initialize@@YGXXZ +?Log@@YAXQBDIGQB_WZZ +?LogPort@@YGXPA_WG@Z +?LogReject@@YGXGPAEK@Z +?SetLogFilename@@YGXQB_W@Z +?SetLogIniFilename@@YGXQB_W@Z +?SetLoggingLevel@@YGXG@Z +?SetRawLoggingLevel@@YGXG@Z +?SetRejectLogFilename@@YGXQB_W@Z +?SetRejectLoggingLevel@@YGXG@Z +ADSClearData +ADSClearOffEnable +ADSClearWearer +ADSDeIssue +ADSIssue +ADSLogin +ADSReadData +ADSReadWearer +ADSSetOffEnable +ADSWritePassword +Abort +AllocateMemory +BaseLineCounts +ClearDose +ClearErrorStore +ClearFailFlag +ClearFaultFlags +ClearLatchedAlarms +ClearPeakRates +ClearTotalDose +CloseDevice +Commit +Connect +DeIssueEpd +DeinitComms +Discover +DisplayFaultCode +EndSession +EpdOff +EpdOn +GetDataMetric +GetErrorDetails +InitComms +IssueEpd +MFRClearAlwaysCount +MFRClearGolden +MFRFormatEEPROM +MFRLogin +MFRResetEpd +MFRSetAlwaysCount +MFRSetGolden +MFRWriteASIC +MFRWriteCalFactors +MFRWriteDetectorThresholds +MFRWriteDirectEEPROM +MFRWriteEpdID +MFRWritePassword +MFRWriteRAM +MemoryAllocated +OpenDevice +ReadA2Config +ReadA2ConfigStatus +ReadASIC +ReadAlarmConfig +ReadAlarmDoseThresholds +ReadAlarmRateThresholds +ReadBaseCounts +ReadCalibrationData +ReadCommsStats +ReadConfig +ReadCounts +ReadDirectEEPROM +ReadDisplayConfig +ReadDoseProfile +ReadDoseProfileCache +ReadDoseProfileSince +ReadDosesQuality +ReadEpdID +ReadEpdStatus +ReadErrorStore +ReadMemory +ReadPeaks +ReadProfileControl +ReadRAM +ReadRates +ReadScratchPad +ReadSpecialDoseStore +ReadSpecialWriteTimes +ReadWearer +ReadWearerID +ReadWearerName +ReleaseMemory +SetAutoCommit +SetDiscoveryExpirationPeriod +SetDiscoveryTimeslotCount +SetDiscoveryTimeslotPeriod +SetFailFlag +SetRetryCounts +SetTimeouts +TestBattery +TestDetectors +WriteA2Config +WriteAlarmConfig +WriteAlarmDoseThresholds +WriteAlarmRateThresholds +WriteChirpRate +WriteConfig +WriteCountdownTimer +WriteDisplayConfig +WriteDisplayControlBits +WriteDisplayEnables +WriteDose +WriteMemory +WriteProfileControl +WriteReturnForReadTime +WriteScratchPad +WriteSpecialWriteTimes +WriteTotalDose +WriteWearerName +_FlushBuffers@4 +_FlushDiscoveryCache@4 +_Receive@8 +_Transmit@8 diff --git a/EpdBase/dll2/test/reader2.exports b/EpdBase/dll2/test/reader2.exports new file mode 100644 index 0000000..c490e19 --- /dev/null +++ b/EpdBase/dll2/test/reader2.exports @@ -0,0 +1,158 @@ +Microsoft (R) COFF/PE Dumper Version 14.16.27027.1 +Copyright (C) Microsoft Corporation. All rights reserved. + + +Dump of file reader2.dll + +File Type: DLL + + Section contains the following exports for IR_READER_MS_DLL.dll + + 00000000 characteristics + 534E87DE time date stamp Wed Apr 16 15:38:38 2014 + 0.00 version + 1 ordinal base + 131 number of functions + 131 number of names + + ordinal hint RVA name + + 1 0 00007D60 ?GetLogDirectory@@YGXPA_WG@Z + 2 1 00008370 ?GetLogFilename@@YGXPA_WG@Z + 3 2 000082A0 ?GetLogIniFilename@@YGXPA_WG@Z + 4 3 000084F0 ?GetLoggingLevel@@YGGXZ + 5 4 00008550 ?GetRawLoggingLevel@@YGGXZ + 6 5 00008430 ?GetRejectLogFilename@@YGXPA_WG@Z + 7 6 00008520 ?GetRejectLoggingLevel@@YGGXZ + 8 7 00007DB0 ?InitLogDirectory@@YGXXZ + 9 8 00008160 ?Initialize@@YGXXZ + 10 9 00008580 ?Log@@YAXQBDIGQB_WZZ + 11 A 00007D90 ?LogPort@@YGXPA_WG@Z + 12 B 00008740 ?LogReject@@YGXGPAEK@Z + 13 C 000083A0 ?SetLogFilename@@YGXQB_W@Z + 14 D 000082D0 ?SetLogIniFilename@@YGXQB_W@Z + 15 E 00008500 ?SetLoggingLevel@@YGXG@Z + 16 F 00008560 ?SetRawLoggingLevel@@YGXG@Z + 17 10 00008460 ?SetRejectLogFilename@@YGXQB_W@Z + 18 11 00008530 ?SetRejectLoggingLevel@@YGXG@Z + 19 12 00005520 ADSClearData + 20 13 000055B0 ADSClearOffEnable + 21 14 00005420 ADSClearWearer + 22 15 00005500 ADSDeIssue + 23 16 00005490 ADSIssue + 24 17 000053D0 ADSLogin + 25 18 00003DB0 ADSReadData + 26 19 00005440 ADSReadWearer + 27 1A 00005590 ADSSetOffEnable + 28 1B 00005540 ADSWritePassword + 29 1C 00002940 Abort + 30 1D 00002540 AllocateMemory + 31 1E 000039B0 BaseLineCounts + 32 1F 00004840 ClearDose + 33 20 00009560 ClearErrorStore + 34 21 000039F0 ClearFailFlag + 35 22 00003A30 ClearFaultFlags + 36 23 00003A10 ClearLatchedAlarms + 37 24 000049A0 ClearPeakRates + 38 25 00004920 ClearTotalDose + 39 26 00003670 CloseDevice + 40 27 00002F90 Commit + 41 28 00002F10 Connect + 42 29 00003930 DeIssueEpd + 43 2A 00002880 DeinitComms + 44 2B 00002BE0 Discover + 45 2C 00003D90 DisplayFaultCode + 46 2D 00005100 EndSession + 47 2E 00003030 EpdOff + 48 2F 00003750 EpdOn + 51 30 00002790 GetDataMetric + 52 31 00002740 GetErrorDetails + 53 32 000027A0 InitComms + 54 33 000038D0 IssueEpd + 55 34 00003580 MFRClearAlwaysCount + 56 35 00003580 MFRClearGolden + 57 36 00003580 MFRFormatEEPROM + 58 37 000055D0 MFRLogin + 59 38 00003580 MFRResetEpd + 60 39 00003580 MFRSetAlwaysCount + 61 3A 00003580 MFRSetGolden + 62 3B 00003570 MFRWriteASIC + 63 3C 00005620 MFRWriteCalFactors + 64 3D 000056B0 MFRWriteDetectorThresholds + 65 3E 00003560 MFRWriteDirectEEPROM + 66 3F 00003590 MFRWriteEpdID + 67 40 00005980 MFRWritePassword + 68 41 00003560 MFRWriteRAM + 69 42 00002590 MemoryAllocated + 70 43 00002DD0 OpenDevice + 71 44 000059D0 ReadA2Config + 72 45 00005A30 ReadA2ConfigStatus + 73 46 00005320 ReadASIC + 74 47 00004560 ReadAlarmConfig + 75 48 00003CF0 ReadAlarmDoseThresholds + 76 49 00003D30 ReadAlarmRateThresholds + 77 4A 00003B90 ReadBaseCounts + 78 4B 00003BE0 ReadCalibrationData + 79 4C 000036F0 ReadCommsStats + 80 4D 000044D0 ReadConfig + 81 4E 00003AB0 ReadCounts + 82 4F 00005360 ReadDirectEEPROM + 83 50 000045B0 ReadDisplayConfig + 84 51 00004390 ReadDoseProfile + 85 52 00003390 ReadDoseProfileCache + 86 53 00004430 ReadDoseProfileSince + 87 54 00003A50 ReadDosesQuality + 88 55 00003080 ReadEpdID + 89 56 00003770 ReadEpdStatus + 90 57 00004610 ReadErrorStore + 91 58 00002620 ReadMemory + 92 59 00003B00 ReadPeaks + 93 5A 00003E20 ReadProfileControl + 94 5B 000052B0 ReadRAM + 95 5C 00003B50 ReadRates + 96 5D 00005130 ReadScratchPad + 97 5E 000047A0 ReadSpecialDoseStore + 98 5F 00004760 ReadSpecialWriteTimes + 99 60 00003880 ReadWearer + 100 61 00003800 ReadWearerID + 101 62 00003840 ReadWearerName + 103 63 000025D0 ReleaseMemory + 104 64 00002CF0 SetAutoCommit + 105 65 00002A20 SetDiscoveryExpirationPeriod + 106 66 00002B00 SetDiscoveryTimeslotCount + 107 67 00002A90 SetDiscoveryTimeslotPeriod + 108 68 000039D0 SetFailFlag + 109 69 00002CA0 SetRetryCounts + 110 6A 000029A0 SetTimeouts + 111 6B 00005C50 TestBattery + 112 6C 000037E0 TestDetectors + 114 6D 00005A80 WriteA2Config + 115 6E 00004B10 WriteAlarmConfig + 116 6F 00004A10 WriteAlarmDoseThresholds + 117 70 00004A80 WriteAlarmRateThresholds + 118 71 00005260 WriteChirpRate + 119 72 00004EE0 WriteConfig + 120 73 000048C0 WriteCountdownTimer + 121 74 00004CB0 WriteDisplayConfig + 122 75 00005830 WriteDisplayControlBits + 123 76 00005860 WriteDisplayEnables + 124 77 00004860 WriteDose + 125 78 000026B0 WriteMemory + 126 79 00004FB0 WriteProfileControl + 127 7A 000049C0 WriteReturnForReadTime + 128 7B 000051A0 WriteScratchPad + 129 7C 00005010 WriteSpecialWriteTimes + 130 7D 00004940 WriteTotalDose + 131 7E 00003950 WriteWearerName + 49 7F 00002EA0 _FlushBuffers@4 + 50 80 00002B70 _FlushDiscoveryCache@4 + 102 81 00002D80 _Receive@8 + 113 82 00002D30 _Transmit@8 + + Summary + + 4000 .data + 5000 .rdata + 2000 .reloc + 1000 .rsrc + 1E000 .text diff --git a/EpdBase/dll2/test/reader2.lib b/EpdBase/dll2/test/reader2.lib new file mode 100644 index 0000000..5979bd3 Binary files /dev/null and b/EpdBase/dll2/test/reader2.lib differ diff --git a/EpdBase/dll2/reader2.lib b/EpdBase/dll2/test/reader2.lib0 similarity index 100% rename from EpdBase/dll2/reader2.lib rename to EpdBase/dll2/test/reader2.lib0 diff --git a/EpdBase/dll2/test2/Reader2.dll b/EpdBase/dll2/test2/Reader2.dll new file mode 100644 index 0000000..3edbef2 Binary files /dev/null and b/EpdBase/dll2/test2/Reader2.dll differ diff --git a/EpdBase/dll2/test2/reader2.def b/EpdBase/dll2/test2/reader2.def new file mode 100644 index 0000000..b109df2 --- /dev/null +++ b/EpdBase/dll2/test2/reader2.def @@ -0,0 +1,114 @@ +EXPORTS +AllocateMemory@4 +MemoryAllocated@4 +ReleaseMemory@4 +ReadMemory@16 +WriteMemory@16 +GetErrorDetails@12 +GetDataMetric@8 +InitComms@20 +DeinitComms@4 +Abort@0 +SetTimeouts@16 +SetDiscoveryExpirationPeriod@8 +SetDiscoveryTimeslotPeriod@8 +SetDiscoveryTimeslotCount@8 +Discover@16 +SetRetryCounts@8 +SetAutoCommit@4 +OpenDevice@8 +CloseDevice@0 +Connect@4 +Commit@0 +ReadCommsStats@28 +EpdOn@0 +EpdOff@0 +ReadEpdID@16 +ReadEpdStatus@36 +ReadWearerID@8 +ReadWearerName@8 +ReadWearer@16 +IssueEpd@8 +DeIssueEpd@0 +WriteWearerName@8 +BaseLineCounts@0 +SetFailFlag@0 +ClearFailFlag@0 +ClearLatchedAlarms@0 +ClearFaultFlags@0 +ReadDosesQuality@28 +ReadCounts@20 +ReadPeaks@16 +ReadRates@8 +ReadBaseCounts@20 +ReadCalibrationData@40 +ReadAlarmDoseThresholds@12 +ReadAlarmRateThresholds@24 +DisplayFaultCode@4 +ADSReadData@36 +ReadProfileControl@8 +ReadDoseProfile@4 +ReadDoseProfileSince@8 +ReadDoseProfileCache@20 +ReadConfig@52 +ReadAlarmConfig@16 +ReadDisplayConfig@28 +ReadErrorStore@16 +ReadSpecialWriteTimes@8 +ReadSpecialDoseStore@24 +ClearErrorStore@0 +ClearDose@0 +WriteDose@8 +WriteCountdownTimer@8 +ClearTotalDose@0 +WriteTotalDose@8 +ClearPeakRates@0 +WriteReturnForReadTime@4 +WriteAlarmDoseThresholds@12 +WriteAlarmRateThresholds@24 +WriteAlarmConfig@16 +WriteDisplayConfig@28 +WriteDisplayControlBits@4 +WriteDisplayEnables@12 +WriteConfig@52 +WriteProfileControl@8 +WriteSpecialWriteTimes@8 +EndSession@8 +ReadScratchPad@12 +WriteScratchPad@12 +WriteChirpRate@4 +ReadRAM@12 +ReadASIC@8 +ReadDirectEEPROM@12 +ADSLogin@4 +ADSClearWearer@0 +ADSReadWearer@16 +ADSIssue@16 +ADSDeIssue@0 +ADSClearData@0 +ADSWritePassword@4 +ADSSetOffEnable@0 +ADSClearOffEnable@0 +ReadA2Config@28 +ReadA2ConfigStatus@16 +WriteA2Config@28 +TestBattery@0 +TestDetectors@0 +MFRLogin@4 +MFRWriteCalFactors@24 +MFRWriteDetectorThresholds@16 +MFRWriteRAM@12 +MFRWriteDirectEEPROM@12 +MFRResetEpd@0 +MFRFormatEEPROM@0 +MFRWriteASIC@8 +MFRSetAlwaysCount@0 +MFRClearAlwaysCount@0 +MFRSetGolden@0 +MFRClearGolden@0 +MFRWriteEpdID@16 +MFRWritePassword@4 +FlushDiscoveryCache@4 +Transmit@8 +Receive@8 +FlushBuffers@4 diff --git a/EpdBase/dll2/test2/reader2.exp b/EpdBase/dll2/test2/reader2.exp new file mode 100644 index 0000000..34aa24e Binary files /dev/null and b/EpdBase/dll2/test2/reader2.exp differ diff --git a/EpdBase/dll2/test2/reader2.lib b/EpdBase/dll2/test2/reader2.lib new file mode 100644 index 0000000..05171b5 Binary files /dev/null and b/EpdBase/dll2/test2/reader2.lib differ diff --git a/EpdBaseClr/EpdBaseClr.vcxproj b/EpdBaseClr/EpdBaseClr.vcxproj index e3d9fbe..caa441f 100644 --- a/EpdBaseClr/EpdBaseClr.vcxproj +++ b/EpdBaseClr/EpdBaseClr.vcxproj @@ -81,6 +81,7 @@ false + eDosStation.snk false @@ -117,6 +118,8 @@ RequireAdministrator + + @@ -160,6 +163,13 @@ {3114a047-7562-42fe-94de-2418ef19ad9a} + + + + + Discomap + + diff --git a/EpdBaseClr/EpdBaseClr.vcxproj.filters b/EpdBaseClr/EpdBaseClr.vcxproj.filters index 9eeba3a..e83d23c 100644 --- a/EpdBaseClr/EpdBaseClr.vcxproj.filters +++ b/EpdBaseClr/EpdBaseClr.vcxproj.filters @@ -46,4 +46,9 @@ Resource Files + + + + + \ No newline at end of file diff --git a/EpdBaseClr/Reader2.dll b/EpdBaseClr/Reader2.dll new file mode 100644 index 0000000..3edbef2 Binary files /dev/null and b/EpdBaseClr/Reader2.dll differ diff --git a/EpdBaseClr/dll2/reader2.lib1 b/EpdBaseClr/dll2/reader2.lib1 new file mode 100644 index 0000000..cd181af Binary files /dev/null and b/EpdBaseClr/dll2/reader2.lib1 differ diff --git a/EpdBaseClr/dll2/reader2.libtest b/EpdBaseClr/dll2/reader2.libtest new file mode 100644 index 0000000..05171b5 Binary files /dev/null and b/EpdBaseClr/dll2/reader2.libtest differ diff --git a/EpdBaseClr/dll2/save/IR_READER_MS_DLL.dll1 b/EpdBaseClr/dll2/save/IR_READER_MS_DLL.dll1 new file mode 100644 index 0000000..3edbef2 Binary files /dev/null and b/EpdBaseClr/dll2/save/IR_READER_MS_DLL.dll1 differ diff --git a/EpdBaseClr/dll2/save/Reader2.dll0 b/EpdBaseClr/dll2/save/Reader2.dll0 new file mode 100644 index 0000000..3edbef2 Binary files /dev/null and b/EpdBaseClr/dll2/save/Reader2.dll0 differ diff --git a/EpdBaseClr/dll2/save/Reader2.dll1 b/EpdBaseClr/dll2/save/Reader2.dll1 new file mode 100644 index 0000000..3edbef2 Binary files /dev/null and b/EpdBaseClr/dll2/save/Reader2.dll1 differ diff --git a/EpdBaseClr/dll2/Reader2.exp b/EpdBaseClr/dll2/save/Reader2.exp similarity index 100% rename from EpdBaseClr/dll2/Reader2.exp rename to EpdBaseClr/dll2/save/Reader2.exp diff --git a/EpdBaseClr/dll2/save/Reader2.lib0 b/EpdBaseClr/dll2/save/Reader2.lib0 new file mode 100644 index 0000000..3e4941f Binary files /dev/null and b/EpdBaseClr/dll2/save/Reader2.lib0 differ diff --git a/EpdBaseClr/dll2/save/ex15.mif1 b/EpdBaseClr/dll2/save/ex15.mif1 new file mode 100644 index 0000000..2cc2b02 --- /dev/null +++ b/EpdBaseClr/dll2/save/ex15.mif1 @@ -0,0 +1,1374 @@ +/****************************************************************************** + * + * Module Name : 32 Bit Ex15 Interface DLL + * + * Module Part No. : 611/TA/40571/000 + * + * File Name : EX15.MIF + * + * File Description : Top level functions exported by the DLL. + * + * Authors: : K Ferguson + * + ****************************************************************************** + * + * This is an unpublished work, the copyright of which vests in Siemens + * plc. All rights reserved. + * + * The information contained herein is the property of Siemens plc and is + * supplied without liability for errors or omissions and no part may be + * reproduced, used or disclosed except as authorised by contract or other + * written permission. The copyright and the foregoing restriction on + * reproduction, use and disclosure extends to all the media in which this + * information may be embodied. + * + ****************************************************************************** + ****************************************************************************** + * + * MODIFICATION HISTORY + * ==================== + * + * Mod Date Inits PR Description + * --- ---- ----- --- ----------- + * AA 11/07/97 KLF - Initial version. + * AB 18/07/97 JMS - Modified to use AWP protocol. + * AC 23/07/97 JMS - Moved error source & code values from THREAD.LIF as + * they are used by external modules. + * AD 05/08/97 JMS - Added SetTimeouts() function to allow the user + * to set the comms. timeouts. + * AE 05/08/97 JMS - Clarified Discover() parameter names. + * AF 07/08/97 JMS - Seperated SetAutoCommit() from OpenDevice() + * function and added Port parameter to OpenDevice(). + * Removed now redundant TestCounts parameter from + * the ReadConfig() and WriteConfig() functions. + * AG 08/08/97 JMS - Added Connect() function. + * AH 11/08/97 JMS - Extended some of the error reporting. + * AI 12/08/97 JMS - Revamped timeouts to timeout at message/frame-level + * rather than at lower comms. levels. + * AH 15/08/97 JMS - Extended error reporting. + * Added SetDiscoveryTimeslotPeriod() function. + * AI 26/08/97 JMS - Added Transmit() and Receive() functions to allow + * lower-level calls (eg. from EXCOMM) to bypass some + * of the message layer functionality. + * AJ 27/08/97 JMS - Fixed a typo from the previous changes. + * AK 29/08/97 JMS - Added extra tests and error codes for frame buffer + * overflow and retries exceed conditions. + * AL 02/01/97 JMS - Added FlushDiscoveryCache() function to allow the + * cache to be flushed by the application. + * AM 02/10/97 JMS - Added FlushBuffers() function to allow the Tx and + * Rx buffers to be flushed by the application. + * AN 14/10/97 JMS - Corrected the type of the Hp07Dose parameter of the + * WriteAlarmDoseThresholds() function from WORD to + * DWORD. + * AO 16/10/97 JMS - Added part number, function headers, etc. following + * review. + * AP 17/10/97 JMS - Added SetRetryCounts() to allow the retry counts + * to be set by the application. + * AQ 22/10/97 JMS - Removed now redundant error codes (ERR_*). + * AR 24/10/97 JMS - Added part number for Developer's Guide doc. + * AS 02/12/97 KLF - Various corrections after testing on version 1A. + * BA 11/05/99 JMS - Changed timestamps and timeouts to use instances + * of the Timex class rather than TickCount times, as + * TickCount times will wrap-around after 49.7 days + * of continuous up-time. Changed the timeout periods + * to be long types rather than DWORD to match the + * Timex convention. + * BB 04/02/00 EMH - Added WriteDisplayControlBits and WriteDisplayEnables + * BC 30/01/01 JMP - ERR_INVALID_ALARM_SETTINGS added + * BD 30/01/01 JMP - ERR_INVALID_NUMBER_OF_ALARMS added + * BE 08/02/01 JMP - ERR_INVALID_CONFIGURATION_LENGTH added + * ERR_INVALID_DISPLAY_CONTROL added + * BF 21/02/01 JMP - ERR_SCRATCH_OFFSET_PLUS_LEN added + * BG 15/08/02 JMP - Added new ANALOG2 commands + * BH 04/10/02 JMP - Modified Analog2 interface + * BI 02/06/03 PEB - Modified for compatibility with Microsoft Embedded Tools + * & PDA version of DLL + ******************************************************************************/ + +/* + * + * IMPORTANT NOTE TO DEVELOPERS + * + * When using the DLL and not using the AutoCommit feature - that is to say + * functions are combined and processed upon a call to Commit - the following + * should be noted. + * + * 1) + * Data will not be assigned to pointers passed into functions until AFTER + * the Commit function has been called successfully. Developers should take + * care that the areas of memory that are referenced by the pointers remain + * valid until after the Commit function is called. + * + * 2) + * Functions are processed in the order that they are called. Should a call + * to the Commit function fail then the error information can be retrieved + * using the GetErrorDetails function. If the error information indicates + * that one of the combined functions failed, then the developer should assume + * that all the functions called BEFORE the one that failed, have been + * completed successfully. All the functions AFTER and INCLUDING the function + * which failed will NOT have been completed. The exception to this is Read + * functions which will NOT be completed in the conditions described above + * even if they were called BEFORE the function which failed. + * + */ + +/*============================================================================*/ + +#define SRC_NONE 0 // no error occured +#define SRC_INT 1 // internal error +#define SRC_DLL 2 // DLL logical error +#define SRC_EX15 3 // error from Ex15 + +#define ERR_NONE 0 // No error code (internal error) +#define ERR_MSG 1 // Message not expected +#define ERR_SHORT 2 // Message too short +#define ERR_LENGTH 3 // Message data length not correct +#define ERR_QUEUE 4 // Message queue overflow +#define ERR_OVER 5 // Message buffer overflow +#define ERR_PARAM 6 // Parameter error +#define ERR_MEMORY 7 // Memory allocation failed +#define ERR_NO_THREAD 8 // No thread object available +#define ERR_NO_MSG 9 // No message layer available +#define ERR_DEVICE_OPEN 10 // A device is already open +#define ERR_AWP_USER_BUFF_TOO_SMALL 11 // AWP user supplied buffer too small +#define ERR_AWP_TX_MSG_BUFF_OVERFLOW 12 // AWP message too big for buffer +#define ERR_AWP_SEQ_MISMATCH 13 // AWP sequence number mismatch +#define ERR_DISCOVERY_IN_PROGRESS 14 // Discovery in progress +#define ERR_MSG_OPEN_FAILED 15 // Message layer Open failed +#define ERR_MSG_NOT_ACTIVE 16 // Message layer not active +#define ERR_LINK_OPEN_FAILED 17 // Link layer Open failed +#define ERR_INVALID_FRAME 18 // Link layer invalid frame +#define ERR_FRAME_TX_TIMEOUT 19 // Link layer frame Tx timeout +#define ERR_OPEN_PORT_FAILED 20 // Link open device port failed +#define ERR_CLOSE_PORT_FAILED 21 // Link close device port failed +#define ERR_SET_PORT_TIMEOUTS_FAILED 22 // Link set port timeouts failed +#define ERR_FRAME_RX_BUFF_OVERFLOW 23 // Frame Rx buffer overflowed +#define ERR_FRAME_TX_RETRIES_EXCEEDED 24 // Frame Tx retry count exceeded +#define ERR_FRAME_RX_RETRIES_EXCEEDED 25 // Frame Rx retry count exceeded +#define ERR_FRAME_RX_RESULT_UNKNOWN 26 // Frame Receive() result unknown +#define ERR_INDEX_TOO_LARGE 27 // index greater than profile entries +#define ERR_INVALID_ALARM_SETTINGS 28 // This EPD may NOT have alarms 'off' +#define ERR_INVALID_NUMBER_OF_ALARMS 29 // Passed Alarm array is incorrect size. +#define ERR_INVALID_CONFIGURATION_LENGTH 30 // Passed Display Configuration is incorrect size. +#define ERR_INVALID_DISPLAY_CONTROL 31 // This EPD may NOT have Display Units Changed. +#define ERR_SCRATCH_OFFSET_PLUS_LEN 32 // This area of scratchpad may not be written. + +/*============================================================================*/ + +#ifdef __BORLANDC__ + #define EPDDLL_API _export +#else //assume microsoft + #ifdef EPDDLL_EXPORTS + #define EPDDLL_API __declspec(dllexport) + #else + #define EPDDLL_API __declspec(dllimport) + #endif +#endif + +#ifdef _WIN32_WCE //Windows CE / pocket PC +#define PDA_BUILD +#endif + +extern "C" +{ + +#ifndef PDA_BUILD //Only included on Desktop DLLs +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +EPDDLL_API void* WINAPI AllocateMemory( DWORD Size ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MemoryAllocated( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReleaseMemory( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +#endif //PDA BUILD + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetErrorDetails( + + WORD* const Source, WORD* const Reason, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetDataMetric( WORD MetricNumber, WORD* const Metric ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI InitComms( + + WORD Port, DWORD Baud, WORD Data, WORD Parity, WORD Stop ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeinitComms( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Abort( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetTimeouts( WORD Port, long RxByteTimeout, + long RxMessageTimeout, long TxMessageTimeout ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryExpirationPeriod( WORD Port, + long ExpirationPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotPeriod( WORD Port, long TimeslotPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotCount( WORD Port, WORD TimeslotCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushDiscoveryCache( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Discover( WORD Port, DWORD* DeviceIDs, WORD MaxDevices, + WORD* const Count ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetRetryCounts( WORD RxRetryCount, WORD TxRetryCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetAutoCommit( WORD AutoCommit ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI OpenDevice( WORD Port, DWORD DeviceID ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI CloseDevice( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushBuffers( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Connect( DWORD DeviceID ); + +#define ALLOW_LOW_LEVEL +#ifdef ALLOW_LOW_LEVEL +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Transmit( BYTE* TxBuffer, DWORD TxLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Receive( BYTE* RxBuffer, DWORD* RxLength ); +#endif /* ALLOW_LOW_LEVEL */ + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Commit( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCommsStats( + + WORD* const XBOFSeen, + WORD* const TotalTxFrames, + WORD* const TotalRxFrames, + WORD* const GoodRxFrames, + WORD* const BadRxFrames, + WORD* const TotalWakeups, + WORD* const RxErrors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOn( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOff( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdID( + + DWORD* const EpdID, + WORD* const HardVersion, + WORD* const SoftVersion, + WORD* const FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdStatus( + + DWORD* const EpdClock, + DWORD* const RealTime, + WORD* const IssueCount, + DWORD* const OffTime, + WORD* const OperatingStatus, + WORD* const ErrorStatus, + WORD* const AlarmsStatus, + WORD* const OtherAlarms, + WORD* const EEPROMBadSectors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestDetectors( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerID( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI IssueEpd( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeIssueEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI BaseLineCounts( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearLatchedAlarms( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFaultFlags( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDosesQuality( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + DWORD* const Hp10Total, DWORD* const Hp07Total, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadPeaks( + + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRates( DWORD* const Hp10Rate, DWORD* const Hp07Rate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadBaseCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCalibrationData( + + WORD* const K1, WORD* const K2, WORD* const K3, + WORD* const K4, WORD* const K5, WORD* const K6, + WORD* const SG, WORD* const BC, WORD* const FB, WORD* const HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmDoseThresholds( + + DWORD* const Hp10Dose1, DWORD* const Hp10Dose2, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmRateThresholds( + + DWORD* const Hp10Rate1On, DWORD* const Hp10Rate2On, DWORD* const Hp07RateOn, + DWORD* const Hp10Rate1Off, DWORD* const Hp10Rate2Off, DWORD* const Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DisplayFaultCode( WORD FaultCode ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadData( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData, + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadProfileControl( + + WORD* const Interval, DWORD* const TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfile( WORD* const ProfileEntries ); + +WORD EPDDLL_API WINAPI ReadDoseProfileSince( + + DWORD EpdClock, WORD* const ProfileEntries ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfileCache( + + WORD Index, + DWORD* const EpdClock, WORD* const Interval, + DWORD* const Hp10Dose, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadConfig( + + WORD* const CountDownTime, + DWORD* const ReturnTime, + WORD* const ChirpRate, + WORD* const TeleBaudSetting, + WORD* const SelfTestInterval, + WORD* const BatteryLoadTestInt, + WORD* const GeneralControl, + WORD* const CommsTimeout, + WORD* const InhibitTimeout, + WORD* const MinTxInterval, + WORD* const MaxTxIntervals, + WORD* const RandomiseWindow, + WORD* const DoseIncThresh ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDisplayConfig( + + WORD* const Control, + WORD* const LongSwitchTime, + WORD* const DoubleClickTime, + WORD* const DisplayDefaultTime, + WORD* const Default, + BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadErrorStore( + + DWORD* const ErrorTime, WORD TimeLength, + BYTE* const ErrorCode, WORD CodeLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialWriteTimes( DWORD* const WriteTimes, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialDoseStore( + + WORD Index, WORD Count, + DWORD* const Hp10Dose, WORD Hp10Length, + DWORD* const Hp07Dose, WORD Hp07Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearErrorStore( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDose( DWORD Hp10Dose, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteCountdownTimer( WORD wCountDownTime, WORD wStartNow ); + +/*----------------------------------------------------------------------------* + * + * This function (WriteCountdownTimer) was written after the Developers Guide + * to the Ex15 Interface DLL (611/HB/40571/000) + * The first parameter wdCountDownTime is the count down time in seconds + * The second param byStartNow is a boolean to start the timer now + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearTotalDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteTotalDose( DWORD Hp10Total, DWORD Hp07Total ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearPeakRates( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteReturnForReadTime( DWORD ReturnTime ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmDoseThresholds( + + DWORD Hp10Dose1, DWORD Hp10Dose2, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmRateThresholds( + + DWORD Hp10Rate1On, DWORD Hp10Rate2On, DWORD Hp07RateOn, + DWORD Hp10Rate1Off, DWORD Hp10Rate2Off, DWORD Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayConfig( + WORD Control, + WORD LongSwitchTime, + WORD DoubleClickTime, + WORD DisplayDefaultTime, + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayControlBits( WORD DisplayControlBits ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteDisplayEnables( + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteConfig( + + 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 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteProfileControl( WORD Interval, DWORD TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteSpecialWriteTimes( + + DWORD* const WriteTimes, WORD Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EndSession( WORD AlarmCtrl, WORD Duration ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteChirpRate( WORD ChirpRate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRAM( + + WORD Offset, WORD Length , void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadASIC( WORD Register, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearWearer( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSIssue( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSDeIssue( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearData( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSWritePassword( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSSetOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteCalFactors( + + WORD K1, WORD K2, WORD K3, WORD K4, WORD K5, WORD K6 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDetectorThresholds( + + WORD SG, WORD BC, WORD FB, WORD HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteRAM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRResetEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRFormatEEPROM( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteASIC( WORD Register, WORD Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteEpdID( + + DWORD EpdID, + WORD HardVersion, + WORD SoftVersion, + WORD FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWritePassword( DWORD Password ); + + + +//additional commands for ANALOG2 +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2Config( + BYTE* const byADC_LA, + BYTE* const byADC_LL, + BYTE* const byADC_SUPPLY, + BYTE* const byADC_BAT_TYPE, + WORD* const wOffDisplay, + BYTE* const byConfig7, + BYTE* const byConfig8); +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2ConfigStatus( + BYTE* const byBatADC, + BYTE* const bySupplyADC, + BYTE* const byStatus3, + BYTE* const byStatus4); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteA2Config( + BYTE byADC_LA, + BYTE byADC_LL, + BYTE byADC_SUPPLY, + BYTE byADC_BAT_TYPE, + WORD wOffDisplay, + BYTE byConfig7, + BYTE byConfig8 ); + + /*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestBattery( void ); + + + +} diff --git a/EpdBaseClr/dll2/save/reader2.h b/EpdBaseClr/dll2/save/reader2.h new file mode 100644 index 0000000..2cc2b02 --- /dev/null +++ b/EpdBaseClr/dll2/save/reader2.h @@ -0,0 +1,1374 @@ +/****************************************************************************** + * + * Module Name : 32 Bit Ex15 Interface DLL + * + * Module Part No. : 611/TA/40571/000 + * + * File Name : EX15.MIF + * + * File Description : Top level functions exported by the DLL. + * + * Authors: : K Ferguson + * + ****************************************************************************** + * + * This is an unpublished work, the copyright of which vests in Siemens + * plc. All rights reserved. + * + * The information contained herein is the property of Siemens plc and is + * supplied without liability for errors or omissions and no part may be + * reproduced, used or disclosed except as authorised by contract or other + * written permission. The copyright and the foregoing restriction on + * reproduction, use and disclosure extends to all the media in which this + * information may be embodied. + * + ****************************************************************************** + ****************************************************************************** + * + * MODIFICATION HISTORY + * ==================== + * + * Mod Date Inits PR Description + * --- ---- ----- --- ----------- + * AA 11/07/97 KLF - Initial version. + * AB 18/07/97 JMS - Modified to use AWP protocol. + * AC 23/07/97 JMS - Moved error source & code values from THREAD.LIF as + * they are used by external modules. + * AD 05/08/97 JMS - Added SetTimeouts() function to allow the user + * to set the comms. timeouts. + * AE 05/08/97 JMS - Clarified Discover() parameter names. + * AF 07/08/97 JMS - Seperated SetAutoCommit() from OpenDevice() + * function and added Port parameter to OpenDevice(). + * Removed now redundant TestCounts parameter from + * the ReadConfig() and WriteConfig() functions. + * AG 08/08/97 JMS - Added Connect() function. + * AH 11/08/97 JMS - Extended some of the error reporting. + * AI 12/08/97 JMS - Revamped timeouts to timeout at message/frame-level + * rather than at lower comms. levels. + * AH 15/08/97 JMS - Extended error reporting. + * Added SetDiscoveryTimeslotPeriod() function. + * AI 26/08/97 JMS - Added Transmit() and Receive() functions to allow + * lower-level calls (eg. from EXCOMM) to bypass some + * of the message layer functionality. + * AJ 27/08/97 JMS - Fixed a typo from the previous changes. + * AK 29/08/97 JMS - Added extra tests and error codes for frame buffer + * overflow and retries exceed conditions. + * AL 02/01/97 JMS - Added FlushDiscoveryCache() function to allow the + * cache to be flushed by the application. + * AM 02/10/97 JMS - Added FlushBuffers() function to allow the Tx and + * Rx buffers to be flushed by the application. + * AN 14/10/97 JMS - Corrected the type of the Hp07Dose parameter of the + * WriteAlarmDoseThresholds() function from WORD to + * DWORD. + * AO 16/10/97 JMS - Added part number, function headers, etc. following + * review. + * AP 17/10/97 JMS - Added SetRetryCounts() to allow the retry counts + * to be set by the application. + * AQ 22/10/97 JMS - Removed now redundant error codes (ERR_*). + * AR 24/10/97 JMS - Added part number for Developer's Guide doc. + * AS 02/12/97 KLF - Various corrections after testing on version 1A. + * BA 11/05/99 JMS - Changed timestamps and timeouts to use instances + * of the Timex class rather than TickCount times, as + * TickCount times will wrap-around after 49.7 days + * of continuous up-time. Changed the timeout periods + * to be long types rather than DWORD to match the + * Timex convention. + * BB 04/02/00 EMH - Added WriteDisplayControlBits and WriteDisplayEnables + * BC 30/01/01 JMP - ERR_INVALID_ALARM_SETTINGS added + * BD 30/01/01 JMP - ERR_INVALID_NUMBER_OF_ALARMS added + * BE 08/02/01 JMP - ERR_INVALID_CONFIGURATION_LENGTH added + * ERR_INVALID_DISPLAY_CONTROL added + * BF 21/02/01 JMP - ERR_SCRATCH_OFFSET_PLUS_LEN added + * BG 15/08/02 JMP - Added new ANALOG2 commands + * BH 04/10/02 JMP - Modified Analog2 interface + * BI 02/06/03 PEB - Modified for compatibility with Microsoft Embedded Tools + * & PDA version of DLL + ******************************************************************************/ + +/* + * + * IMPORTANT NOTE TO DEVELOPERS + * + * When using the DLL and not using the AutoCommit feature - that is to say + * functions are combined and processed upon a call to Commit - the following + * should be noted. + * + * 1) + * Data will not be assigned to pointers passed into functions until AFTER + * the Commit function has been called successfully. Developers should take + * care that the areas of memory that are referenced by the pointers remain + * valid until after the Commit function is called. + * + * 2) + * Functions are processed in the order that they are called. Should a call + * to the Commit function fail then the error information can be retrieved + * using the GetErrorDetails function. If the error information indicates + * that one of the combined functions failed, then the developer should assume + * that all the functions called BEFORE the one that failed, have been + * completed successfully. All the functions AFTER and INCLUDING the function + * which failed will NOT have been completed. The exception to this is Read + * functions which will NOT be completed in the conditions described above + * even if they were called BEFORE the function which failed. + * + */ + +/*============================================================================*/ + +#define SRC_NONE 0 // no error occured +#define SRC_INT 1 // internal error +#define SRC_DLL 2 // DLL logical error +#define SRC_EX15 3 // error from Ex15 + +#define ERR_NONE 0 // No error code (internal error) +#define ERR_MSG 1 // Message not expected +#define ERR_SHORT 2 // Message too short +#define ERR_LENGTH 3 // Message data length not correct +#define ERR_QUEUE 4 // Message queue overflow +#define ERR_OVER 5 // Message buffer overflow +#define ERR_PARAM 6 // Parameter error +#define ERR_MEMORY 7 // Memory allocation failed +#define ERR_NO_THREAD 8 // No thread object available +#define ERR_NO_MSG 9 // No message layer available +#define ERR_DEVICE_OPEN 10 // A device is already open +#define ERR_AWP_USER_BUFF_TOO_SMALL 11 // AWP user supplied buffer too small +#define ERR_AWP_TX_MSG_BUFF_OVERFLOW 12 // AWP message too big for buffer +#define ERR_AWP_SEQ_MISMATCH 13 // AWP sequence number mismatch +#define ERR_DISCOVERY_IN_PROGRESS 14 // Discovery in progress +#define ERR_MSG_OPEN_FAILED 15 // Message layer Open failed +#define ERR_MSG_NOT_ACTIVE 16 // Message layer not active +#define ERR_LINK_OPEN_FAILED 17 // Link layer Open failed +#define ERR_INVALID_FRAME 18 // Link layer invalid frame +#define ERR_FRAME_TX_TIMEOUT 19 // Link layer frame Tx timeout +#define ERR_OPEN_PORT_FAILED 20 // Link open device port failed +#define ERR_CLOSE_PORT_FAILED 21 // Link close device port failed +#define ERR_SET_PORT_TIMEOUTS_FAILED 22 // Link set port timeouts failed +#define ERR_FRAME_RX_BUFF_OVERFLOW 23 // Frame Rx buffer overflowed +#define ERR_FRAME_TX_RETRIES_EXCEEDED 24 // Frame Tx retry count exceeded +#define ERR_FRAME_RX_RETRIES_EXCEEDED 25 // Frame Rx retry count exceeded +#define ERR_FRAME_RX_RESULT_UNKNOWN 26 // Frame Receive() result unknown +#define ERR_INDEX_TOO_LARGE 27 // index greater than profile entries +#define ERR_INVALID_ALARM_SETTINGS 28 // This EPD may NOT have alarms 'off' +#define ERR_INVALID_NUMBER_OF_ALARMS 29 // Passed Alarm array is incorrect size. +#define ERR_INVALID_CONFIGURATION_LENGTH 30 // Passed Display Configuration is incorrect size. +#define ERR_INVALID_DISPLAY_CONTROL 31 // This EPD may NOT have Display Units Changed. +#define ERR_SCRATCH_OFFSET_PLUS_LEN 32 // This area of scratchpad may not be written. + +/*============================================================================*/ + +#ifdef __BORLANDC__ + #define EPDDLL_API _export +#else //assume microsoft + #ifdef EPDDLL_EXPORTS + #define EPDDLL_API __declspec(dllexport) + #else + #define EPDDLL_API __declspec(dllimport) + #endif +#endif + +#ifdef _WIN32_WCE //Windows CE / pocket PC +#define PDA_BUILD +#endif + +extern "C" +{ + +#ifndef PDA_BUILD //Only included on Desktop DLLs +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +EPDDLL_API void* WINAPI AllocateMemory( DWORD Size ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MemoryAllocated( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReleaseMemory( void* const Address ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteMemory( + + void* const Address, WORD Offset, WORD Size, DWORD* const Value ); + +#endif //PDA BUILD + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetErrorDetails( + + WORD* const Source, WORD* const Reason, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI GetDataMetric( WORD MetricNumber, WORD* const Metric ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI InitComms( + + WORD Port, DWORD Baud, WORD Data, WORD Parity, WORD Stop ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeinitComms( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Abort( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetTimeouts( WORD Port, long RxByteTimeout, + long RxMessageTimeout, long TxMessageTimeout ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryExpirationPeriod( WORD Port, + long ExpirationPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotPeriod( WORD Port, long TimeslotPeriod ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetDiscoveryTimeslotCount( WORD Port, WORD TimeslotCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushDiscoveryCache( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Discover( WORD Port, DWORD* DeviceIDs, WORD MaxDevices, + WORD* const Count ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetRetryCounts( WORD RxRetryCount, WORD TxRetryCount ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetAutoCommit( WORD AutoCommit ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI OpenDevice( WORD Port, DWORD DeviceID ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI CloseDevice( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI FlushBuffers( WORD Port ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Connect( DWORD DeviceID ); + +#define ALLOW_LOW_LEVEL +#ifdef ALLOW_LOW_LEVEL +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Transmit( BYTE* TxBuffer, DWORD TxLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Receive( BYTE* RxBuffer, DWORD* RxLength ); +#endif /* ALLOW_LOW_LEVEL */ + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI Commit( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCommsStats( + + WORD* const XBOFSeen, + WORD* const TotalTxFrames, + WORD* const TotalRxFrames, + WORD* const GoodRxFrames, + WORD* const BadRxFrames, + WORD* const TotalWakeups, + WORD* const RxErrors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOn( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EpdOff( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdID( + + DWORD* const EpdID, + WORD* const HardVersion, + WORD* const SoftVersion, + WORD* const FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadEpdStatus( + + DWORD* const EpdClock, + DWORD* const RealTime, + WORD* const IssueCount, + DWORD* const OffTime, + WORD* const OperatingStatus, + WORD* const ErrorStatus, + WORD* const AlarmsStatus, + WORD* const OtherAlarms, + WORD* const EEPROMBadSectors ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestDetectors( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerID( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI IssueEpd( BYTE* const WearerID, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DeIssueEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteWearerName( BYTE* const WearerName, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI BaseLineCounts( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI SetFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFailFlag( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearLatchedAlarms( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearFaultFlags( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDosesQuality( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + DWORD* const Hp10Total, DWORD* const Hp07Total, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadPeaks( + + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRates( DWORD* const Hp10Rate, DWORD* const Hp07Rate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadBaseCounts( + + DWORD* const D1, DWORD* const D2, + DWORD* const D3, DWORD* const D4, DWORD* const EpdClock ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadCalibrationData( + + WORD* const K1, WORD* const K2, WORD* const K3, + WORD* const K4, WORD* const K5, WORD* const K6, + WORD* const SG, WORD* const BC, WORD* const FB, WORD* const HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmDoseThresholds( + + DWORD* const Hp10Dose1, DWORD* const Hp10Dose2, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmRateThresholds( + + DWORD* const Hp10Rate1On, DWORD* const Hp10Rate2On, DWORD* const Hp07RateOn, + DWORD* const Hp10Rate1Off, DWORD* const Hp10Rate2Off, DWORD* const Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI DisplayFaultCode( WORD FaultCode ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadData( + + DWORD* const Hp10Dose, DWORD* const Hp07Dose, + WORD* const Knocks, WORD* const Resets, WORD* const QualityData, + DWORD* const Hp10Peak, DWORD* const Hp07Peak, + DWORD* const Hp10Time, DWORD* const Hp07Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadProfileControl( + + WORD* const Interval, DWORD* const TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfile( WORD* const ProfileEntries ); + +WORD EPDDLL_API WINAPI ReadDoseProfileSince( + + DWORD EpdClock, WORD* const ProfileEntries ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDoseProfileCache( + + WORD Index, + DWORD* const EpdClock, WORD* const Interval, + DWORD* const Hp10Dose, DWORD* const Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadConfig( + + WORD* const CountDownTime, + DWORD* const ReturnTime, + WORD* const ChirpRate, + WORD* const TeleBaudSetting, + WORD* const SelfTestInterval, + WORD* const BatteryLoadTestInt, + WORD* const GeneralControl, + WORD* const CommsTimeout, + WORD* const InhibitTimeout, + WORD* const MinTxInterval, + WORD* const MaxTxIntervals, + WORD* const RandomiseWindow, + WORD* const DoseIncThresh ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDisplayConfig( + + WORD* const Control, + WORD* const LongSwitchTime, + WORD* const DoubleClickTime, + WORD* const DisplayDefaultTime, + WORD* const Default, + BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadErrorStore( + + DWORD* const ErrorTime, WORD TimeLength, + BYTE* const ErrorCode, WORD CodeLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialWriteTimes( DWORD* const WriteTimes, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadSpecialDoseStore( + + WORD Index, WORD Count, + DWORD* const Hp10Dose, WORD Hp10Length, + DWORD* const Hp07Dose, WORD Hp07Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearErrorStore( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDose( DWORD Hp10Dose, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteCountdownTimer( WORD wCountDownTime, WORD wStartNow ); + +/*----------------------------------------------------------------------------* + * + * This function (WriteCountdownTimer) was written after the Developers Guide + * to the Ex15 Interface DLL (611/HB/40571/000) + * The first parameter wdCountDownTime is the count down time in seconds + * The second param byStartNow is a boolean to start the timer now + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearTotalDose( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteTotalDose( DWORD Hp10Total, DWORD Hp07Total ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ClearPeakRates( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteReturnForReadTime( DWORD ReturnTime ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmDoseThresholds( + + DWORD Hp10Dose1, DWORD Hp10Dose2, DWORD Hp07Dose ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmRateThresholds( + + DWORD Hp10Rate1On, DWORD Hp10Rate2On, DWORD Hp07RateOn, + DWORD Hp10Rate1Off, DWORD Hp10Rate2Off, DWORD Hp07RateOff ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteAlarmConfig( + + BYTE* const Config, WORD ConfigLength, + BYTE* const Duration, WORD DurationLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayConfig( + WORD Control, + WORD LongSwitchTime, + WORD DoubleClickTime, + WORD DisplayDefaultTime, + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteDisplayControlBits( WORD DisplayControlBits ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteDisplayEnables( + WORD Default, BYTE* const Config, WORD Length ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + + WORD EPDDLL_API WINAPI WriteConfig( + + 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 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteProfileControl( WORD Interval, DWORD TimeToNext ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteSpecialWriteTimes( + + DWORD* const WriteTimes, WORD Time ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI EndSession( WORD AlarmCtrl, WORD Duration ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteScratchPad( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteChirpRate( WORD ChirpRate ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadRAM( + + WORD Offset, WORD Length , void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadASIC( WORD Register, WORD* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearWearer( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSReadWearer( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSIssue( + + BYTE* const WearerID, WORD IDLength, + BYTE* const WearerName, WORD NameLength ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSDeIssue( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearData( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSWritePassword( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSSetOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ADSClearOffEnable( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRLogin( DWORD Password ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteCalFactors( + + WORD K1, WORD K2, WORD K3, WORD K4, WORD K5, WORD K6 ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDetectorThresholds( + + WORD SG, WORD BC, WORD FB, WORD HG ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteRAM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteDirectEEPROM( + + WORD Offset, WORD Length, void* const Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRResetEpd( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRFormatEEPROM( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteASIC( WORD Register, WORD Data ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearAlwaysCount( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRSetGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRClearGolden( void ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWriteEpdID( + + DWORD EpdID, + WORD HardVersion, + WORD SoftVersion, + WORD FunctionFlags ); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI MFRWritePassword( DWORD Password ); + + + +//additional commands for ANALOG2 +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2Config( + BYTE* const byADC_LA, + BYTE* const byADC_LL, + BYTE* const byADC_SUPPLY, + BYTE* const byADC_BAT_TYPE, + WORD* const wOffDisplay, + BYTE* const byConfig7, + BYTE* const byConfig8); +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI ReadA2ConfigStatus( + BYTE* const byBatADC, + BYTE* const bySupplyADC, + BYTE* const byStatus3, + BYTE* const byStatus4); + +/*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI WriteA2Config( + BYTE byADC_LA, + BYTE byADC_LL, + BYTE byADC_SUPPLY, + BYTE byADC_BAT_TYPE, + WORD wOffDisplay, + BYTE byConfig7, + BYTE byConfig8 ); + + /*----------------------------------------------------------------------------* + * + * See the Developer's Guide to the Ex15 Interface DLL (611/HB/40571/000) for + * an explanation of this API function. + * + *----------------------------------------------------------------------------*/ + +WORD EPDDLL_API WINAPI TestBattery( void ); + + + +} diff --git a/EpdBaseClr/dll2/save/reader2.libx b/EpdBaseClr/dll2/save/reader2.libx new file mode 100644 index 0000000..5979bd3 Binary files /dev/null and b/EpdBaseClr/dll2/save/reader2.libx differ diff --git a/EpdBaseClr/eDosStation.snk b/EpdBaseClr/eDosStation.snk new file mode 100644 index 0000000..513350d Binary files /dev/null and b/EpdBaseClr/eDosStation.snk differ diff --git a/OkReadBadge/OkReadBadge.vcxproj b/OkReadBadge/OkReadBadge.vcxproj index 010281f..7430c63 100644 --- a/OkReadBadge/OkReadBadge.vcxproj +++ b/OkReadBadge/OkReadBadge.vcxproj @@ -24,7 +24,7 @@ v4.7.2 ManagedCProj OkReadBadge - 10.0.17763.0 + 10.0.16299.0 diff --git a/TestDirect/TestDirect.vcxproj b/TestDirect/TestDirect.vcxproj index e701c3b..42f82d9 100644 --- a/TestDirect/TestDirect.vcxproj +++ b/TestDirect/TestDirect.vcxproj @@ -23,7 +23,7 @@ {3655B312-F7C2-4825-BD5F-E087F6AF2D90} Win32Proj TestDirect - 10.0.17763.0 + 10.0.16299.0 diff --git a/TestEdosBase/TestEdosBase.vcxproj b/TestEdosBase/TestEdosBase.vcxproj index af2a9a4..fac2a13 100644 --- a/TestEdosBase/TestEdosBase.vcxproj +++ b/TestEdosBase/TestEdosBase.vcxproj @@ -23,7 +23,7 @@ {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24} Win32Proj TestEdosBase - 10.0.17763.0 + 10.0.16299.0 diff --git a/eDos.sln b/eDos.sln index 577aba3..730fd16 100644 --- a/eDos.sln +++ b/eDos.sln @@ -51,7 +51,6 @@ Global {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24}.Debug|x64.ActiveCfg = Debug|x64 {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24}.Debug|x64.Build.0 = Debug|x64 {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24}.Debug|x86.ActiveCfg = Debug|Win32 - {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24}.Debug|x86.Build.0 = Debug|Win32 {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24}.Release|Any CPU.ActiveCfg = Release|Win32 {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24}.Release|ARM.ActiveCfg = Release|Win32 {7B3DD1C5-D8D0-408C-A272-FF5E4A30DF24}.Release|ARM64.ActiveCfg = Release|Win32 @@ -64,7 +63,6 @@ Global {3655B312-F7C2-4825-BD5F-E087F6AF2D90}.Debug|x64.ActiveCfg = Debug|x64 {3655B312-F7C2-4825-BD5F-E087F6AF2D90}.Debug|x64.Build.0 = Debug|x64 {3655B312-F7C2-4825-BD5F-E087F6AF2D90}.Debug|x86.ActiveCfg = Debug|Win32 - {3655B312-F7C2-4825-BD5F-E087F6AF2D90}.Debug|x86.Build.0 = Debug|Win32 {3655B312-F7C2-4825-BD5F-E087F6AF2D90}.Release|Any CPU.ActiveCfg = Release|Win32 {3655B312-F7C2-4825-BD5F-E087F6AF2D90}.Release|ARM.ActiveCfg = Release|Win32 {3655B312-F7C2-4825-BD5F-E087F6AF2D90}.Release|ARM64.ActiveCfg = Release|Win32 diff --git a/eDosStation/EntryBadge.xaml.cs b/eDosStation/EntryBadge.xaml.cs index 0126444..2548a15 100644 --- a/eDosStation/EntryBadge.xaml.cs +++ b/eDosStation/EntryBadge.xaml.cs @@ -221,7 +221,7 @@ namespace eDosStation dv.RowFilter = fi.ToString(); } catch (System.Exception ex) { - + MessageBox.Show(ex.Message); } getTaskListViewSource.View.MoveCurrentToFirst(); diff --git a/eDosStation/Reader2.dll b/eDosStation/Reader2.dll new file mode 100644 index 0000000..3edbef2 Binary files /dev/null and b/eDosStation/Reader2.dll differ diff --git a/eDosStation/eDosStation.csproj b/eDosStation/eDosStation.csproj index fdfc5e5..ad73f1f 100644 --- a/eDosStation/eDosStation.csproj +++ b/eDosStation/eDosStation.csproj @@ -31,7 +31,7 @@ true - AnyCPU + x86 true full false @@ -71,10 +71,10 @@ mk2-epd-bg.ico - false + true - eDosStation_TemporaryKey.pfx + eDosStation.snk LocalIntranet @@ -211,7 +211,7 @@ DataSet1.xsd - + Always @@ -255,6 +255,9 @@ Always + + Always + diff --git a/eDosStation/eDosStation.snk b/eDosStation/eDosStation.snk new file mode 100644 index 0000000..513350d Binary files /dev/null and b/eDosStation/eDosStation.snk differ