DCLibraries/include/dynamic-machine-conditions.h

85 lines
3.1 KiB
C
Raw Normal View History

#ifndef DYNAMIC_MACHINE_CONDITIONS_H_INCLUDED
#define DYNAMIC_MACHINE_CONDITIONS_H_INCLUDED
struct T_dynamicCondition
{
char allDoorsDebounced;
char openedAuthorized;
uint8_t CBinDebounced; // 0:fehlt 1:drin
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 coinAttached;
char billBox;
char modeAbrech;
char onAlarm; // 0:alarm aus 1:alarm 2:alarm mit Sirene 3: Sirenentest
char nowCardTest;
char nowPayment; // not used, always 0
char lastMifCardType;
uint8_t lastSDoorState;
uint8_t lastVDoorState;
uint8_t lastCBstate;
char paymentInProgress;
// Version Szeged: aug2023
// 0: stopped by timeout
// 1: running 2: wait4lastCoin
// 3: payment stopped manually, coins in Escrow
// 4: payment stopped autom, amount collected, coins in Escrow
// 5: payment stopped, escrow full, coins in Escrow
// 6: coins encashed 7:coins returned
// 8: CoinChecker or MDB on Error
// since Schoenau with bill and changer, nov2023
//0 = no payment
//will be set to 1 by cash_startCollection()
//neu 1: wait for devices getting ready for payment
//2 = payment,
//3 = wait for last coin/bill
//4 = Bezahlvorgang manuell beendet
//5 = payment stopped autom, amount collected, coins in Escrow
//6 = Bezahlvorgang beendet weil ZK voll
//4,5,6: payment done, keep on polling, wait for cash or return command
//7 = encash collected money from coin escrow into cash box
//8 = return "amountToReturn", can be complete inserted amount or only overpayment
//9 = wait for changer result
//10= print refund receipt with "amountToReturn"
char res1;
uint16_t U_Batt;
uint16_t Temperatur;
uint16_t nrCoinsInBox;
uint32_t amountInBox;
uint32_t totalTransVolume;
uint32_t totalNrOfVends;
char jsonValid_config;
char jsonValid_device;
char jsonValid_cash;
char jsonValid_print;
// 40
char jsonValid_serial;
char jsonValid_time;
char lastFileType;
uint8_t MifCardHolder[8];
uint8_t resultOfLastTemplPrint;
// 0: unknown or printing in progress
// 1: OK, doc was printed 2: error, doc was not printed
uint8_t lastPrinterStatus;
// 0: printer OK
// bit0: near paper end bit1: no paper
// bit2: temperature error bit3: error head open
// bit4: paper jam in cutter
// bit6: no response bit7: serial rec. error
// bit5: printer not ready
uint8_t startupTestIsRunning;
uint8_t padd01;
uint8_t padd02;
uint8_t padd03;
uint32_t padd04;
uint32_t padd05;
uint32_t padd06;
uint16_t padd07;
};
#endif // DYNAMIC_MACHINE_CONDITIONS_H_INCLUDED