diff --git a/include/interfaces.h b/include/interfaces.h index 81afbdd..cd2026b 100755 --- a/include/interfaces.h +++ b/include/interfaces.h @@ -170,6 +170,7 @@ struct T_vaultRecord }; +// ATTENTION: struct length must be 64 exactly!!! struct T_moduleCondition { // store conditon of all system components, hold in RAM @@ -182,44 +183,53 @@ struct T_moduleCondition uint8_t ram; uint8_t intEe; uint8_t extEe; - uint8_t rtc; // 1: time/date OK 100: time not plausible 200: hardware error uint8_t boardHw; uint8_t printer; uint8_t modem; - uint8_t signal; // 1...99 uint8_t regist; // 100:not 1:reg 2:ping OK 3:gotTime uint8_t mdbBus; + // 10 uint8_t coinChecker; // EMP, OMP or mei-cashflow - uint8_t coinEscrow; uint8_t mifareReader; // 0: unknown 1=OK 200=no response 201=wrong response 202: Reader reports HW-error uint8_t creditTerm; uint8_t coinReject; - uint8_t coinSafe; uint8_t billSafe; uint8_t voltage; // 1:11..14V uint8_t temper; - uint8_t poweronTest; + // 20 uint8_t doorState; // 1: alles zu 200: tuer offen + bit1(S) +bit2(CB) + bit3(CB) uint8_t doorWasOpened; // 1: all doors are closed 200: any door was just opened uint8_t changer; // can only be tested by usage - uint8_t coinBlocker; // can only be tested by usage uint8_t billReader; // can only be tested by usage uint8_t ResetReason; uint8_t allModulesChecked; - uint8_t alarmState; uint8_t res11; uint8_t res12; + // 30 uint8_t res13; -// 31 + uint8_t padd01; + uint8_t padd02; + uint8_t padd03; + uint32_t padd04; + uint32_t padd05; + uint32_t padd06; + uint32_t padd07; + // 50 + uint32_t padd08; + uint32_t padd09; + uint32_t padd10; + uint16_t padd11; + // 64 }; +// ATTENTION: struct length must be 64 exactly!!! struct T_dynamicCondition { char allDoorsDebounced; @@ -228,10 +238,11 @@ struct T_dynamicCondition char upperDoor; // 99: undefined 0:closed 1:open char middleDoor; // 99: undefined 0:closed 1:open char lowerDoor; // 99: undefined 0:closed 1:open - char reserve; + char coinAttached; char billBox; char modeAbrech; char onAlarm; // 0:alarm aus 1:alarm 2:alarm mit Sirene 3: Sirenentest + // 10 char nowCardTest; char nowPayment; // not used, always 0 char lastMifCardType; @@ -266,6 +277,7 @@ struct T_dynamicCondition char res1; uint16_t U_Batt; + // 20 uint16_t Temperatur; uint16_t nrCoinsInBox; uint32_t amountInBox; @@ -275,10 +287,10 @@ struct T_dynamicCondition char jsonValid_device; char jsonValid_cash; char jsonValid_print; + // 40 char jsonValid_serial; char jsonValid_time; char lastFileType; -// 44 uint8_t MifCardHolder[8]; uint8_t resultOfLastTemplPrint; // 0: unknown or printing in progress @@ -292,7 +304,15 @@ struct T_dynamicCondition // bit5: printer not ready uint8_t startupTestIsRunning; - //54 + uint8_t padd01; + uint8_t padd02; + uint8_t padd03; + //50 + uint32_t padd04; + uint32_t padd05; + uint32_t padd06; + uint16_t padd07; + // 64 }; struct T_extTime @@ -329,6 +349,7 @@ struct T_extTime typedef uint8_t UCHAR; typedef uint16_t UINT; +// ATTENTION: struct length must be 64 exactly!!! struct T_devices { // set by master, used(1) or notused (0) or type 2....20 @@ -337,27 +358,33 @@ struct T_devices UCHAR kindOfCoinChecker; // 0: without 1=EMP820 2=EMP900 3=currenza Csquare (MW) UCHAR kindOfMifareReader; // by now only stronglink SL025 =1 UCHAR solarPower; // 1:sleep allowed 0: no sleep - //UCHAR suppressSleepMode; // 0:sleep allowed 1: no sleep - UCHAR kindOfModem; // 0:off 1:Sunlink UCHAR kindOfCreditcard; // 0:off 1:Feig NFC UCHAR CoinEscrow; UCHAR CoinRejectUnit; - UCHAR CoinShutter; UCHAR BillAcceptor; + // 10 UCHAR usevaultLock; UCHAR autoAlarm; // 1: switch on siren for 1min in doors opened unauthorized - UCHAR autoOpen; // 1: open door covers after valid ATBcard UCHAR printAccReceipt; // 0/1 UCHAR printDoorReceipt; UCHAR printTokenTicket; - UINT VaultFullWarnLevel; UINT VaultFullErrorLevel; + // 30 UINT BattEmptyWarnLevel; UINT BattEmptyErrorLevel; + uint32_t padd01; + uint32_t padd02; + uint32_t padd03; + uint32_t padd04; + uint32_t padd05; + uint32_t padd06; + uint32_t padd07; + uint16_t padd08; + // 64 }; @@ -2299,6 +2326,9 @@ public: // countOfBills: array of up to 16 sums, countOfBills[0]=nr of 5€-bills in stacker // countOfBills[1] for 10€ and so on + virtual bool cash_isCollectionStarted(void) const {return false;} + // return true is coin collection in DC is running + // download device controller virtual bool dcDownloadRequest(QString const &fileToDownload) const { @@ -2479,10 +2509,12 @@ signals: // hier dazwischen: Umstellung ALLER Prototypen // hier von =0 auf {} durch Gerhard - -#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/5.2" +//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/5.2" // 7.11.2023: bna functions activated - +#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/5.3" + // 14.3.24:new function bool hwapi::cash_isCollectionStarted(void) const + // padding three struct to 64 byte to avoid stack overflow when using + // signal coin attached is much faster now Q_DECLARE_INTERFACE(hwinf, HWINF_iid)