diff --git a/include/interfaces.h b/include/interfaces.h index fbda6e5..3d7b7f1 100755 --- a/include/interfaces.h +++ b/include/interfaces.h @@ -397,80 +397,118 @@ public: // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ - 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 { + Q_UNUSED(BaudNr); + Q_UNUSED(BaudStr); + Q_UNUSED(ComName); + Q_UNUSED(connect); + return false; + } // 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 void dc_closeSerial(void) const =0; + virtual void dc_closeSerial(void) const {} // 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 { + return false; + } // returns true if port open (don't send unless open. Sending to closed port will crash program) - virtual void dc_autoRequest(bool on) const =0; + virtual void dc_autoRequest(bool on) const { + Q_UNUSED(on); + } // on = true: select that all READ-Requests are sent automatically // on = false: select that all READ-Requests are sent manually one by one // Every input information from DC2 must be requested // ( digital and analog sensors, get time/date, get status information ) - virtual void dc_requTestResponse() const =0; + virtual void dc_requTestResponse() const {} // tell DC2 to send a test-string, useful to see if cable and baudrate is OK - virtual bool dc_readAnswTestResponse() const =0; + virtual bool dc_readAnswTestResponse() const { + return false; + } // retval: true: test was successful, got right response - virtual uint8_t dc_isRequestDone(void) const =0; + virtual uint8_t dc_isRequestDone(void) const { + return 0; + } // retval: 0: request is still in progress // 1: answer from DC2 was OK // 2: wrong answer from DC2 - virtual uint16_t dc_getCompletePayLoad(uint16_t plBufSiz, uint8_t *payLoad) const =0; + virtual uint16_t dc_getCompletePayLoad(uint16_t plBufSiz, uint8_t *payLoad) const { + Q_UNUSED(plBufSiz); + Q_UNUSED(payLoad); + return 0; + } // 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" // plBufSiz = size of host buffer - virtual void dc_setWakeFrequency(uint8_t period) const =0; + virtual void dc_setWakeFrequency(uint8_t period) const { + Q_UNUSED(period); + } // RTC wakes DC2 (and PTU) by hardware signal every 32seconds // change wake signal period to 1...64s - virtual void dc_OrderToReset(void) const =0; + virtual void dc_OrderToReset(void) const {} // want DC2 to reset (in order to start Bootloader) - virtual QString dc_getSerialState(void) const =0; + virtual QString dc_getSerialState(void) const { + return QString(); + } // get result of opening-command like "ttyS0 opened with 115200 8N1! // or error messages like "comport not available..." // was saved by last opening event, can be passed for 100ms - virtual void dc_clrSerialStateText(void) const =0; + virtual void dc_clrSerialStateText(void) const {} // clear above text to avoid multiple repetive displaying - virtual void bl_sendDataDirectly(uint8_t length, uint8_t *buf) const =0; + virtual void bl_sendDataDirectly(uint8_t length, uint8_t *buf) const { + Q_UNUSED(length); + Q_UNUSED(buf); + } // send without protocol frame, needed for the DC bootloader - virtual uint8_t getRawRecLength(void) const =0; + virtual uint8_t getRawRecLength(void) const { + return 0; + } // only needed if protocol stack in Cashagent-Library is bypassed - virtual uint8_t getRawReceivedData(uint8_t *receivedData) const =0; + virtual uint8_t getRawReceivedData(uint8_t *receivedData) const { + Q_UNUSED(receivedData); + return 0; + } // only needed if protocol stack in Cashagent-Library is bypassed - virtual QString dc_getSerialParams(void) const =0; + virtual QString dc_getSerialParams(void) const { + return QString(); + } // get DC2 serial settings (not very meaningful as they will not come if different from master settings) - virtual QString dc_getHWversion(void) const =0; + virtual QString dc_getHWversion(void) const { + return QString(); + } // get DC2 hardware version - virtual QString dc_getSWversion(void) const =0; + virtual QString dc_getSWversion(void) const { + return QString(); + } // get DC2 software version - virtual QString dc_getState(void) const =0; + virtual QString dc_getState(void) const { + return QString(); + } // get DC2 status (every OK or any error/warning? ) @@ -478,55 +516,103 @@ public: // Date and Time // ---------------------------------------------------------------------------------------------------------- - virtual uint8_t rtc_getDateTime(struct Trtc_DateTime *rtc_DateTime) const =0; + virtual uint8_t rtc_getDateTime(struct Trtc_DateTime *rtc_DateTime) const { + Q_UNUSED(rtc_DateTime); + return 0; + } - virtual uint8_t rtc_setDateTime(void) const =0; + virtual uint8_t rtc_setDateTime(void) const { + return 0; + } // synch DC2 with PC or PTU system time and date - virtual void rtc_getTime(uint8_t *hh, uint8_t *mm, uint8_t *ss) const =0; + virtual void rtc_getTime(uint8_t *hh, uint8_t *mm, uint8_t *ss) const { + Q_UNUSED(hh); + Q_UNUSED(mm); + Q_UNUSED(ss); + } // get time directly - virtual void rtc_getDate(uint8_t *yy, uint8_t *mm, uint8_t *dd) const =0; + virtual void rtc_getDate(uint8_t *yy, uint8_t *mm, uint8_t *dd) const { + Q_UNUSED(yy); + Q_UNUSED(mm); + Q_UNUSED(dd); + } // get date directly - virtual uint8_t rtc_getToday(uint8_t *dow, uint16_t *minOfToday, uint32_t *secOfToday) const =0; + virtual uint8_t rtc_getToday(uint8_t *dow, uint16_t *minOfToday, uint32_t *secOfToday) const { + Q_UNUSED(dow); + Q_UNUSED(minOfToday); + Q_UNUSED(secOfToday); + return 0; + } // dow=day of week, 1=monday...7 // minOfToday: 0=midnight...1439= 23:59 // secOfToday: 0=midnight...86399= 23:59:59 - virtual bool rtc_isLeapYear(uint8_t *lastLeapYear, uint8_t *NextLeapYear) const =0; + virtual bool rtc_isLeapYear(uint8_t *lastLeapYear, uint8_t *NextLeapYear) const { + Q_UNUSED(lastLeapYear); + Q_UNUSED(NextLeapYear); + return false; + } // retval true: this year is leap year - virtual bool rtc_isLeapYear() const =0; + virtual bool rtc_isLeapYear() const { + return false; + } - virtual void rtc_getWeek(uint8_t *DayOfWeek, uint8_t *HoursOfWeek, uint16_t *MinutesOfWeek) const =0; + virtual void rtc_getWeek(uint8_t *DayOfWeek, uint8_t *HoursOfWeek, uint16_t *MinutesOfWeek) const { + Q_UNUSED(DayOfWeek); + Q_UNUSED(HoursOfWeek); + Q_UNUSED(MinutesOfWeek); + } // DayOfWeek: 1=monday...7 // HoursOfWeek: 0=Monday 0:00 o'clock...167=Sunday 23:00 // MinutesOfWeek: 0=Monday 0:00 o'clock...10079=Sunday 23:59 - virtual void rtc_getMonth(uint8_t *DayOfMonth, uint16_t *HoursOfMonth, uint16_t *MinutesOfMonth) const =0; + virtual void rtc_getMonth(uint8_t *DayOfMonth, uint16_t *HoursOfMonth, uint16_t *MinutesOfMonth) const { + Q_UNUSED(DayOfMonth); + Q_UNUSED(HoursOfMonth); + Q_UNUSED(MinutesOfMonth); + } // DayOfMonth: 1...31 // HoursOfMonth: 0 = 0:00o'clock of 1.day in month up to 743 // MinutesOfMonth:0 = 0:00o'clock of 1.day in month up to 44639 - virtual void rtc_getYear(uint16_t *DayOfYear, uint16_t *HoursOfYear, uint32_t *MinutesOfYear) const =0; + virtual void rtc_getYear(uint16_t *DayOfYear, uint16_t *HoursOfYear, uint32_t *MinutesOfYear) const { + Q_UNUSED(DayOfYear); + Q_UNUSED(HoursOfYear); + Q_UNUSED(MinutesOfYear); + } // DayOfYear: 1...366 1= 1.Jan of this current year // HoursOfYear: 0=1.Jan 0:00o'clock ...8783=31.12 23 o'clock // MinutesOfYear: 0=1.Jan 0:00o'clock ...527039=31.12 23:59 o'clock - virtual QString rtc_getTimStr(void) const =0; - virtual QString rtc_getDatStr(void) const =0; - virtual QString rtc_getTimDatStr(void) const =0; + virtual QString rtc_getTimStr(void) const { + return QString(); + } + virtual QString rtc_getDatStr(void) const { + return QString(); + } + virtual QString rtc_getTimDatStr(void) const { + return QString(); + } // UID - unique number, different in every DC - virtual void dc_getUID8byte(uint8_t *buf8byteUid) const =0; + virtual void dc_getUID8byte(uint8_t *buf8byteUid) const { + Q_UNUSED(buf8byteUid); + } // get 8 single bytes in buffer - virtual QString dc_getUIDstr() const =0; + virtual QString dc_getUIDstr() const { + return QString(); + } // get as string - virtual uint64_t dc_getUIDnumber(void) const =0; + virtual uint64_t dc_getUIDnumber(void) const { + return 0; + } // get UID as one long number // ---------------------------------------------------------------------------------------------------------- @@ -534,19 +620,29 @@ public: // ---------------------------------------------------------------------------------------------------------- // Analog values: - virtual uint32_t dc_getTemperature(void) const =0; + virtual uint32_t dc_getTemperature(void) const { + return 0; + } // in Sax-Format 0...400 (0=-50,0degC 100=0,0degC 141=20,5degC 400=150,0degC) - virtual QString dc_getTemperaturStr(void) const =0; + virtual QString dc_getTemperaturStr(void) const { + return QString(); + } // as string like "-12,5degC" - virtual uint32_t dc_getVoltage(void) const =0; + virtual uint32_t dc_getVoltage(void) const { + return 0; + } // as value in mV, 0...65,535V - virtual QString dc_getVoltagStr(void) const =0; + virtual QString dc_getVoltagStr(void) const { + return QString(); + } // as string in mV - virtual bool dc_mainFuseIsOk(void) const=0; + virtual bool dc_mainFuseIsOk(void) const { + return false; + } // true if 12V fuse is OK // false: fuse blown, DC will continue working but no 12V device can be used! @@ -554,60 +650,124 @@ public: // digital outputs // ------------------------------------------------------------------------------ - virtual uint8_t lock_switchUpperLock(uint8_t dir) const =0; + virtual uint8_t lock_switchUpperLock(uint8_t dir) const { + Q_UNUSED(dir); + return 0; + } // dir 0=off 1=up 2=down // move lock until stop cmd (0) - virtual uint8_t lock_switchLowerLock(uint8_t dir) const =0; + virtual uint8_t lock_switchLowerLock(uint8_t dir) const { + Q_UNUSED(dir); + return 0; + } // dir 0=off 1=up 2=down // move lock until stop cmd (0) - virtual void lock_switchVaultDoor(void) const =0; + virtual void lock_switchVaultDoor(void) const {} - virtual void coin_switchRejectMotor(uint8_t dir) const =0; + virtual void coin_switchRejectMotor(uint8_t dir) const { + Q_UNUSED(dir); + } - virtual void coin_rejectCoins(void) const =0; + virtual void coin_rejectCoins(void) const {} // LEDs - virtual void led_switchLedService(uint8_t on) const =0; - virtual void led_switchLedPaper(uint8_t on, uint8_t ton, uint8_t tof) const =0; - virtual void led_switchLedPinPad(uint8_t on, uint8_t ton, uint8_t tof) const =0; - virtual void led_switchLedStart(uint8_t on, uint8_t ton, uint8_t tof) const =0; - virtual void led_switchLedCoinbassin(uint8_t on, uint8_t ton, uint8_t tof) const =0; + virtual void led_switchLedService(uint8_t on) const { + Q_UNUSED(on); + } + virtual void led_switchLedPaper(uint8_t on, uint8_t ton, uint8_t tof) const { + Q_UNUSED(on); + Q_UNUSED(ton); + Q_UNUSED(tof); + } + virtual void led_switchLedPinPad(uint8_t on, uint8_t ton, uint8_t tof) const { + Q_UNUSED(on); + Q_UNUSED(ton); + Q_UNUSED(tof); + } + virtual void led_switchLedStart(uint8_t on, uint8_t ton, uint8_t tof) const { + Q_UNUSED(on); + Q_UNUSED(ton); + Q_UNUSED(tof); + } + virtual void led_switchLedCoinbassin(uint8_t on, uint8_t ton, uint8_t tof) const { + Q_UNUSED(on); + Q_UNUSED(ton); + Q_UNUSED(tof); + } - virtual void fan_switchFan(bool on) const =0; - virtual void alarm_switchSiren(bool on) const =0; - virtual void bar_OpenBarrier(bool open) const =0; - virtual void ptu_switchWake(bool WAKEACTIVE) const =0; + virtual void fan_switchFan(bool on) const { + Q_UNUSED(on); + } + virtual void alarm_switchSiren(bool on) const { + Q_UNUSED(on); + } + virtual void bar_OpenBarrier(bool open) const { + Q_UNUSED(open); + } + virtual void ptu_switchWake(bool WAKEACTIVE) const { + Q_UNUSED(WAKEACTIVE); + } - virtual void aux_power(bool on) const =0; - virtual void aux_setUsage(uint8_t PinDirection) const =0; - virtual void aux_setOutputs(uint8_t PinIsHigh) const =0; + virtual void aux_power(bool on) const { + Q_UNUSED(on); + } + virtual void aux_setUsage(uint8_t PinDirection) const { + Q_UNUSED(PinDirection); + } + virtual void aux_setOutputs(uint8_t PinIsHigh) const { + Q_UNUSED(PinIsHigh); + } - virtual void lock_switchContactPower(bool on) const =0; + virtual void lock_switchContactPower(bool on) const { + Q_UNUSED(on); + } - virtual void prn_switchPower(bool on) const =0; + virtual void prn_switchPower(bool on) const { + Q_UNUSED(on); + } - virtual void mif_readerOn(bool on) const =0; + virtual void mif_readerOn(bool on) const { + Q_UNUSED(on); + } - virtual void mif_creatAtbCard(uint8_t cardType) const =0; + virtual void mif_creatAtbCard(uint8_t cardType) const { + Q_UNUSED(cardType); + } - virtual void mod_switchPower(bool on) const=0; + virtual void mod_switchPower(bool on) const { + Q_UNUSED(on); + } - virtual void mod_switchWake(bool WAKEACTIVE) const=0; + virtual void mod_switchWake(bool WAKEACTIVE) const { + Q_UNUSED(WAKEACTIVE); + } - virtual void mdb_switchPower(bool on) const =0; + virtual void mdb_switchPower(bool on) const { + Q_UNUSED(on); + } - virtual void mdb_switchWake(bool WAKEACTIVE) const =0; + virtual void mdb_switchWake(bool WAKEACTIVE) const { + Q_UNUSED(WAKEACTIVE); + } - virtual void credit_switchPower(bool on) const =0; + virtual void credit_switchPower(bool on) const { + Q_UNUSED(on); + } // the same as modem power - virtual void credit_switchWake(bool WAKEACTIVE) const =0; + virtual void credit_switchWake(bool WAKEACTIVE) const { + Q_UNUSED(WAKEACTIVE); + } - virtual void shut_move(bool open) const =0; + virtual void shut_move(bool open) const { + Q_UNUSED(open); + } - virtual void esc_moveFlaps(uint8_t flap ) const =0; + virtual void esc_moveFlaps(uint8_t flap ) const { + Q_UNUSED(flap); + } // 0: close both 1: open take-flap 2: open return @@ -615,78 +775,142 @@ public: // door, cashbox and lock switches // ------------------------------------------------------------------------------ - virtual uint8_t door_getSwitches(void) const =0; + virtual uint8_t door_getSwitches(void) const { + return 0; + } // retval: bit0: upper door 1: low door 2:vault door - virtual bool door_isUpperDoorOpen(void) const =0; + virtual bool door_isUpperDoorOpen(void) const { + return false; + } - virtual bool door_isLowerDoorOpen(void) const =0; + virtual bool door_isLowerDoorOpen(void) const { + return false; + } - virtual bool vault_isVaultDoorOpen(void) const =0; + virtual bool vault_isVaultDoorOpen(void) const { + return false; + } - virtual uint8_t vault_getSwitches(void) const =0; + virtual uint8_t vault_getSwitches(void) const { + return 0; + } // retval bit0: cash box, bit 1: bill box - virtual bool vault_isCoinVaultIn(void) const =0; + virtual bool vault_isCoinVaultIn(void) const { + return false; + } - virtual bool vault_isBillVaultIn(void) const =0; + virtual bool vault_isBillVaultIn(void) const { + return false; + } - virtual uint8_t door_getLocks(void) const =0; + virtual uint8_t door_getLocks(void) const { + return 0; + } // retval bit0: upper lever is up (=open) // bit1: upper lever is down (=locked) // bit2: lower lever is up // bit3: lower lever is down (=locked) - virtual bool door_upperDoorIsLocked(void) const =0; + virtual bool door_upperDoorIsLocked(void) const { + return false; + } - virtual bool door_upperDoorIsUnlocked(void) const =0; + virtual bool door_upperDoorIsUnlocked(void) const { + return false; + } - virtual bool door_lowerDoorIsLocked(void) const =0; + virtual bool door_lowerDoorIsLocked(void) const { + return false; + } - virtual bool door_lowerDoorIsUnlocked(void) const =0; + virtual bool door_lowerDoorIsUnlocked(void) const { + return false; + } - virtual bool bar_optoIn1isOn(void) const =0; + virtual bool bar_optoIn1isOn(void) const { + return false; + } - virtual bool bar_optoIn2isOn(void) const =0; + virtual bool bar_optoIn2isOn(void) const { + return false; + } - virtual uint8_t aux_getAuxInputs(void) const =0; + virtual uint8_t aux_getAuxInputs(void) const { + return 0; + } - virtual bool ptu_WakeINisActive(void) const =0; + virtual bool ptu_WakeINisActive(void) const { + return false; + } - virtual bool mdb_WakeINisActive(void) const =0; + virtual bool mdb_WakeINisActive(void) const { + return false; + } - virtual bool prn_readyINisActive(void) const =0; + virtual bool prn_readyINisActive(void) const { + return false; + } - virtual bool coid_isAttached(void) const =0; + virtual bool coid_isAttached(void) const { + return false; + } - virtual bool coin_escrowIsOpen(void) const =0; + virtual bool coin_escrowIsOpen(void) const { + return false; + } - virtual bool mif_cardIsAttached(void) const =0; + virtual bool mif_cardIsAttached(void) const { + return false; + } //bool hwapi::mod_WakeINisActive(void); - virtual bool door_isContactPowerOn(void) const =0; + virtual bool door_isContactPowerOn(void) const { + return false; + } - virtual bool mif_isMifarePowerOn(void) const =0; + virtual bool mif_isMifarePowerOn(void) const { + return false; + } - virtual bool mdb_testIsmdbTxDon(void) const =0; + virtual bool mdb_testIsmdbTxDon(void) const { + return false; + } - virtual bool aux_isAuxPowerOn(void) const =0; + virtual bool aux_isAuxPowerOn(void) const { + return false; + } - virtual bool mod_isGsmPowerOn(void) const =0; + virtual bool mod_isGsmPowerOn(void) const { + return false; + } - virtual bool cred_isCreditPowerOn(void) const =0; + virtual bool cred_isCreditPowerOn(void) const { + return false; + } - virtual bool prn_isPrinterPowerOn(void) const =0; + virtual bool prn_isPrinterPowerOn(void) const { + return false; + } - virtual uint8_t prn_PrnFuseIsOk(void) const=0; + virtual uint8_t prn_PrnFuseIsOk(void) const { + return 0; + } //retval: 0: fuse blown 1: fuse OK 2:unknown as printer power is off - virtual bool mdb_isMdbPowerOn(void) const =0; + virtual bool mdb_isMdbPowerOn(void) const { + return false; + } - virtual bool cash_getRejectMotorHomePos(void) const=0; + virtual bool cash_getRejectMotorHomePos(void) const { + return false; + } - virtual uint8_t cash_getLowPaperSensor(void) const=0; + virtual uint8_t cash_getLowPaperSensor(void) const { + return 0; + } // 0: Sensor sees paper 1: no paper 99: off @@ -698,44 +922,46 @@ public: // or automatically in background by: void hwapi::dc_autoRequest(bool on) - virtual void request_DC2serialConfig() const =0; + virtual void request_DC2serialConfig() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_HWversion() const =0; + virtual void request_DC2_HWversion() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_SWversion() const =0; + virtual void request_DC2_SWversion() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_condition() const =0; + virtual void request_DC2_condition() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_UID() const =0; + virtual void request_DC2_UID() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_TimeAndDate() const =0; + virtual void request_DC2_TimeAndDate() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_analogues() const =0; + virtual void request_DC2_analogues() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_digitalInputs() const =0; + virtual void request_DC2_digitalInputs() const {} // read-request can be sent manually by this function, not needed if auto-request is on - virtual void request_DC2_digitalOutputs() const =0; + virtual void request_DC2_digitalOutputs() const {} // read-request can be sent manually by this function, not needed if auto-request is on // ------------------------------------------------------------------------------ // the following device state requests are deployed only if device is powered up: - virtual void request_PrinterHwState() const =0; - virtual void request_PrinterCurrentFonts() const =0; - virtual void request_PrinterStateComplete() const =0; + virtual void request_PrinterHwState() const {} + virtual void request_PrinterCurrentFonts() const {} + virtual void request_PrinterStateComplete() const {} - virtual void request_MifareReaderState() const =0; - virtual void request_MifareCardType() const =0; - virtual void request_MifareAtbType() const =0; - virtual void request_MifareID() const =0; - virtual void request_MifareData(uint8_t dataBlockNumber) const =0; + virtual void request_MifareReaderState() const {} + virtual void request_MifareCardType() const {} + virtual void request_MifareAtbType() const {} + virtual void request_MifareID() const {} + virtual void request_MifareData(uint8_t dataBlockNumber) const { + Q_UNUSED(dataBlockNumber); + } //virtual void request_MifareData() const =0; - virtual void request_MDB_Status() const =0; - virtual void request_MDB_lastResponse() const =0; - virtual void request_EMP_allParameters() const =0; - virtual void request_EMP_lastCoin() const =0; + virtual void request_MDB_Status() const {} + virtual void request_MDB_lastResponse() const {} + virtual void request_EMP_allParameters() const {} + virtual void request_EMP_lastCoin() const {} // ------------------------------------------------------------------------------ @@ -745,44 +971,88 @@ public: // ------------------------------------------------------------------------------ - virtual bool test_getDO_mdbRXtst(void) const =0; + virtual bool test_getDO_mdbRXtst(void) const { + return false; + } // readback digital outputs of connected devices // these functions are not needed for normal operation // but can be used to test and verify conditions - virtual uint8_t lock_getDO_motors(void) const =0; + virtual uint8_t lock_getDO_motors(void) const { + return 0; + } // bit0: upper lock forward bit 1 backward // bit2: lower lock forward bit 3 backward - virtual uint8_t test_serialState(void) const =0; + virtual uint8_t test_serialState(void) const { + return 0; + } // test on-board signals for the serials // serial drv on/off, Serial mux1, Serial mux2 - virtual bool test_serialIsOn(void) const =0; + virtual bool test_serialIsOn(void) const { + return false; + } - virtual bool test_serialMux1isSetToPrinter(void) const =0; - virtual bool test_serialMux1isSetToModem(void) const =0; - virtual bool test_serialMux2isSetToCredit(void) const =0; - virtual bool test_serialMux2isSetToMifare(void) const =0; + virtual bool test_serialMux1isSetToPrinter(void) const { + return false; + } + virtual bool test_serialMux1isSetToModem(void) const { + return false; + } + virtual bool test_serialMux2isSetToCredit(void) const { + return false; + } + virtual bool test_serialMux2isSetToMifare(void) const { + return false; + } - virtual bool led_coinIsOn(void) const =0; - virtual bool led_frontIsOn(void) const =0; - virtual bool led_ticketIsOn(void) const =0; - virtual bool led_pinIsOn(void) const =0; - virtual bool led_StartIsOn(void) const =0; - virtual bool led_insideIsOn(void) const =0; + virtual bool led_coinIsOn(void) const { + return false; + } + virtual bool led_frontIsOn(void) const { + return false; + } + virtual bool led_ticketIsOn(void) const { + return false; + } + virtual bool led_pinIsOn(void) const { + return false; + } + virtual bool led_StartIsOn(void) const { + return false; + } + virtual bool led_insideIsOn(void) const { + return false; + } - virtual bool fan_isOn(void) const =0; - virtual bool siren_isOn(void) const =0; - virtual bool bar_relayIsOn(void) const =0; - virtual bool ptu_WakeOutIsOn(void) const =0; + virtual bool fan_isOn(void) const { + return false; + } + virtual bool siren_isOn(void) const { + return false; + } + virtual bool bar_relayIsOn(void) const { + return false; + } + virtual bool ptu_WakeOutIsOn(void) const { + return false; + } - virtual bool aux_powerIsOn(void) const =0; + virtual bool aux_powerIsOn(void) const { + return false; + } - virtual bool coin_shutterIsOpen(void) const =0; - virtual bool coin_shutterTestOutput(void) const =0; + virtual bool coin_shutterIsOpen(void) const { + return false; + } + virtual bool coin_shutterTestOutput(void) const { + return false; + } - virtual uint8_t coin_escrowFlapOpened(void) const =0; + virtual uint8_t coin_escrowFlapOpened(void) const { + return 0; + } // retval: 1:return flap is open 2:take flap is open 0:closed @@ -796,7 +1066,14 @@ public: virtual void sendDeviceSettings(uint8_t kindOfPrinter, uint8_t kindOfCoinChecker, uint8_t kindOfMifareReader, uint8_t suppressSleep, - uint8_t kindOfModem, uint8_t kindOfCredit ) const =0; + uint8_t kindOfModem, uint8_t kindOfCredit ) const { + Q_UNUSED(kindOfPrinter); + Q_UNUSED(kindOfCoinChecker); + Q_UNUSED(kindOfMifareReader); + Q_UNUSED(suppressSleep); + Q_UNUSED(kindOfModem); + Q_UNUSED(kindOfCredit); + } // enable hardware in device controller: // kindOfPrinter: 0:off 1: GPT4672 (only this one implemented) // kindOfCoinChecker: 0:off 1:EMP820 2:EMP900 3: Csquare_changer @@ -805,9 +1082,12 @@ public: // kindOfModem: 0:off 1: ATB_Sunlink_LTE (not yet implemented) // kindOfCredit: 0:off 1: cVendTopp 2:cVendPin (not yet implemented) - virtual void request_ReadbackDeviceSettings() const =0; + virtual void request_ReadbackDeviceSettings() const {} - virtual void readback_DeviceSettings(uint8_t *length, uint8_t *data) const =0; + virtual void readback_DeviceSettings(uint8_t *length, uint8_t *data) const { + Q_UNUSED(length); + Q_UNUSED(data); + } // refer to DC2 manual for exact content // state 5.5.21: byte[0]=kindOfPrinter byte[1]=kindOfCoinChecker // byte[2]=kindOfMifarereadr byte[3]=suppress sleep mode @@ -815,36 +1095,58 @@ public: virtual void sendMachineID(uint16_t customerNr, uint16_t machineNr, uint16_t borough, uint16_t zone, - uint16_t alias, char *location) const =0; + uint16_t alias, char *location) const { + Q_UNUSED(customerNr); + Q_UNUSED(machineNr); + Q_UNUSED(borough); + Q_UNUSED(zone); + Q_UNUSED(alias); + Q_UNUSED(location); + } virtual void request_ReadbackMachineID() const =0; - virtual void readback_machineIDdata(uint8_t *length, uint8_t *data) const =0; + virtual void readback_machineIDdata(uint8_t *length, uint8_t *data) const { + Q_UNUSED(length); + Q_UNUSED(data); + } // state 5.5.21: byte[0,1]=customer number byte[2,3]=machine number // byte[4,5]=borough byte[6,7]=zone byte[8,9]=alias name // byte[10...41]=location // Locks stops automatically at end switch or by timeout - virtual uint8_t lock_openUpperDoor(void) const =0; - virtual uint8_t lock_closeUpperDoor(void) const =0; + virtual uint8_t lock_openUpperDoor(void) const { + return 0; + } + virtual uint8_t lock_closeUpperDoor(void) const { + return 0; + } - virtual uint8_t lock_openLowerDoor(void) const =0; - virtual uint8_t lock_closeLowerDoor(void) const =0; + virtual uint8_t lock_openLowerDoor(void) const { + return 0; + } + virtual uint8_t lock_closeLowerDoor(void) const { + return 0; + } - virtual void shut_openOnce(void) const =0; + virtual void shut_openOnce(void) const {} // and close automatic after shutter time - virtual void shut_openForCoin(bool start) const =0; + virtual void shut_openForCoin(bool start) const { + Q_UNUSED(start); + } // open flap if coin is attached // once process is started it runs until stop command - virtual void shut_sendOpeningTime(uint16_t timeIn_ms ) const =0; + virtual void shut_sendOpeningTime(uint16_t timeIn_ms ) const { + Q_UNUSED(timeIn_ms); + } // after this time without retrigger the flap is closed - virtual void esc_takeMoney(void) const =0; + virtual void esc_takeMoney(void) const {} // and close automatically after escrow time (1s) - virtual void esc_returnMoney(void) const =0; + virtual void esc_returnMoney(void) const {} // and close automatically after escrow time (1s) @@ -853,7 +1155,11 @@ public: // ---------------------------------------------------------------------------------------------------------- // obsolete - virtual uint8_t mif_returnReaderStateAndCardType(uint8_t *buf, uint8_t maxBufferSize) const =0; + virtual uint8_t mif_returnReaderStateAndCardType(uint8_t *buf, uint8_t maxBufferSize) const { + Q_UNUSED(buf); + Q_UNUSED(maxBufferSize); + return 0; + } // retval 0=OK 1=error host buffer too small /* data description, new fast version: byte 0= still the same: current read state: @@ -871,21 +1177,34 @@ public: byte 7: length of UID 4 or 7 (byte) */ - virtual bool mif_readerIsOK(void) const =0; + virtual bool mif_readerIsOK(void) const { + return false; + } - virtual bool mif_cardAttached(void) const =0; + virtual bool mif_cardAttached(void) const { + return false; + } // not working! use mif_cardIsAttached() instead - virtual uint8_t mif_readResult(void) const =0; + virtual uint8_t mif_readResult(void) const { + return 0; + } // result: 0: unknown or still in progress // 1: card read successful // 2: reading error // not working! - virtual QString mif_cardUID(void) const =0; + virtual QString mif_cardUID(void) const { + return QString(); + } // not working - virtual uint8_t mif_getCardDataDec(uint8_t blkNr, uint8_t *buf, uint8_t maxBufferSize) const =0; + virtual uint8_t mif_getCardDataDec(uint8_t blkNr, uint8_t *buf, uint8_t maxBufferSize) const { + Q_UNUSED(blkNr); + Q_UNUSED(buf); + Q_UNUSED(maxBufferSize); + return 0; + } virtual QString mif_getCardDataStr(uint8_t blockNumber) const =0; // with blockNumber=0...11 @@ -898,7 +1217,10 @@ public: // read printer condition and settings - virtual uint8_t prn_getHwState(struct Tprn_hw_state *prn_hw_state) const =0; + virtual uint8_t prn_getHwState(struct Tprn_hw_state *prn_hw_state) const { + Q_UNUSED(prn_hw_state); + return 0; + } // retval: status byte // byte 0 = 0: prnter OK, >0: error // bit0: paper low 1: no paper 2: temperature error @@ -906,68 +1228,116 @@ public: // 6: no response 7: bad response from printer // and return struct "Tprn_hw_state" - virtual bool prn_isUpAndReady(void) const =0; + virtual bool prn_isUpAndReady(void) const { + return false; + } // true: printer is powered, serial is ok, no error, printer is connected and resonding - virtual void prn_getCurrentFontSetting(struct Tprn_currentSettings *prn_fonts) const =0; + virtual void prn_getCurrentFontSetting(struct Tprn_currentSettings *prn_fonts) const { + Q_UNUSED(prn_fonts); + } // send Commands to printer: - virtual void prn_sendText(QByteArray *buf) const =0; + virtual void prn_sendText(QByteArray *buf) const { + Q_UNUSED(buf); + } // up to 1280 bytes - virtual void prn_sendPrnSysCmd(uint8_t para1, uint8_t para2, uint32_t para3) const =0; + virtual void prn_sendPrnSysCmd(uint8_t para1, uint8_t para2, uint32_t para3) const { + Q_UNUSED(para1); + Q_UNUSED(para2); + Q_UNUSED(para3); + } // send three byte through to printer, see printers manual - virtual void prn_sendPrnEscCmd(uint8_t para1, uint8_t para2, uint8_t para3, uint8_t para4) const =0; + virtual void prn_sendPrnEscCmd(uint8_t para1, uint8_t para2, uint8_t para3, uint8_t para4) const { + Q_UNUSED(para1); + Q_UNUSED(para2); + Q_UNUSED(para3); + Q_UNUSED(para4); + } // send four byte through to printer, see printers manual - virtual void prn_sendPrnSetup(uint16_t paperSpeed, uint8_t density, uint8_t alignment, uint8_t orientation) const =0; + virtual void prn_sendPrnSetup(uint16_t paperSpeed, uint8_t density, uint8_t alignment, uint8_t orientation) const { + Q_UNUSED(paperSpeed); + Q_UNUSED(density); + Q_UNUSED(alignment); + Q_UNUSED(orientation); + } // 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 = 0deg, 90deg, 180deg 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; + virtual void prn_movePaper(uint8_t wayInMm, uint8_t direction) const { + Q_UNUSED(wayInMm); + Q_UNUSED(direction); + } //direction: 1=forward 2=backward // - virtual void prn_setFonts(uint8_t font, uint8_t size, uint8_t width, uint8_t height) const =0; + virtual void prn_setFonts(uint8_t font, uint8_t size, uint8_t width, uint8_t height) const { + Q_UNUSED(font); + Q_UNUSED(size); + Q_UNUSED(width); + Q_UNUSED(height); + } // font = kind of font 5...11 (0..22) // size = 6...20, 9..9: too tiny 10: small ...12 = normal size ...20=huge // width: 0...4 0=1x 1=2x 2=4x (huge!) 3=8x 4=16x (3,4 make no sense) // heigth: 0...7 = 1x...8x only 0,1,2,(3) make sense - virtual void prn_setLetters(uint8_t bold, uint8_t invers, uint8_t underlined) const =0; + virtual void prn_setLetters(uint8_t bold, uint8_t invers, uint8_t underlined) const { + Q_UNUSED(bold); + Q_UNUSED(invers); + Q_UNUSED(underlined); + } // bold: 0/1 // invers: 0/1 // underlined: 0/1 - virtual void prn_cut(uint8_t kindof) const =0; + virtual void prn_cut(uint8_t kindof) const { + Q_UNUSED(kindof); + } // kindof: 1=full cut 2=partial cut 3=eject (5xLF + full cut) - virtual void prn_newLine(uint8_t nrOfLines) const =0; + virtual void prn_newLine(uint8_t nrOfLines) const { + Q_UNUSED(nrOfLines); + } - virtual void prn_printCompleteFontTable(void) const =0; + virtual void prn_printCompleteFontTable(void) const {} - virtual void prn_printBarcode(uint8_t kindOf, uint8_t withText, uint8_t offset, uint8_t rotation, uint8_t dataLeng, uint8_t *data) const =0; + virtual void prn_printBarcode(uint8_t kindOf, uint8_t withText, uint8_t offset, uint8_t rotation, uint8_t dataLeng, uint8_t *data) const { + Q_UNUSED(kindOf); + Q_UNUSED(withText); + Q_UNUSED(offset); + Q_UNUSED(rotation); + Q_UNUSED(dataLeng); + Q_UNUSED(data); + } // kind of barcode: 0=Code39 1=Code128 2=EAN13 3= 2/5interleaved 4=UPC-A 5=EAN8 // withText: print readable text below // offset: move by pixel from left border // rotation // dataLeng in byte - virtual void prn_sendQRdata(QByteArray *buf) const =0; + virtual void prn_sendQRdata(QByteArray *buf) const { + Q_UNUSED(buf); + } // maximal 150 alphanummeric bytes - virtual void prn_printQRcode(void) const =0; + virtual void prn_printQRcode(void) const {} // QRcode may have 1...150 alphanummeric data, must be transfered in advance - virtual void prn_printLogo(uint8_t nrOfLogo, uint8_t offset ) const =0; + virtual void prn_printLogo(uint8_t nrOfLogo, uint8_t offset ) const { + Q_UNUSED(nrOfLogo); + Q_UNUSED(offset); + } // nrOfLogo: 1..4 in flash 5...8 in Ram // offset: in mm form left border @@ -982,24 +1352,44 @@ public: // --------------------------------------------- MDB Bus ---------------------------------------------------- // ---------------------------------------------------------------------------------------------------------- - virtual void mdb_sendBusReset(void) const =0; + virtual void mdb_sendBusReset(void) const {} - virtual void mdb_sendCommand(uint8_t toMdbDevice, uint8_t mdbCommand) const =0; + virtual void mdb_sendCommand(uint8_t toMdbDevice, uint8_t mdbCommand) const { + Q_UNUSED(toMdbDevice); + Q_UNUSED(mdbCommand); + } // send one bus command directly over mdb bus, refer to mdb manual for commands // this command is not needed in normal operation, just for new or special things - virtual void mdb_sendMessage(uint8_t toMdbDevice, uint8_t mdbCommand, uint8_t nrOfData, uint8_t *dataBuffer) const =0; + virtual void mdb_sendMessage(uint8_t toMdbDevice, uint8_t mdbCommand, uint8_t nrOfData, uint8_t *dataBuffer) const { + Q_UNUSED(toMdbDevice); + Q_UNUSED(mdbCommand); + Q_UNUSED(nrOfData); + Q_UNUSED(dataBuffer); + } // nrOfData = sizeOf(dataBuffer) maximal 34 byte according mdb specs // same as mdb_sendCommand, just with data - virtual bool mdb_busIsReadyToWork() const =0; + virtual bool mdb_busIsReadyToWork() const { + return false; + } - virtual bool mdb_deviceVoltageOK() const =0; + virtual bool mdb_deviceVoltageOK() const { + return false; + } - virtual bool mdb_busVoltageOk() const =0; + virtual bool mdb_busVoltageOk() const { + return false; + } virtual uint8_t mdb_getLastDeviceResponse(uint8_t *fromDevice, uint8_t *lastRequest, - uint8_t *responseLength, uint8_t *responseBuffer) const =0; + uint8_t *responseLength, uint8_t *responseBuffer) const { + Q_UNUSED(fromDevice); + Q_UNUSED(lastRequest); + Q_UNUSED(responseLength); + Q_UNUSED(responseBuffer); + return 0; + } // fromDevice: device nr from which data was requested 0,1,2,3 // lastRequest: sent mdb command // responseLength: nr of payload data (after mdb-ack) 0...34 @@ -1012,69 +1402,106 @@ public: // ---------------------------------------------------------------------------------------------------------- - virtual void emp_sendSettings(uint16_t coinAcceptance, uint8_t tokenChannel, uint16_t *coinDenomination ) const =0; - // coinAcceptance: bit0=coin1 (lowest donomination) bit15=coin16 bitH=accept bit L = deny coin (no validation) - // tokenChannel 0...31: if this signal comes from emp then a token was inserted - // coinDenomination = array of 16 coin values (e.g. 5, 10, 20...) + virtual void emp_sendSettings(uint16_t coinAcceptance, uint8_t tokenChannel, uint16_t *coinDenomination ) const { + Q_UNUSED(coinAcceptance); + Q_UNUSED(tokenChannel); + Q_UNUSED(coinDenomination); + } + // coinAcceptance: bit0=coin1 (lowest donomination) bit15=coin16 bitH=accept bit L = deny coin (no validation) + // tokenChannel 0...31: if this signal comes from emp then a token was inserted + // coinDenomination = array of 16 coin values (e.g. 5, 10, 20...) - virtual void emp_pollingOnOff(uint8_t on) const =0; + virtual void emp_pollingOnOff(uint8_t on) const { + Q_UNUSED(on); + } - virtual void emp_startCoinAcceptance(void) const =0; + virtual void emp_startCoinAcceptance() const {} - virtual void emp_stopCoinAcceptance(void) const =0; + virtual void emp_stopCoinAcceptance() const {} - virtual void emp_getAllParameters(struct T_emp *emp) const =0; - // see struct in hwapi.h - // usage example: - // hwapi *HWaccess const override; - // HWaccess = new hwapi() const override; - // struct T_emp myEmp const override; - // HWaccess->emp_getAllParameters(&myEmp) const override; - // readval=myEmp.pollingRunning const override; + virtual void emp_getAllParameters(struct T_emp *emp) const { + Q_UNUSED(emp); + } + // see struct in hwapi.h + // usage example: + // hwapi *HWaccess const override; + // HWaccess = new hwapi() const override; + // struct T_emp myEmp const override; + // HWaccess->emp_getAllParameters(&myEmp) const override; + // readval=myEmp.pollingRunning const override; - virtual uint8_t emp_chkIfCoinInserted(void) const =0; - // retval: 0...16 coins left in FIFO + virtual uint8_t emp_chkIfCoinInserted(void) const { + return 0; + } + // retval: 0...16 coins left in FIFO - virtual void emp_getNewCoinRecord(uint8_t *valid, uint8_t *signal, uint8_t *error, uint16_t *value) const =0; - // with every call ONE coin is taken out of FIFO and pointer decremented - // valid: should be 1 - // signal: comes right from coin checker, 0...15 (0=first programmed coin type) 0xFF=no signal - // error: was reported from EMP as dynamic signal right after coin insertion (instead of - // coin signal), example: 3=unknown coin 4=coin is blocked by host. 0xFF=no error - // value: of the coin. Depends on parameter "coinDenomination" in function "emp_sendSettings" - // if coinDenomination[coin 0..15] = 0 then the value programmed in coin checker is taken - // if coinDenomination > 0 then this value is taken. - // Useful in case of two currencies (adapt to local currency) or for token. + virtual void emp_getNewCoinRecord(uint8_t *valid, uint8_t *signal, uint8_t *error, uint16_t *value) const { + Q_UNUSED(value); + Q_UNUSED(signal); + Q_UNUSED(error); + Q_UNUSED(valid); + } + // with every call ONE coin is taken out of FIFO and pointer decremented + // valid: should be 1 + // signal: comes right from coin checker, 0...15 (0=first programmed coin type) 0xFF=no signal + // error: was reported from EMP as dynamic signal right after coin insertion (instead of + // coin signal), example: 3=unknown coin 4=coin is blocked by host. 0xFF=no error + // value: of the coin. Depends on parameter "coinDenomination" in function "emp_sendSettings" + // if coinDenomination[coin 0..15] = 0 then the value programmed in coin checker is taken + // if coinDenomination > 0 then this value is taken. + // Useful in case of two currencies (adapt to local currency) or for token. // function gives more details as "emp getLastCoin()" but "emp getLastCoin()" is easier to use // alternativ to emp_getNewCoinRecord( ): - virtual uint8_t emp_giveLastCoin(uint16_t *value, uint8_t *signal) const =0; - // retval: 0: NO coin stored 1: valid coin 2: got wrong coin or coin denied - // value: if retval1: value of the coin if reval=2: error number - // 0xFF means NO error or NO signal (as 0 is a valid error/signal) - // signal: channel nr reported from checker 0...15 + virtual uint8_t emp_giveLastCoin(uint16_t *value, uint8_t *signal) const { + Q_UNUSED(value); + Q_UNUSED(signal); + return 0; + } + // retval: 0: NO coin stored 1: valid coin 2: got wrong coin or coin denied + // value: if retval1: value of the coin if reval=2: error number + // 0xFF means NO error or NO signal (as 0 is a valid error/signal) + // signal: channel nr reported from checker 0...15 - virtual uint8_t emp_returnLastCoin(uint16_t *value, uint8_t *signal) const =0; - // use for changer + virtual uint8_t emp_returnLastCoin(uint16_t *value, uint8_t *signal) const { + Q_UNUSED(value); + Q_UNUSED(signal); + return 0; + } + // use for changer - virtual QString dc_getTxt4RsDiagWin(void) const =0; - virtual void dc_clrTxt4RsDiagWin(void) const =0; - virtual QString dc_get2ndTxt4RsDiagWin(void) const =0; - virtual void dc_clr2ndTxt4RsDiagWin(void) const =0; - virtual QString dc_getTxt4HsStateLine(void) const =0; - virtual void dc_clrTxt4HsStateLine(void) const =0; - virtual QString dc_getTxt4masterStateLine(void) const =0; - virtual void dc_clrTxt4masterStateLine(void) const =0; - virtual QString dc_getTxt4resultStateLine(void) const =0; - virtual void dc_clrTxt4resultStateLine(void) const =0; - virtual QString dc_getdataStateLine(void) const =0; - virtual void dc_clrTxt4dataStateLine(void) const =0; - virtual QString dc_getdatifLine(void) const =0; - virtual void dc_clrTxt4datifLine(void) const =0; + virtual QString dc_getTxt4RsDiagWin(void) const { + return QString(); + } + virtual void dc_clrTxt4RsDiagWin(void) const {} + virtual QString dc_get2ndTxt4RsDiagWin(void) const { + return QString(); + } + virtual void dc_clr2ndTxt4RsDiagWin(void) const {} + virtual QString dc_getTxt4HsStateLine(void) const { + return QString(); + } + virtual void dc_clrTxt4HsStateLine(void) const {} + virtual QString dc_getTxt4masterStateLine(void) const { + return QString(); + } + virtual void dc_clrTxt4masterStateLine(void) const {} + virtual QString dc_getTxt4resultStateLine(void) const { + return QString(); + } + virtual void dc_clrTxt4resultStateLine(void) const {} + virtual QString dc_getdataStateLine(void) const { + return QString(); + } + virtual void dc_clrTxt4dataStateLine(void) const {} + virtual QString dc_getdatifLine(void) const { + return QString(); + } + virtual void dc_clrTxt4datifLine(void) const {} @@ -1083,27 +1510,54 @@ public: // ---------------------------------------------------------------------------------------------------------- // using DC2 Bootloader - virtual void bl_iniChain(void) const =0; - virtual bool bl_importBinFile(QByteArray readBinFile, uint32_t fileSize, char withDispl) const =0; - virtual uint8_t bl_activatBootloader(uint8_t *sendData) const =0; - virtual uint8_t bl_startChain(void) const =0; - virtual uint8_t bl_readBLversion(uint8_t *sendData) const =0; - // minimum size of sendData-buffer: 5byte retval: length - virtual uint8_t bl_readFWversion(uint8_t *sendData) const =0; - // minimum size of sendData-buffer: 5byte retval: length + virtual void bl_iniChain() const {} + virtual bool bl_importBinFile(QByteArray readBinFile, uint32_t fileSize, char withDispl) const { + Q_UNUSED(readBinFile); + Q_UNUSED(fileSize); + Q_UNUSED(withDispl); + return false; + } + virtual uint8_t bl_activatBootloader(uint8_t *sendData) const { + Q_UNUSED(sendData); + return 0; + } + virtual uint8_t bl_startChain() const { + return 0; + } + virtual uint8_t bl_readBLversion(uint8_t *sendData) const { + Q_UNUSED(sendData); + return 0; + } + // minimum size of sendData-buffer: 5byte retval: length + virtual uint8_t bl_readFWversion(uint8_t *sendData) const { + Q_UNUSED(sendData); + return 0; + } + // minimum size of sendData-buffer: 5byte retval: length - virtual uint8_t bl_prepareDC_BLcmd(uint8_t Cmd, uint8_t SendDataLength, uint8_t *sendData, uint8_t *outBuf) const =0; - // make BL protocol, retval = outbuf length (5...133) - // bring data in correct form: start always with 0x02 finish with 0x03 and append checksum - // 0x02 Cmd < ...sendData ..> CRC CRC 0x03 - // Data length = 0...64 - // special conversion: if data contain 2 or 3 (STX, ETX) then write two bytes: 0x1B (=ESC) and data|0x80 - // so maxlength = 5 + 2 x 64 (if all data are 2 or 3) without 2,3: maxlength = 5 + 64 + virtual uint8_t bl_prepareDC_BLcmd(uint8_t Cmd, uint8_t SendDataLength, uint8_t *sendData, uint8_t *outBuf) const { + Q_UNUSED(Cmd); + Q_UNUSED(SendDataLength); + Q_UNUSED(sendData); + Q_UNUSED(outBuf); + return 0; + } + // make BL protocol, retval = outbuf length (5...133) + // bring data in correct form: start always with 0x02 finish with 0x03 and append checksum + // 0x02 Cmd < ...sendData ..> CRC CRC 0x03 + // Data length = 0...64 + // special conversion: if data contain 2 or 3 (STX, ETX) then write two bytes: 0x1B (=ESC) and data|0x80 + // so maxlength = 5 + 2 x 64 (if all data are 2 or 3) without 2,3: maxlength = 5 + 64 - virtual uint8_t bl_exitBL(uint8_t *sendData) const =0; - // minimum size of sendData-buffer: 5byte retval: length + virtual uint8_t bl_exitBL(uint8_t *sendData) const { + Q_UNUSED(sendData); + return 0; + } + // minimum size of sendData-buffer: 5byte retval: length - virtual void led_switchLedIllumination(uint8_t on) const =0; + virtual void led_switchLedIllumination(uint8_t on) const { + Q_UNUSED(on); + } @@ -1112,33 +1566,44 @@ public: // 27.3.2023: Use Device-Controller's Bootloader to send hex-file // ------------------------------------------------------------------------------------ - virtual void bl_rebootDC(void) const =0; + virtual void bl_rebootDC(void) const {} - virtual void bl_startBL(void) const =0; - virtual void bl_checkBL(void) const =0; - virtual bool bl_isUp(void) const =0; - // return true is bl is up and running - // also initializes "sendFile" + virtual void bl_startBL() const {} + virtual void bl_checkBL() const {} + virtual bool bl_isUp() const { + return false; + } + // return true is bl is up and running + // also initializes "sendFile" - virtual void bl_sendAddress(uint16_t blockNumber) const =0; - // send start address, nr of 64byte-block, start with 0 - // will be sent only for folling block-numbers: - // 0, 1024, 2048, 3072 and 4096, so basically every 64kByte + virtual void bl_sendAddress(uint16_t blockNumber) const { + Q_UNUSED(blockNumber); + } + // send start address, nr of 64byte-block, start with 0 + // will be sent only for folling block-numbers: + // 0, 1024, 2048, 3072 and 4096, so basically every 64kByte - virtual uint8_t bl_wasSendingAddOK(void) const =0; + virtual uint8_t bl_wasSendingAddOK() const { + return 0; + } // return val: 0: no response by now 1:error 10: OK - virtual void bl_openBinary(void) const =0; + virtual void bl_openBinary() const {} - virtual void bl_sendDataBlock(uint8_t length, uint8_t *buffer) const =0; + virtual void bl_sendDataBlock(uint8_t length, uint8_t *buffer) const { + Q_UNUSED(length); + Q_UNUSED(buffer); + } // send 64 byte from bin file - virtual void bl_sendLastBlock(void) const =0; + virtual void bl_sendLastBlock() const {} - virtual uint8_t bl_wasSendingDataOK(void) const =0; + virtual uint8_t bl_wasSendingDataOK() const { + return false; + } // return val: 0: no response by now 1:error 10: OK - virtual void bl_stopBL(void) const =0; + virtual void bl_stopBL() const {} // ------------------------------------------------------------------------------------ @@ -1147,264 +1612,421 @@ public: // ------------------------------------------------------------------------------------ - virtual bool rtc_setTimeDateDirect(struct Trtc_DateTime *DateTime) const =0; - // return true if successful. could fail if more the 8 commands are waiting + virtual bool rtc_setTimeDateDirect(struct Trtc_DateTime *DateTime) const { + Q_UNUSED(DateTime); + return false; + } + // return true if successful. could fail if more the 8 commands are waiting - virtual bool rtc_getExtendedTime(uint8_t *leng, uint8_t *data) const =0; + virtual bool rtc_getExtendedTime(uint8_t *leng, uint8_t *data) const { + Q_UNUSED(leng); + Q_UNUSED(data); + return false; + } - virtual bool rtc_getExtendedTime(struct T_extTime *exTime) const =0; + virtual bool rtc_getExtendedTime(struct T_extTime *exTime) const { + Q_UNUSED(exTime); + return false; + } - virtual bool sys_runCompleteTest(void) const =0; - // warning: lasts 20s in one pace + virtual bool sys_runCompleteTest() const { + return false; + } + // warning: lasts 20s in one pace - virtual bool sys_ready4sending(void) const =0; + virtual bool sys_ready4sending() const { + return false; + } // return true if a Json-file can be sent - virtual bool sys_sendJsonFileToDc(uint8_t kindOfFile, uint8_t nrOfTemplate, uint8_t *content ) const =0; - // kindOfFile: 1=config, 2=device, 3=cash, 4=serial, 5=time, 6=printer - // nrOfTemplate=1...32 if kindOfFile==6 - // content = content of the Json file, max 800byte ascii signs - // file is 0-terminated! - // return false if sending is not possible, wait a second + virtual bool sys_sendJsonFileToDc(uint8_t kindOfFile, uint8_t nrOfTemplate, uint8_t *content ) const { + Q_UNUSED(kindOfFile); + Q_UNUSED(nrOfTemplate); + Q_UNUSED(content); + return false; + } + // kindOfFile: 1=config, 2=device, 3=cash, 4=serial, 5=time, 6=printer + // nrOfTemplate=1...32 if kindOfFile==6 + // content = content of the Json file, max 800byte ascii signs + // file is 0-terminated! + // return false if sending is not possible, wait a second - virtual bool prn_sendDynamicPrnValues(uint8_t *dynPrnVal ) const =0; + virtual bool prn_sendDynamicPrnValues(uint8_t *dynPrnVal ) const { + Q_UNUSED(dynPrnVal); + return false; + } // dynPrnVal = array of 8 Variables with 8 byte each, come as ascii string // like: char prn_dynPrnVal[8][8]; // return true if sending, false if cmd-stack is full - virtual bool prn_printTemplate(uint8_t nrOftemplate) const =0; - // print one of the templates loaded by Json prior - // nr = 1..32 - // return true if sending, false if cmd-stack is full + virtual bool prn_printTemplate(uint8_t nrOftemplate) const { + Q_UNUSED(nrOftemplate); + return false; + } + // print one of the templates loaded by Json prior + // nr = 1..32 + // return true if sending, false if cmd-stack is full - virtual void log_getHoldAccountNumbers(uint8_t *nrOfVals, uint16_t *accNr ) const =0; + virtual void log_getHoldAccountNumbers(uint8_t *nrOfVals, uint16_t *accNr ) const { + Q_UNUSED(nrOfVals); + Q_UNUSED(accNr); + } // returns all acc nrs of the backuped vault records // 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 + virtual bool log_selectVaultRecord(uint16_t accountNr ) const { + Q_UNUSED(accountNr); + return false; + } + // return true if sending, false if cmd-stack is full + // and trigger transfer - virtual bool log_chkIfVaultRecordAvailable(void) const =0; - // return true if completly received + virtual bool log_chkIfVaultRecordAvailable() const { + return false; + } + // 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 + // which was selected by: log_selectVaultRecord() + // to be forwarded to Ismas - virtual bool prn_printAccountReceipt(void) const =0; - // print all 8 backuped accounting receipts - // return true if sending to DC OK, false if cmd-stack is full + virtual bool prn_printAccountReceipt() const { + return false; + } + // print all 8 backuped accounting receipts + // return true if sending to DC OK, false if cmd-stack is full - virtual bool prn_printTestTicket(void) const =0; - // return true if sending to DC OK, false if cmd-stack is full + virtual bool prn_printTestTicket() const { + return false; + } + // return true if sending to DC OK, false if cmd-stack is full - virtual bool cash_startPayment(uint32_t amount) const =0; - // 17.4.23TS: extended to 32bit + virtual bool cash_startPayment(uint32_t amount) const { + Q_UNUSED(amount); + return false; + } + // 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 uint8_t cash_paymentProcessing() const { + return 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; + virtual uint32_t getInsertedAmount() const { + return 0; + } - virtual uint16_t getLastInsertedCoin(void) const =0; + virtual uint16_t getLastInsertedCoin(void) const { + return 0; + } - virtual bool getAllInsertedCoins(uint16_t *types, uint16_t *values) const =0; - // alle bei diesem Verkauf eingeworfenen Muenzen sind gespeichert, max 64 + virtual bool getAllInsertedCoins(uint16_t *types, uint16_t *values) const { + Q_UNUSED(types); + Q_UNUSED(values); + return false; + } + // alle bei diesem Verkauf eingeworfenen Muenzen sind gespeichert, max 64 - virtual bool cash_cancelPayment(void) const =0; - // and return coins + virtual bool cash_cancelPayment() const { + return false; + } + // and return coins - virtual bool cash_stopPayment(void) const =0; - // and keep coins in escrow + virtual bool cash_stopPayment() const { + return false; + } + // and keep coins in escrow // after ticket/goods issue: - virtual bool vend_success(void) const =0; - // conclude payment process, encash all inserted coins to vault. Printing was successful - // if possible return change + virtual bool vend_success() const { + return false; + } + // conclude payment process, encash all inserted coins to vault. Printing was successful + // if possible return change - virtual bool vend_failed(void) const =0; - // conclude payment process and return all inserted coins + virtual bool vend_failed() const { + return false; + } + // conclude payment process and return all inserted coins - 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 uint8_t mif_getCardType(QString *cardholder) const { + Q_UNUSED(cardholder); + return 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 uint64_t sys_getWakeSource() const { + return 0; + } + // retval: 6 bytes, bit coded, 1=event keeps DC awake - 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 uint8_t sys_getWakeReason() const { + return 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; + virtual void sys_getDeviceConditions(uint8_t *leng, uint8_t *data) const { + Q_UNUSED(leng); + Q_UNUSED(data); + } - virtual void sys_getDeviceConditions(struct T_moduleCondition *devCond) const =0; + virtual void sys_getDeviceConditions(struct T_moduleCondition *devCond) const { + Q_UNUSED(devCond); + } - virtual void sys_getDynMachineConditions(uint8_t *leng, uint8_t *data) const =0; + virtual void sys_getDynMachineConditions(uint8_t *leng, uint8_t *data) const { + Q_UNUSED(leng); + Q_UNUSED(data); + } - virtual void sys_getDynMachineConditions(struct T_dynamicCondition *dynMachCond) const =0; + virtual void sys_getDynMachineConditions(struct T_dynamicCondition *dynMachCond) const { + Q_UNUSED(dynMachCond); + } - virtual uint32_t cash_getAmountInVault(void) const =0; + virtual uint32_t cash_getAmountInVault() const { + return 0; + } - virtual uint16_t cash_getNrCoinsInVault(void) const =0; + virtual uint16_t cash_getNrCoinsInVault() const { + return 0; + } - virtual uint8_t prn_getPrintResult() const =0; + virtual uint8_t prn_getPrintResult() const { + return 0; + } - 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 uint8_t prn_getCurrentPrinterState() const { + return 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_sendDeviceParameter(struct T_devices *deviceSettings) const { + Q_UNUSED(deviceSettings); + } - virtual void sys_restoreDeviceParameter(struct T_devices *deviceSettings) const =0; - // attention: only applies if function "sys_sendDeviceParameter()" was used to send this settings before - // cannot be used to see settings programmed by JsonFile + virtual void sys_restoreDeviceParameter(struct T_devices *deviceSettings) const { + Q_UNUSED(deviceSettings); + } + // attention: only applies if function "sys_sendDeviceParameter()" was used to send this settings before + // cannot be used to see settings programmed by JsonFile - virtual bool sys_areDCdataValid(void) const =0; + virtual bool sys_areDCdataValid() const { + return false; + } - virtual bool sys_sendingTest(void) const =0; + virtual bool sys_sendingTest() const { + return false; + } - virtual void prn_requestCurrentDynData(void) const =0; + virtual void prn_requestCurrentDynData() const {} - virtual bool prn_getCurrentDynamicPrnValuesFromDC(uint8_t *dynPrnVal ) const =0; + virtual bool prn_getCurrentDynamicPrnValuesFromDC(uint8_t *dynPrnVal ) const { + Q_UNUSED(dynPrnVal); + return false; + } // which was sent with: bool prn_sendDynamicPrnValues(uint8_t *dynPrnVal ) const =0; - virtual bool prn_dynDataAreEqual(uint8_t *buf) const =0; + virtual bool prn_dynDataAreEqual(uint8_t *buf) const { + Q_UNUSED(buf); + return false; + } - virtual bool prn_printKombiticket(uint8_t nrOfKombi) const =0; - // print four of the templates loaded by Json prior - // nr = 1..8 + virtual bool prn_printKombiticket(uint8_t nrOfKombi) const { + Q_UNUSED(nrOfKombi); + return false; + } + // print four of the templates loaded by Json prior + // nr = 1..8 - virtual void lock_triggerUpperSolenoid(void) const =0; + virtual void lock_triggerUpperSolenoid(void) const {} - virtual void lock_triggerLowerSolenoid(void) const =0; + virtual void lock_triggerLowerSolenoid(void) const {} - virtual bool doors_supervise(void) const =0; + virtual bool doors_supervise() const { + return false; + } - virtual bool dc_isAutoRequestOn(void) const =0; + virtual bool dc_isAutoRequestOn() const { + return false; + } - virtual uint16_t log_getLatestAccountNumber(void) const=0; + virtual uint16_t log_getLatestAccountNumber() const { + return 0; + } // new function 27.6.2023 // latest = highest of the backup's - virtual uint8_t log_getAvailableVaultBlocks(void) const=0; - // return 0x0011 1111 if all 6 blocks are loaded (one bit per block) + virtual uint8_t log_getAvailableVaultBlocks() const { + return 0; + } + // return 0x0011 1111 if all 6 blocks are loaded (one bit per block) - virtual uint8_t log_getAnswerToLastSlaveRequest(void) const =0; - // use only for ONE request/command - // return: 0xFF: result unknown by now as sending is ongoing - // 0=OK - // 1= wrong length 2=wrong start sign 5= wrong crc - // 6= slave: master cmd was wrong 7: slave: could not write/read data - // 8=timeout, got no response from slave - // 0,8 work, 1..6 not yet tested. 8 comes immed. and stays 8 until reconnect + virtual uint8_t log_getAnswerToLastSlaveRequest() const { + return 0; + } + // use only for ONE request/command + // return: 0xFF: result unknown by now as sending is ongoing + // 0=OK + // 1= wrong length 2=wrong start sign 5= wrong crc + // 6= slave: master cmd was wrong 7: slave: could not write/read data + // 8=timeout, got no response from slave + // 0,8 work, 1..6 not yet tested. 8 comes immed. and stays 8 until reconnect // use for important and extended commands (print several templates, print ticket...) - virtual void log_startSupervision(void) const =0; + virtual void log_startSupervision() const {} - virtual uint8_t log_getAnswerToLastCmdBatch(void) const =0; - // 0xFF: no command sent by now - // 0: started, in progress - // 1: done and OK - // 2: done and error - // not working properly, always 0 + virtual uint8_t log_getAnswerToLastCmdBatch() const { + return 0; + } + // 0xFF: no command sent by now + // 0: started, in progress + // 1: done and OK + // 2: done and error + // not working properly, always 0 - virtual bool log_getVaultData(uint8_t *data) const =0; - // get vault record in linear 8bit buffer with 384 byte + virtual bool log_getVaultData(uint8_t *data) const { + Q_UNUSED(data); + return false; + } + // get vault record in linear 8bit buffer with 384 byte // new from 1.8.23 - virtual bool prn_printOneAccountReceipt(uint16_t accountNr) const =0; - // print one out of eight stored last accounting receipts - // function log_getHoldAccountNumbers() gives a list of acc-Nr. of the stored receipts + virtual bool prn_printOneAccountReceipt(uint16_t accountNr) const { + Q_UNUSED(accountNr); + return false; + } + // print one out of eight stored last accounting receipts + // function log_getHoldAccountNumbers() gives a list of acc-Nr. of the stored receipts - virtual bool prn_printAllAvailAccountReceipts(void) const =0; - // same as: prn_printAccountReceipt() from line 1153 - // return true if sending to DC OK, false if cmd-stack is full + virtual bool prn_printAllAvailAccountReceipts() const { + return false; + } + // same as: prn_printAccountReceipt() from line 1153 + // return true if sending to DC OK, false if cmd-stack is full - virtual bool log_verifyVaultRecordByCrc(void) const =0; - // return true if CRC16 is correct, data are 100% OK. Security level 1:65536 - // verification is strongly recommended before further processing - // in case of "false"-result please reload from DC + virtual bool log_verifyVaultRecordByCrc() const { + return false; + } + // return true if CRC16 is correct, data are 100% OK. Security level 1:65536 + // verification is strongly recommended before further processing + // in case of "false"-result please reload from DC - virtual uint16_t log_DC_getNextAccountNumber(void) const=0; - // the current cash box content will be backuped with this number on next cashbox-change + virtual uint16_t log_DC_getNextAccountNumber() const { + return 0; + } + // the current cash box content will be backuped with this number on next cashbox-change - virtual void log_DC_setNextAccountNumber(uint16_t newAccountingNumber) const=0; - // the current cash box content will be backuped with this number on next cashbox-change - // use only in case of hardware replacements or errors which derailed the number + virtual void log_DC_setNextAccountNumber(uint16_t newAccountingNumber) const { + Q_UNUSED(newAccountingNumber); + } + // the current cash box content will be backuped with this number on next cashbox-change + // use only in case of hardware replacements or errors which derailed the number - virtual void log_DC_deleteAllVaultrecordsInDc(void) const=0; - // use only in case of hardware replacements or errors which derailed the number + virtual void log_DC_deleteAllVaultrecordsInDc() const {} + // use only in case of hardware replacements or errors which derailed the number - virtual void log_DC_deleteAllTotalCounters(void) const=0; - // use only in case of hardware replacements or errors which derailed the number + virtual void log_DC_deleteAllTotalCounters() const {} + // use only in case of hardware replacements or errors which derailed the number - virtual void dc_setNewCustomerNumber(uint16_t newCustNr) const =0; + virtual void dc_setNewCustomerNumber(uint16_t newCustNr) const { + Q_UNUSED(newCustNr); + } - virtual void dc_setNewMachineNumber(uint16_t newMachNr) const =0; + virtual void dc_setNewMachineNumber(uint16_t newMachNr) const { + Q_UNUSED(newMachNr); + } - virtual void dc_setNewBorough(uint16_t newBorough) const =0; + virtual void dc_setNewBorough(uint16_t newBorough) const { + Q_UNUSED(newBorough); + } - virtual void dc_setNewZone(uint16_t newZone) const =0; + virtual void dc_setNewZone(uint16_t newZone) const { + Q_UNUSED(newZone); + } // new functions from 8.9.23 - virtual QString mif_getReaderType(void) const =0; - // return "SL025" if correct reader is connected + virtual QString mif_getReaderType() const { + return QString(); + } + // return "SL025" if correct reader is connected - virtual void mif_getCardSize(uint8_t *cardSize, uint8_t *idLeng) const =0; - // cardSize=1k or 4kByte - // idLeng =4Byte or 7 byte + virtual void mif_getCardSize(uint8_t *cardSize, uint8_t *idLeng) const { + Q_UNUSED(cardSize); + Q_UNUSED(idLeng); + } + // cardSize=1k or 4kByte + // idLeng =4Byte or 7 byte - virtual char mif_getAtbCardData(uint8_t *buf, uint8_t maxBuffSiz) const =0; - // return complete buffer binary, just for test purpose + virtual char mif_getAtbCardData(uint8_t *buf, uint8_t maxBuffSiz) const { + Q_UNUSED(buf); + Q_UNUSED(maxBuffSiz); + return 0; + } + // return complete buffer binary, just for test purpose - virtual bool mif_isValidAtbCard(void) const =0; + virtual bool mif_isValidAtbCard() const { + return false; + } - virtual uint32_t mif_getAtbCardCuNu(void) const =0; + virtual uint32_t mif_getAtbCardCuNu() const { + return 0; + } - virtual uint8_t mif_getAtbCardTyp(void) const =0; - // return 1=upper door card 1=lower door 3=printer-test 4=coin-test - // 0: not a valid atb2020 card + virtual uint8_t mif_getAtbCardTyp() const { + return 0; + } + // return 1=upper door card 1=lower door 3=printer-test 4=coin-test + // 0: not a valid atb2020 card - virtual QString mif_getAtbCardPerso(void) const =0; - // e.g. "PNsax001" used for personal number, name shortcode, card number - // free to use, can be set in AtbMcw23.exe tool + virtual QString mif_getAtbCardPerso() const { + return QString(); + } + // e.g. "PNsax001" used for personal number, name shortcode, card number + // free to use, can be set in AtbMcw23.exe tool - virtual void mif_getAtbCardExpire(uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *hour, uint8_t *minute) const =0; + virtual void mif_getAtbCardExpire(uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *hour, uint8_t *minute) const { + Q_UNUSED(year); + Q_UNUSED(month); + Q_UNUSED(day); + Q_UNUSED(hour); + Q_UNUSED(minute); + } // ------------------------------------------------------------------------------------ @@ -1425,38 +2047,50 @@ public: // 29.9.23: new: "completeStart" function, replaces bl_rebootDC(), bl_startBL() and bl_checkBL() // result can be verified with bl_isUp() as before - virtual bool bl_completeStart(void) const =0; - // must be used in DC's normal operation + virtual bool bl_completeStart() const { + return false; + } + // must be used in DC's normal operation // select binfile-name in GUI // send binfile-name to BL-processor: - virtual bool bl_storeFirmware(QString fileName) const =0; - // load binary file 3x and compare - // return true if loaded correctly - // return false: error, could not load correctly + virtual bool bl_storeFirmware(QString fileName) const { + Q_UNUSED(fileName); + return false; + } + // load binary file 3x and compare + // return true if loaded correctly + // return false: error, could not load correctly // request the number of blocks for this file - virtual uint16_t bl_getNrOfFirmwareBlocks(void) const =0; - // size of the loaded bin file in 64byte blocks - // call after bl_storeFirmware() + virtual uint16_t bl_getNrOfFirmwareBlocks() const { + return 0; + } + // size of the loaded bin file in 64byte blocks + // call after bl_storeFirmware() // call the next two function's repetitive with "blockNumber"=0,1,2,3....."bl_getNrOfFirmwareBlocks()" - virtual bool bl_blockAutoLoad(uint16_t blockNumber) const =0; - // call in loop from block number 0 up to <= "dcBL_getNrOfBlocks()" - //the last block "bl_getNrOfFirmwareBlocks()" is sent as conclusion command (important!) - // but after every call WAIT (!) for response "bl_blockAutoResponse()" !!!! - // data will be sent to DC, if neccesary addr will be sent additionally - // if neccesary sending will automatically repeat up to 3times - // retval: false if blockNumber>4095, true else + virtual bool bl_blockAutoLoad(uint16_t blockNumber) const { + Q_UNUSED(blockNumber); + return false; + } + // call in loop from block number 0 up to <= "dcBL_getNrOfBlocks()" + //the last block "bl_getNrOfFirmwareBlocks()" is sent as conclusion command (important!) + // but after every call WAIT (!) for response "bl_blockAutoResponse()" !!!! + // data will be sent to DC, if neccesary addr will be sent additionally + // if neccesary sending will automatically repeat up to 3times + // retval: false if blockNumber>4095, true else // check out this response after every block-sending, wait until >0!!! - virtual int8_t bl_blockAutoResponse(void) const =0; - // after every "bl_blockAutoLoad()" call this until response - // retval 0: wait 1: OK, blk was sent 2: OK, transfer complete - // 3: error despite repeating, cancel. probably bin file corrupted - // Max duration: 3x no response from BL = 900ms + virtual int8_t bl_blockAutoResponse() const { + return 0; + } + // after every "bl_blockAutoLoad()" call this until response + // retval 0: wait 1: OK, blk was sent 2: OK, transfer complete + // 3: error despite repeating, cancel. probably bin file corrupted + // Max duration: 3x no response from BL = 900ms // finally call: @@ -1467,15 +2101,20 @@ public: // new from 28.9.23 and earliest from DC version 4.45 // get all versions of the DC-Jsons - virtual void sys_requestJsonVersions(uint8_t jsonNr) const =0; - // send one request for every single version - // jsonNr=1...36, 1=config file (cust.Nr) 2=devices 3=cash 4=res. - // 5=printer template 1 ..... 36= template 32 + virtual void sys_requestJsonVersions(uint8_t jsonNr) const { + Q_UNUSED(jsonNr); + } + // send one request for every single version + // jsonNr=1...36, 1=config file (cust.Nr) 2=devices 3=cash 4=res. + // 5=printer template 1 ..... 36= template 32 - virtual void sys_getJsonVersions(uint8_t jsonNr, char *versionString) const =0; - // jsonNr=1...36, 1=config file (cust.Nr) 2=devices 3=cash 4=res. - // 5=printer template 1 ..... 36= template 32 - // length of buffer is always 16 byte + virtual void sys_getJsonVersions(uint8_t jsonNr, char *versionString) const { + Q_UNUSED(jsonNr); + Q_UNUSED(versionString); + } + // jsonNr=1...36, 1=config file (cust.Nr) 2=devices 3=cash 4=res. + // 5=printer template 1 ..... 36= template 32 + // length of buffer is always 16 byte // ------------------------------------------------------------------------------------ // Coin Changer @@ -1511,23 +2150,32 @@ public: // tokenChannel 0...31: if this signal comes from emp then a token was inserted // coinDenomination = array of 16 coin values (e.g. 5, 10, 20...) - virtual void changer_returnCoins(uint32_t amountInCent) const =0; + virtual void changer_returnCoins(uint32_t amountInCent) const { + Q_UNUSED(amountInCent); + } - virtual void changer_requestChangeResult(void) const =0; + virtual void changer_requestChangeResult() const {} - virtual uint8_t changer_getChangeResult(uint32_t *returnedAmount) const =0; - // get result of coin dispensing - // receivedData[0]: 0: not yet started 1:amount returned - // 2:only partial return 3: no return possible - // receivedData[2,3,4,5]: returned amount + virtual uint8_t changer_getChangeResult(uint32_t *returnedAmount) const { + Q_UNUSED(returnedAmount); + return 0; + } + // get result of coin dispensing + // receivedData[0]: 0: not yet started 1:amount returned + // 2:only partial return 3: no return possible + // receivedData[2,3,4,5]: returned amount - virtual void changer_getAllParameters(struct T_changer *mw) const =0; - // requested automatically with 23, same like EMP + virtual void changer_getAllParameters(struct T_changer *mw) const { + Q_UNUSED(mw); + } + // requested automatically with 23, same like EMP - virtual void changer_requestTubelevel(void) const =0; + virtual void changer_requestTubelevel(void) const {} - virtual void changer_getTubelevel(struct T_chg_Tub *tubLevel) const =0; - // don't use tubeDispens[], it's not yet correct! + virtual void changer_getTubelevel(struct T_chg_Tub *tubLevel) const { + Q_UNUSED(tubLevel); + } + // don't use tubeDispens[], it's not yet correct!