eDosStation/TestEdosBase/dll2/ex15.mif

1375 lines
51 KiB
Text
Raw Normal View History

2019-02-01 09:54:48 +01:00
/******************************************************************************
*
* 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 );
}