Changed struct T_moduleCondition.

Changed struct T_dynamicCondition.
Added struct T_extTime.
Added log_chkIfVaultRecordAvailable().
Added sys_getDeviceConditions().
set version to 3.4.
This commit is contained in:
Gerhard Hoffmann 2023-04-18 12:12:22 +02:00
parent 58fdea45f0
commit 30338e24cc

View File

@ -167,30 +167,29 @@ struct T_moduleCondition
// 100..150 = WARNING // 100..150 = WARNING
// 200..250 = ERROR // 200..250 = ERROR
uint8_t structStart; // always first!!! uint8_t ram;
uint8_t ram; // v uint8_t intEe;
uint8_t intEe; // v uint8_t extEe;
uint8_t extEe; // v
uint8_t rtc; // 1: time/date OK 100: time not plausible 200: hardware error uint8_t rtc; // 1: time/date OK 100: time not plausible 200: hardware error
uint8_t boardHw; // v uint8_t boardHw;
uint8_t printer; // v uint8_t printer;
uint8_t modem; // v uint8_t modem;
uint8_t signal; // 1...99 uint8_t signal; // 1...99
uint8_t regist; // 100:not 1:reg 2:ping OK 3:gotTime uint8_t regist; // 100:not 1:reg 2:ping OK 3:gotTime
uint8_t mdbBus; uint8_t mdbBus;
uint8_t coinChecker; // EMP, OMP or mei-cashflow uint8_t coinChecker; // EMP, OMP or mei-cashflow
uint8_t coinEscrow; // v uint8_t coinEscrow;
uint8_t mifareReader; // v uint8_t mifareReader;
uint8_t creditTerm; // not available uint8_t creditTerm;
uint8_t coinReject; // v uint8_t coinReject;
uint8_t coinSafe; // v uint8_t coinSafe;
uint8_t billSafe; // v uint8_t billSafe;
uint8_t voltage; // v // 1:11..14V uint8_t voltage; // 1:11..14V
uint8_t temper; // v uint8_t temper;
uint8_t poweronTest; uint8_t poweronTest;
uint8_t doorState; // 1: alles zu 200: t?r offen + bit1(S) +bit2(CB) + bit3(CB) uint8_t doorState; // 1: alles zu 200: t?r offen + bit1(S) +bit2(CB) + bit3(CB)
@ -211,54 +210,69 @@ struct T_moduleCondition
struct T_dynamicCondition struct T_dynamicCondition
{ {
// dynamic conditions, change rapidly and frequently char allDoorsDebounced;
// these are values for the Heartbeat char openedAuthorized;
uint8_t CBinDebounced;
// T?rschalter entprellt:
char upperDoor; // 0:fehlt 1:drin char upperDoor; // 0:fehlt 1:drin
char middleDoor; char middleDoor;
char lowerDoor; char lowerDoor;
char coinBox; char coinBox;
char billBox; char billBox;
char modeAbrech; char modeAbrech;
char onAlarm; char onAlarm;
char nowCardTest; char nowCardTest;
char nowPayment; char nowPayment;
char lastMifCardType; char lastMifCardType;
char openedAuthorized;
char allDoorsDebounced;
uint8_t lastSDoorState; uint8_t lastSDoorState;
uint8_t lastVDoorState; uint8_t lastVDoorState;
uint8_t CBinDebounced;
uint8_t lastCBstate; uint8_t lastCBstate;
char paymentInProgress; char paymentInProgress;
char res1; char res1;
char res2;
char res3;
uint16_t U_Batt; uint16_t U_Batt;
uint16_t Temperatur; uint16_t Temperatur;
uint16_t cash_storedaccNumbers[8]; // List all stored accounting numbers in ext. eeprom
uint16_t nrCoinsInBox; uint16_t nrCoinsInBox;
uint16_t resui1;
uint32_t amountInBox; uint32_t amountInBox;
uint32_t amountJustPaid;
uint16_t lastInsCoinType; // wahrscheinlich uchar
uint16_t resui2;
uint32_t totalTransVolume; uint32_t totalTransVolume;
uint32_t totalNrOfVends; uint32_t totalNrOfVends;
char jsonValid_config;
char jsonValid_device;
char jsonValid_cash;
char jsonValid_print;
char jsonValid_serial;
char jsonValid_time;
char lastFileType;
}; };
struct T_extTime
{
uint8_t Hours;
uint8_t Min;
uint8_t Sec;
uint8_t Year;
uint8_t Month;
uint8_t Day;
uint8_t DOW;
uint8_t res1;
uint16_t MinOfDay;
uint16_t res2;
uint32_t SecOfDay;
uint8_t isLeapYear;
uint8_t nxtLeapYear;
uint8_t lastLeapYear;
uint8_t hoursOfThisWeek;
uint16_t minutesOfThisWeek;
uint16_t hoursOfThisMonth;
uint16_t daysOfThisYear;
uint16_t GetHoursOfYear;
uint16_t res3;
uint32_t GetMinutesOfYear;
uint8_t getWakeIntvSec;
uint8_t res4;
uint16_t res5;
uint32_t MinutesOfMillenium;
};
class hwinf class hwinf
{ {
@ -1371,6 +1385,8 @@ public:
*/ */
virtual bool rtc_getExtendedTime(struct T_extTime *exTime) const=0;
virtual bool sys_runCompleteTest(void) const=0; virtual bool sys_runCompleteTest(void) const=0;
// warning: lasts 20s in one pace // warning: lasts 20s in one pace
// return true if sending, false if cmd-stack is full // return true if sending, false if cmd-stack is full
@ -1395,15 +1411,18 @@ public:
// nr = 1..32 // nr = 1..32
// return true if sending, false if cmd-stack is full // return true if sending, false if cmd-stack is full
virtual void log_getHoldAccountNumbers(uint32_t *accNr ) const=0; virtual void log_getHoldAccountNumbers(uint8_t *nrOfVals, uint16_t *accNr ) const=0;
// returns all acc nrs of the backuped vault records // returns all acc nrs of the backuped vault records
// use: uint32_t backupedAccNumbers[8] // use: uint16_t backupedAccNumbers[8]
virtual bool log_selectVaultRecord(uint16_t accountNr ) const=0; virtual bool log_selectVaultRecord(uint16_t accountNr ) const=0;
// return true if sending, false if cmd-stack is full // return true if sending, false if cmd-stack is full
// and trigger transfer
//request, isAvailable virtual bool log_chkIfVaultRecordAvailable(void) const=0;
virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0; // return true if completly received
virtual bool log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
// which was selected by: log_selectVaultRecord() // which was selected by: log_selectVaultRecord()
// to be forwarded to Ismas // to be forwarded to Ismas
@ -1437,11 +1456,7 @@ virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
// conclude payment process and return all inserted coins // conclude payment process and return all inserted coins
virtual uint8_t mif_getCardType(QString *cardholder) const=0;
virtual uint8_t mif_getCardType(QString cardholder) const=0;
// return 1,2,3,4 = upper, lower access card, printer test, coin test // return 1,2,3,4 = upper, lower access card, printer test, coin test
// cardholder: 7byte Name-String // cardholder: 7byte Name-String
@ -1485,7 +1500,7 @@ virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
*/ */
virtual void sys_getDeviceConditions(struct T_moduleCondition *devCond) const=0;
//virtual void sys_getDynMachineConditions(struct T_dynamicCondition *dynMachCond) const=0; //virtual void sys_getDynMachineConditions(struct T_dynamicCondition *dynMachCond) const=0;
virtual void sys_getDynMachineConditions(uint8_t *leng, uint8_t *data) const=0; virtual void sys_getDynMachineConditions(uint8_t *leng, uint8_t *data) const=0;
/* /*
@ -1552,6 +1567,14 @@ virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
*/ */
virtual void sys_getDynMachineConditions(struct T_dynamicCondition *dynMachCond) const=0;
// content of Cashbox
virtual uint32_t cash_getAmountInVault(void) const=0;
virtual uint16_t cash_getNrCoinsInVault(void) const=0;
}; };
@ -1569,10 +1592,14 @@ virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
// 29.03.2023: V3.1 some extensions for PSA1256_ptu5, // 29.03.2023: V3.1 some extensions for PSA1256_ptu5,
// V3.2 Bootloader improvement // V3.2 Bootloader improvement
// 12.04.2023: V3.3 new features extended: loading and using Json-files, cash-collection, cash-data-logging // 12.04.2023: V3.3 new features extended: loading and using Json-files, cash-collection, cash-data-logging
// 14.04.2023: V3.4 new features extended: sys_getDynMachineConditions, sys_getDeviceConditions and
// rtc_getExtendedTime return struct in addition. New function to select and get VaultRecord
//
//#define HWINF_iid "Atb.Psa2020.software.HWapi/3.1" //#define HWINF_iid "Atb.Psa2020.software.HWapi/3.1"
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.1" //#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.1"
#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.3" //#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.3"
#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.4"