Merged new function to DCPlugin (01.06.2023).
This commit is contained in:
@@ -24,13 +24,21 @@ struct T_emp
|
||||
|
||||
// dynamic:
|
||||
uint8_t state; // step counter of EMP (electronic coin checker) FSM (finite state machine):
|
||||
// 0=Emp & Bus power off, 1=powered, poll off 2=polling on
|
||||
// 3=device responded, requesting status
|
||||
// 4=waiting for status 5=have status,
|
||||
// 6: IDLE, have paramters from master, polling running, ready for payment
|
||||
// Master can stop/start polling and acceptance
|
||||
// 7: end of transaction, polling on, accept off, reporting coins, (wait for last coin)
|
||||
// 8: transaction running, polling on, acceptance on, reporting coins,
|
||||
// 0=start command
|
||||
// 1=powered, do emp ini, send reset
|
||||
// 2=delay
|
||||
// 3=wait for response, requesting status after response
|
||||
// 4,5 through, startup
|
||||
// 6: wait for status
|
||||
// 7: through, startup
|
||||
// 8: IDLE state. EMP is up and ready, polling is running
|
||||
// 9: polling on, payment not yet on
|
||||
// 10: payment, check coins
|
||||
// 11: through
|
||||
// 12: wait 1s for last coin
|
||||
// 90: stop all, 1s delay
|
||||
// 99: off, all stopped
|
||||
|
||||
|
||||
uint8_t pollingRunning;
|
||||
uint8_t paymentRunning;
|
||||
@@ -80,6 +88,7 @@ struct Tprn_hw_state
|
||||
bool nowAligned;
|
||||
};
|
||||
|
||||
// obsolete
|
||||
struct T_dynDat
|
||||
{
|
||||
uint8_t licensePlate[8];
|
||||
@@ -122,17 +131,17 @@ struct T_vaultRecord
|
||||
//16
|
||||
char label3buffer[4]; // mw >
|
||||
|
||||
// Verkauf, Tür zu:
|
||||
uint32_t VKcoinsInserted[16]; // nur für Wechsler, soviel wurde eingeworfen
|
||||
uint32_t VKcoinsReturned[6]; // nur für Wechsler, Anzahl Münzen pro Typ, soviel wurde zurückgegeben
|
||||
// Verkauf, T<EFBFBD>r zu:
|
||||
uint32_t VKcoinsInserted[16]; // nur f<EFBFBD>r Wechsler, soviel wurde eingeworfen
|
||||
uint32_t VKcoinsReturned[6]; // nur f<EFBFBD>r Wechsler, Anzahl M<EFBFBD>nzen pro Typ, soviel wurde zur<EFBFBD>ckgegeben
|
||||
//88
|
||||
|
||||
// Service, Tür offen:
|
||||
uint16_t ServCoinsInserted[16]; // nur für Wechsler, soviel wurde eingeworfen
|
||||
uint16_t ServCoinsReturned[6]; // nur für Wechsler, Anzahl Münzen pro Typ, soviel wurde zurückgegeben
|
||||
// Service, T<EFBFBD>r offen:
|
||||
uint16_t ServCoinsInserted[16]; // nur f<EFBFBD>r Wechsler, soviel wurde eingeworfen
|
||||
uint16_t ServCoinsReturned[6]; // nur f<EFBFBD>r Wechsler, Anzahl M<EFBFBD>nzen pro Typ, soviel wurde zur<EFBFBD>ckgegeben
|
||||
uint16_t resint3;
|
||||
uint16_t resint4;
|
||||
uint16_t currentTubeContent[6]; // nur für Wechsler, aktueller Füllstand
|
||||
uint16_t currentTubeContent[6]; // nur f<EFBFBD>r Wechsler, aktueller F<EFBFBD>llstand
|
||||
uint16_t resint5;
|
||||
uint16_t resint6;
|
||||
// 56
|
||||
@@ -167,30 +176,29 @@ struct T_moduleCondition
|
||||
// 100..150 = WARNING
|
||||
// 200..250 = ERROR
|
||||
|
||||
uint8_t structStart; // always first!!!
|
||||
uint8_t ram; // v
|
||||
uint8_t intEe; // v
|
||||
uint8_t extEe; // v
|
||||
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; // v
|
||||
uint8_t printer; // v
|
||||
uint8_t modem; // v
|
||||
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;
|
||||
uint8_t coinChecker; // EMP, OMP or mei-cashflow
|
||||
|
||||
uint8_t coinEscrow; // v
|
||||
uint8_t mifareReader; // v
|
||||
uint8_t creditTerm; // not available
|
||||
uint8_t coinReject; // v
|
||||
uint8_t coinEscrow;
|
||||
uint8_t mifareReader;
|
||||
uint8_t creditTerm;
|
||||
uint8_t coinReject;
|
||||
|
||||
uint8_t coinSafe; // v
|
||||
uint8_t billSafe; // v
|
||||
uint8_t voltage; // v // 1:11..14V
|
||||
uint8_t temper; // v
|
||||
uint8_t coinSafe;
|
||||
uint8_t billSafe;
|
||||
uint8_t voltage; // 1:11..14V
|
||||
uint8_t temper;
|
||||
|
||||
uint8_t poweronTest;
|
||||
uint8_t doorState; // 1: alles zu 200: t?r offen + bit1(S) +bit2(CB) + bit3(CB)
|
||||
@@ -211,62 +219,132 @@ struct T_moduleCondition
|
||||
|
||||
struct T_dynamicCondition
|
||||
{
|
||||
// dynamic conditions, change rapidly and frequently
|
||||
// these are values for the Heartbeat
|
||||
|
||||
// T?rschalter entprellt:
|
||||
char upperDoor; // 0:fehlt 1:drin
|
||||
char middleDoor;
|
||||
char lowerDoor;
|
||||
char coinBox;
|
||||
|
||||
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 reserve;
|
||||
char billBox;
|
||||
char modeAbrech;
|
||||
char onAlarm;
|
||||
char onAlarm; // 0:alarm aus 1:alarm 2:alarm mit Sirene 3: Sirenentest
|
||||
char nowCardTest;
|
||||
|
||||
char nowPayment;
|
||||
char nowPayment; // not used, always 0
|
||||
char lastMifCardType;
|
||||
char openedAuthorized;
|
||||
char allDoorsDebounced;
|
||||
|
||||
uint8_t lastSDoorState;
|
||||
uint8_t lastVDoorState;
|
||||
uint8_t CBinDebounced;
|
||||
uint8_t lastCBstate;
|
||||
char paymentInProgress;
|
||||
// 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
|
||||
|
||||
char paymentInProgress;
|
||||
char res1;
|
||||
char res2;
|
||||
char res3;
|
||||
|
||||
uint16_t U_Batt;
|
||||
char res1;
|
||||
uint16_t U_Batt;
|
||||
uint16_t Temperatur;
|
||||
|
||||
uint16_t cash_storedaccNumbers[8]; // List all stored accounting numbers in ext. eeprom
|
||||
|
||||
uint16_t nrCoinsInBox;
|
||||
uint16_t resui1;
|
||||
|
||||
uint32_t amountInBox;
|
||||
uint32_t amountJustPaid;
|
||||
|
||||
uint16_t lastInsCoinType; // wahrscheinlich uchar
|
||||
uint16_t resui2;
|
||||
|
||||
uint32_t totalTransVolume;
|
||||
uint32_t totalNrOfVends;
|
||||
char jsonValid_config;
|
||||
char jsonValid_device;
|
||||
char jsonValid_cash;
|
||||
char jsonValid_print;
|
||||
char jsonValid_serial;
|
||||
char jsonValid_time;
|
||||
char lastFileType;
|
||||
// 44
|
||||
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;
|
||||
|
||||
//54
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
typedef uint8_t UCHAR;
|
||||
typedef uint16_t UINT;
|
||||
|
||||
struct T_devices
|
||||
{
|
||||
// set by master, used(1) or notused (0) or type 2....20
|
||||
|
||||
UCHAR kindOfPrinter; // 0:off 1:Gebe
|
||||
UCHAR kindOfCoinChecker; // 0: without 1=EMP820 2=EMP900 3=currenza c<> (MW)
|
||||
UCHAR kindOfMifareReader; // by now only stronglink SL025 =1
|
||||
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;
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
class hwinf
|
||||
{
|
||||
|
||||
public:
|
||||
enum class DownloadResult {OK, ERROR, TIMEOUT, NOP};
|
||||
enum class FileTypeJson {CONFIG=1, DEVICE, CASH, SERIAL, TIME, PRINTER};
|
||||
|
||||
virtual ~hwinf() {}
|
||||
|
||||
|
||||
@@ -277,20 +355,20 @@ public:
|
||||
// Sending input requests to DC2 (single or auto-batch)
|
||||
// Getting input data as receiver payload
|
||||
// Furthermore the Cashagent-Library answers with status strings about sending and reading result
|
||||
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||
|
||||
virtual bool dc_openSerial(int BaudNr, QString BaudStr, QString ComName, uint8_t connect) const = 0;
|
||||
virtual bool dc_openSerial(int BaudNr, QString BaudStr, QString ComName, uint8_t connect) const =0;
|
||||
// Command: open serial interface
|
||||
// BaudNr: 0:1200 1:9600 2:19200 3:38400 4:57600 5:115200
|
||||
// BaudStr: for exapmle "19200"
|
||||
// ComName: for example "COM48"
|
||||
// connect: 0, 1
|
||||
|
||||
virtual bool dc_closeSerial(void) const = 0;
|
||||
virtual void dc_closeSerial(void) const =0;
|
||||
// Command: close serial interface in order to save power while power down
|
||||
// or if another port must be used
|
||||
|
||||
virtual bool dc_isPortOpen(void) const =0;
|
||||
virtual bool dc_isPortOpen(void) const =0;
|
||||
// returns true if port open (don't send unless open. Sending to closed port will crash program)
|
||||
|
||||
|
||||
@@ -301,22 +379,8 @@ public:
|
||||
|
||||
virtual bool test_serialIsOn(void) const =0;
|
||||
|
||||
virtual bool dc_updateDC(QString binFileName,
|
||||
QString baudrate,
|
||||
QString comPort) const = 0;
|
||||
// download binary file down into device controller
|
||||
|
||||
virtual bool dc_updatePrinterTemplate(enum FileTypeJson type,
|
||||
QVector<int> templateIdx,
|
||||
QVector<QString> fnames,
|
||||
QString br,
|
||||
QString serial) const = 0;
|
||||
|
||||
virtual bool dc_printTemplate(enum FileTypeJson type,
|
||||
QVector<int> templateIdx,
|
||||
QString br,
|
||||
QString serial) const = 0;
|
||||
|
||||
|
||||
|
||||
virtual void dc_autoRequest(bool on) const =0;
|
||||
// on = true: select that all READ-Requests are sent automatically
|
||||
// on = false: select that all READ-Requests are sent manually one by one
|
||||
@@ -332,7 +396,7 @@ public:
|
||||
// get data back in "payLoad", max 64 byte, can be used for diagnosis
|
||||
// retval = nr of bytes received. If host buffer too small then
|
||||
// only plBufSiz bytes are copied to "payLoad"
|
||||
// plBufSizz=size of host buffer
|
||||
// plBufSiz<EFBFBD>z=size of host buffer
|
||||
|
||||
virtual void dc_requTestResponse() const =0;
|
||||
// tell DC2 to send a test-string, useful to see if cable and baudrate is OK
|
||||
@@ -453,10 +517,10 @@ public:
|
||||
|
||||
// Analog values:
|
||||
virtual uint32_t dc_getTemperature(void) const =0;
|
||||
// in Sax-Format 0...400 (0=-50,0°C 100=0,0°C 141=20,5°C 400=150,0°C)
|
||||
// in Sax-Format 0...400 (0=-50,0<EFBFBD>C 100=0,0<EFBFBD>C 141=20,5<EFBFBD>C 400=150,0<EFBFBD>C)
|
||||
|
||||
virtual QString dc_getTemperaturStr(void) const =0;
|
||||
// as string like "-12,5°C"
|
||||
// as string like "-12,5<EFBFBD>C"
|
||||
|
||||
virtual uint32_t dc_getVoltage(void) const =0;
|
||||
// as value in mV, 0...65,535V
|
||||
@@ -611,7 +675,7 @@ public:
|
||||
uint8_t kindOfModem, uint8_t kindOfCredit ) const =0;
|
||||
// enable hardware in device controller:
|
||||
// kindOfPrinter: 0:off 1: GPT4672 (only this one implemented)
|
||||
// kindOfCoinChecker: 0:off 1:EMP820 2:EMP900 3: C²_changer
|
||||
// kindOfCoinChecker: 0:off 1:EMP820 2:EMP900 3: C<EFBFBD>_changer
|
||||
// kindOfMifareReader: 0:off 1: SL025 (only this one implemented)
|
||||
// suppressSleep: 0:sleep allowed 1: sleep surpressed for special reason
|
||||
// kindOfModem: 0:off 1: ATB_Sunlink_LTE (not yet implemented)
|
||||
@@ -717,7 +781,7 @@ public:
|
||||
// send 5 byte: byte 0,1: speed 5...250 mm/s
|
||||
// byte2: density 0....(25)....50
|
||||
// byte3: alignment 'l', 'c', 'r' = left, center, right
|
||||
// byte4: orientation 0, 90, 180 = 0°, 90°, 180° rotation (by now not supported!)
|
||||
// byte4: orientation 0, 90, 180 = 0°, 90°, 180° rotation (by now not supported!)
|
||||
// not batched! don't use twice within 100ms
|
||||
|
||||
virtual void prn_movePaper(uint8_t wayInMm, uint8_t direction) const =0;
|
||||
@@ -775,29 +839,36 @@ public:
|
||||
// up to 8 dynamic values can be defined in the template ("print val3 here") and will be sent with printing command
|
||||
// example: print current time at this point (the time of printing not the storage time!!)
|
||||
|
||||
virtual void pri_startTicketDesign(void) const =0;
|
||||
// obsolete
|
||||
//virtual void pri_startTicketDesign(void) const =0;
|
||||
// start for every new printer document, reseting collecting buffer
|
||||
|
||||
// all further functions write/append text, numbers and command to the ticket-buffer, up to 1278 bytes allowed
|
||||
// return val of the appending functions: true=ok false=too long, buffer full
|
||||
|
||||
virtual int pri_TD_getCurrentSize(void) const =0;
|
||||
// obsolete
|
||||
//virtual int pri_TD_getCurrentSize(void) const =0;
|
||||
// retval: 0...1278
|
||||
|
||||
virtual bool pri_TD_addText(QByteArray text) const =0;
|
||||
// obsolete
|
||||
//virtual bool pri_TD_addText(QByteArray text) const =0;
|
||||
// example: pri_TD_addText("Hello") const =0;
|
||||
// example: pri_TD_addText(tempStr) const =0;
|
||||
// retval: true=ok false=too long, buffer full
|
||||
|
||||
virtual bool pri_TD_addValue(int val) const =0;
|
||||
// obsolete
|
||||
//virtual bool pri_TD_addValue(int val) const =0;
|
||||
// +/- 0...2^(31)
|
||||
|
||||
virtual bool pri_TD_addNewLine(void) const =0;
|
||||
// obsolete
|
||||
//virtual bool pri_TD_addNewLine(void) const =0;
|
||||
|
||||
virtual bool pri_TD_addSign(char sign) const =0;
|
||||
// obsolete
|
||||
//virtual bool pri_TD_addSign(char sign) const =0;
|
||||
// example: '.' ' ' 0x20 'W' '$'
|
||||
|
||||
virtual bool pri_TD_addCommand(char group, char attribute, char p1, char p2, char p3, char p4, char p5) const =0;
|
||||
// obsolete
|
||||
//virtual bool pri_TD_addCommand(char group, char attribute, char p1, char p2, char p3, char p4, char p5) const =0;
|
||||
// always add 8 byte to the ticket layout: ESC & group & attribute & parameter1...5
|
||||
/* complete list of possible commands:
|
||||
group 50 : paper
|
||||
@@ -838,11 +909,13 @@ public:
|
||||
|
||||
*/
|
||||
|
||||
virtual char prn_clearDocument(uint8_t documentNumber) const =0;
|
||||
// obsolete
|
||||
//virtual char prn_clearDocument(uint8_t documentNumber) const =0;
|
||||
// clear memory buffer for ONE document
|
||||
// function takes a second! don't send right before "store doc"
|
||||
|
||||
virtual bool prn_store_Document(uint8_t documentNumber ) const =0;
|
||||
// obsolete
|
||||
//virtual bool prn_store_Document(uint8_t documentNumber ) const =0;
|
||||
// send the predefined Layout (generated with above TD functions) to DeviceController to save
|
||||
// documentNumber=0...15
|
||||
// maximal 1280 bytes each
|
||||
@@ -853,7 +926,8 @@ public:
|
||||
// the place in the ticket layout is predefined (already in DC memory)
|
||||
// the dynamics are first calculated at printing time
|
||||
|
||||
virtual bool prn_printDocument(uint8_t documentNumber, struct T_dynDat *dynTicketData) const =0;
|
||||
// obsolete
|
||||
//virtual bool prn_printDocument(uint8_t documentNumber, struct T_dynDat *dynTicketData) const =0;
|
||||
|
||||
|
||||
// 36
|
||||
@@ -1245,10 +1319,10 @@ public:
|
||||
|
||||
virtual void bl_rebootDC(void) const =0;
|
||||
|
||||
virtual void bl_startBL(void) const = 0;
|
||||
virtual void bl_startBL(void) const =0;
|
||||
// send command within 4s after DC power-on, otherwise bl is left
|
||||
|
||||
virtual bool bl_checkBL(void) const = 0;
|
||||
virtual void bl_checkBL(void) const =0;
|
||||
// send command to verify if bl is up
|
||||
|
||||
virtual bool bl_isUp(void) const =0;
|
||||
@@ -1285,7 +1359,7 @@ public:
|
||||
|
||||
|
||||
// Komplett-schreib Funktion, noch nicht getestet
|
||||
// Nachteil: keine Rückmeldung wie lang's noch dauert
|
||||
// Nachteil: keine R<EFBFBD>ckmeldung wie lang's noch dauert
|
||||
//virtual void bl_startSending(void) const=0;
|
||||
// call once after BL is working and file is loaded
|
||||
//virtual void bl_sendFile(void) const=0;
|
||||
@@ -1311,7 +1385,7 @@ public:
|
||||
buf[4]=GlobTime.Month;
|
||||
buf[5]=GlobTime.Day;
|
||||
buf[6]=GlobTime.DOW;
|
||||
buf[7]=' '; // immer auf 32bit auffüllen sonst Speicherproblem beim Master!
|
||||
buf[7]=' '; // immer auf 32bit auff<EFBFBD>llen sonst Speicherproblem beim Master!
|
||||
uitmp=GlobTime.MinOfDay;
|
||||
buf[8]=swl_getOneByteFromUint(uitmp, 0);
|
||||
buf[9]=swl_getOneByteFromUint(uitmp, 1);
|
||||
@@ -1371,6 +1445,8 @@ public:
|
||||
|
||||
*/
|
||||
|
||||
virtual bool rtc_getExtendedTime(struct T_extTime *exTime) const=0;
|
||||
|
||||
virtual bool sys_runCompleteTest(void) const=0;
|
||||
// warning: lasts 20s in one pace
|
||||
// return true if sending, false if cmd-stack is full
|
||||
@@ -1395,15 +1471,18 @@ public:
|
||||
// nr = 1..32
|
||||
// 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
|
||||
// use: uint32_t backupedAccNumbers[8]
|
||||
// use: uint16_t backupedAccNumbers[8]
|
||||
|
||||
virtual bool log_selectVaultRecord(uint16_t accountNr ) const=0;
|
||||
// return true if sending, false if cmd-stack is full
|
||||
// and trigger transfer
|
||||
|
||||
//request, isAvailable
|
||||
virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
|
||||
virtual bool log_chkIfVaultRecordAvailable(void) const=0;
|
||||
// return true if completly received
|
||||
|
||||
virtual bool log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
|
||||
// which was selected by: log_selectVaultRecord()
|
||||
// to be forwarded to Ismas
|
||||
|
||||
@@ -1413,7 +1492,19 @@ virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
|
||||
virtual bool prn_printTestTicket(void) const=0;
|
||||
// return true if sending to DC OK, false if cmd-stack is full
|
||||
|
||||
virtual bool cash_startPayment(uint16_t amount) const=0;
|
||||
virtual bool cash_startPayment(uint32_t amount) const=0;
|
||||
// 17.4.23TS: extended to 32bit
|
||||
|
||||
virtual uint8_t cash_paymentProcessing(void) const=0;
|
||||
// run this function periodically while coin payment process to generate necessary signals
|
||||
// return value:
|
||||
// 0: stopped 1: starting up 2: coin collection
|
||||
// 3: finished by User (Push button) 4: finished, Max-Value collected
|
||||
// 5: finished by escrow
|
||||
// 10,11: error cannot start
|
||||
// 12: timeout while payment, coins returned
|
||||
// 13: stopped by unexpected error
|
||||
|
||||
|
||||
virtual uint32_t getInsertedAmount(void) const=0;
|
||||
|
||||
@@ -1437,18 +1528,23 @@ virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
|
||||
// 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
|
||||
// cardholder: 7byte Name-String
|
||||
|
||||
virtual uint64_t sys_getWakeSource(void) const =0;
|
||||
// retval: 6 bytes, bit coded, 1=event keeps DC awake
|
||||
|
||||
//virtual void sys_getDeviceConditions(struct T_moduleCondition *devCond) const=0;
|
||||
virtual uint8_t sys_getWakeReason(void) const=0;
|
||||
// Master was woken by following reason:
|
||||
// 1: MDB Event
|
||||
// 2: Coin Event
|
||||
// ( 3: Master Event) - will not set the wake line
|
||||
// ( 4: 32s pulse) - will not set the wake line
|
||||
// 5: Door Event
|
||||
// ( 6: Diag Event) - will not set the wake line
|
||||
// 7: 30min-Pulse for HB
|
||||
|
||||
virtual void sys_getDeviceConditions(uint8_t *leng, uint8_t *data) const=0;
|
||||
/*
|
||||
|
||||
@@ -1485,8 +1581,9 @@ 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(uint8_t *leng, uint8_t *data) const=0;
|
||||
/*
|
||||
|
||||
@@ -1552,6 +1649,70 @@ 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;
|
||||
|
||||
virtual uint8_t prn_getPrintResult() const=0;
|
||||
// return: 0: unknown
|
||||
// 1: OK - last template was printed succesful
|
||||
// 2: error - last template was not printed
|
||||
|
||||
// in case of print-error get detailed error:
|
||||
virtual uint8_t prn_getCurrentPrinterState() const=0;
|
||||
// 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
|
||||
|
||||
|
||||
virtual void sys_sendDeviceParameter(struct T_devices *deviceSettings) const=0;
|
||||
|
||||
virtual void sys_restoreDeviceParameter(struct T_devices *deviceSettings) const=0;
|
||||
|
||||
virtual bool sys_areDCdataValid(void) const=0;
|
||||
|
||||
virtual bool sys_sendingTest(void) const =0;
|
||||
|
||||
virtual void prn_requestCurrentDynData(void) const =0;
|
||||
|
||||
virtual bool prn_getCurrentDynamicPrnValuesFromDC(uint8_t *dynPrnVal ) const =0;
|
||||
// which was sent with: bool prn_sendDynamicPrnValues(uint8_t *dynPrnVal ) const override;
|
||||
|
||||
virtual bool prn_dynDataAreEqual(uint8_t *buf) const =0;
|
||||
|
||||
virtual bool prn_printKombiticket(uint8_t nrOfKombi) const=0;
|
||||
// print four of the templates loaded by Json prior
|
||||
// nr = 1..8
|
||||
|
||||
|
||||
virtual void lock_triggerUpperSolenoid(void) const =0;
|
||||
|
||||
virtual void lock_triggerLowerSolenoid(void) const =0;
|
||||
|
||||
|
||||
signals:
|
||||
virtual void hwapi_templatePrintFinished_OK(void) const=0;
|
||||
virtual void hwapi_templatePrintFinished_Err(void) const=0;
|
||||
|
||||
virtual void hwapi_coinCollectionJustStarted(void) const=0;
|
||||
virtual void hwapi_coinCollectionAborted(void) const=0;
|
||||
|
||||
virtual void hwapi_gotNewCoin(void) const=0;
|
||||
virtual void hwapi_payStopByMax(void) const=0;
|
||||
virtual void hwapi_payStopByPushbutton(void) const=0;
|
||||
|
||||
virtual void hwapi_payStopByEscrow(void) const=0;
|
||||
virtual void hwapi_payStopByError(void) const=0;
|
||||
virtual void hwapi_payStopByTimeout(void) const=0;
|
||||
virtual void hwapi_payCancelled(void) const=0;
|
||||
|
||||
virtual void hwapi_coinProcessJustStopped(void) const=0;
|
||||
|
||||
};
|
||||
|
||||
@@ -1569,10 +1730,22 @@ virtual void log_getVaultRecord(struct T_vaultRecord *retVR) const=0;
|
||||
// 29.03.2023: V3.1 some extensions for PSA1256_ptu5,
|
||||
// V3.2 Bootloader improvement
|
||||
// 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
|
||||
//
|
||||
// 19.04.2023: V3.5 new function: sys_getWakeReason();
|
||||
// 17.05.2023: V3.6 new function: cash_isCollectionActive(), cash_isPayProcessActive()
|
||||
// new signals: hwapi_coinCollectionJustStopped, hwapi_coinCollectionJustStarted
|
||||
// getAllInsertedCoins() fixed, also in datif and storeINdata
|
||||
|
||||
|
||||
|
||||
//#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.3"
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.3"
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.4"
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.5"
|
||||
#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/3.6"
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user