Added dc_getStatus() to send info to ISMAS

This commit is contained in:
Gerhard Hoffmann 2023-04-18 15:06:48 +02:00
parent 7129805f4e
commit b7d8fabfd0

View File

@ -2,12 +2,9 @@
#define INTERFACE_H
#include <QtPlugin>
#include <QStringList>
struct T_emp
{
struct T_emp {
// Fixdata from EMP:
uint8_t shaft; // = changer level
uint16_t countryCode;
@ -34,11 +31,9 @@ struct T_emp
uint8_t pollingRunning;
uint8_t paymentRunning;
};
struct Trtc_DateTime
{
struct Trtc_DateTime {
uint8_t rtc_hour;
uint8_t rtc_min;
uint8_t rtc_sec;
@ -48,8 +43,7 @@ struct Trtc_DateTime
uint8_t rtc_dayOfWeek;
};
struct Tprn_hw_state
{
struct Tprn_hw_state {
// hardware (IO's)
bool powerRdBk; // prn pwr is on
bool rsSwOk; // serial switch (printer or modem) is set to printer
@ -66,8 +60,7 @@ struct Tprn_hw_state
bool badResponse;
};
struct Tprn_currentSettings
{
struct Tprn_currentSettings {
uint8_t currFont;
uint8_t currSize;
uint8_t currHeigth;
@ -80,8 +73,7 @@ struct Tprn_hw_state
bool nowAligned;
};
struct T_dynDat
{
struct T_dynDat {
uint8_t licensePlate[8];
uint8_t vendingPrice[8];
uint8_t parkingEnd[8];
@ -92,10 +84,7 @@ struct Tprn_hw_state
uint8_t dynDat7[8];
};
struct T_vaultRecord
{
struct T_vaultRecord {
// Kassenbeleg (Abrechnungsdatensatz = Kassenwechsel-Datensatz)
char startbuffer[4]; // Psa> // never move or change this 1st entry
uint16_t AccountingNumber;
@ -126,7 +115,6 @@ struct T_vaultRecord
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
//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
@ -136,12 +124,10 @@ struct T_vaultRecord
uint16_t resint5;
uint16_t resint6;
// 56
char label4buffer[4]; // box>
uint16_t coinsInVault[16];
uint16_t billsInStacker[8];
// 48
char label5buffer[4]; // val>
// actually constant unless exchange rate is changed
uint16_t coinDenomination[16]; // 5..50000 (z.B. 2? sind in Ungarn 760Ft)
@ -149,17 +135,12 @@ struct T_vaultRecord
uint16_t tubeDenom[6];
uint16_t exchangeRate;
uint16_t resint9;
// 64
char endofblock[4]; // end>
// 316 byte Block im Speicher
};
struct T_moduleCondition
{
struct T_moduleCondition {
// store conditon of all system components, hold in RAM
// 0 means unknown, not yet tested/used
// 1 means OK
@ -205,11 +186,9 @@ struct T_moduleCondition
uint8_t res11;
uint8_t res12;
uint8_t res13;
};
struct T_dynamicCondition
{
struct T_dynamicCondition {
char allDoorsDebounced;
char openedAuthorized;
uint8_t CBinDebounced;
@ -256,8 +235,7 @@ struct T_dynamicCondition
//54
};
struct T_extTime
{
struct T_extTime {
uint8_t Hours;
uint8_t Min;
uint8_t Sec;
@ -283,19 +261,16 @@ struct T_extTime
uint8_t res4;
uint16_t res5;
uint32_t MinutesOfMillenium;
};
class hwinf
{
class hwinf {
public:
enum class DownloadResult {OK, ERROR, TIMEOUT, NOP};
enum class FileTypeJson {CONFIG=1, DEVICE, CASH, SERIAL, TIME, PRINTER};
virtual ~hwinf() {}
virtual QStringList dc_getStatus() const = 0;
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
// Use serial interface and protocol stack in Cashagent-Library