Compare commits
No commits in common. "d992ee3fad831f8bc159b87e687390a233b41afb" and "01140c523b600912e83302c988059c1cfd0a5488" have entirely different histories.
d992ee3fad
...
01140c523b
@ -124,8 +124,6 @@ public:
|
|||||||
T_datif *myDatif;
|
T_datif *myDatif;
|
||||||
|
|
||||||
|
|
||||||
virtual QStringList dc_getStatus() const;
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// Level 0 commands, interface
|
// Level 0 commands, interface
|
||||||
// open, close, change serial interface
|
// open, close, change serial interface
|
||||||
|
@ -2,9 +2,12 @@
|
|||||||
#define INTERFACE_H
|
#define INTERFACE_H
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtPlugin>
|
||||||
#include <QStringList>
|
|
||||||
|
|
||||||
struct T_emp {
|
|
||||||
|
|
||||||
|
struct T_emp
|
||||||
|
{
|
||||||
|
|
||||||
// Fixdata from EMP:
|
// Fixdata from EMP:
|
||||||
uint8_t shaft; // = changer level
|
uint8_t shaft; // = changer level
|
||||||
uint16_t countryCode;
|
uint16_t countryCode;
|
||||||
@ -31,9 +34,11 @@ struct T_emp {
|
|||||||
|
|
||||||
uint8_t pollingRunning;
|
uint8_t pollingRunning;
|
||||||
uint8_t paymentRunning;
|
uint8_t paymentRunning;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Trtc_DateTime {
|
struct Trtc_DateTime
|
||||||
|
{
|
||||||
uint8_t rtc_hour;
|
uint8_t rtc_hour;
|
||||||
uint8_t rtc_min;
|
uint8_t rtc_min;
|
||||||
uint8_t rtc_sec;
|
uint8_t rtc_sec;
|
||||||
@ -43,7 +48,8 @@ struct Trtc_DateTime {
|
|||||||
uint8_t rtc_dayOfWeek;
|
uint8_t rtc_dayOfWeek;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Tprn_hw_state {
|
struct Tprn_hw_state
|
||||||
|
{
|
||||||
// hardware (IO's)
|
// hardware (IO's)
|
||||||
bool powerRdBk; // prn pwr is on
|
bool powerRdBk; // prn pwr is on
|
||||||
bool rsSwOk; // serial switch (printer or modem) is set to printer
|
bool rsSwOk; // serial switch (printer or modem) is set to printer
|
||||||
@ -60,7 +66,8 @@ struct Tprn_hw_state {
|
|||||||
bool badResponse;
|
bool badResponse;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Tprn_currentSettings {
|
struct Tprn_currentSettings
|
||||||
|
{
|
||||||
uint8_t currFont;
|
uint8_t currFont;
|
||||||
uint8_t currSize;
|
uint8_t currSize;
|
||||||
uint8_t currHeigth;
|
uint8_t currHeigth;
|
||||||
@ -73,7 +80,8 @@ struct Tprn_currentSettings {
|
|||||||
bool nowAligned;
|
bool nowAligned;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct T_dynDat {
|
struct T_dynDat
|
||||||
|
{
|
||||||
uint8_t licensePlate[8];
|
uint8_t licensePlate[8];
|
||||||
uint8_t vendingPrice[8];
|
uint8_t vendingPrice[8];
|
||||||
uint8_t parkingEnd[8];
|
uint8_t parkingEnd[8];
|
||||||
@ -84,7 +92,10 @@ struct T_dynDat {
|
|||||||
uint8_t dynDat7[8];
|
uint8_t dynDat7[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct T_vaultRecord {
|
|
||||||
|
struct T_vaultRecord
|
||||||
|
{
|
||||||
|
|
||||||
// Kassenbeleg (Abrechnungsdatensatz = Kassenwechsel-Datensatz)
|
// Kassenbeleg (Abrechnungsdatensatz = Kassenwechsel-Datensatz)
|
||||||
char startbuffer[4]; // Psa> // never move or change this 1st entry
|
char startbuffer[4]; // Psa> // never move or change this 1st entry
|
||||||
uint16_t AccountingNumber;
|
uint16_t AccountingNumber;
|
||||||
@ -115,6 +126,7 @@ struct T_vaultRecord {
|
|||||||
uint32_t VKcoinsInserted[16]; // nur für Wechsler, soviel wurde eingeworfen
|
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
|
uint32_t VKcoinsReturned[6]; // nur für Wechsler, Anzahl Münzen pro Typ, soviel wurde zurückgegeben
|
||||||
//88
|
//88
|
||||||
|
|
||||||
// Service, Tür offen:
|
// Service, Tür offen:
|
||||||
uint16_t ServCoinsInserted[16]; // nur für Wechsler, soviel wurde eingeworfen
|
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
|
uint16_t ServCoinsReturned[6]; // nur für Wechsler, Anzahl Münzen pro Typ, soviel wurde zurückgegeben
|
||||||
@ -124,10 +136,12 @@ struct T_vaultRecord {
|
|||||||
uint16_t resint5;
|
uint16_t resint5;
|
||||||
uint16_t resint6;
|
uint16_t resint6;
|
||||||
// 56
|
// 56
|
||||||
|
|
||||||
char label4buffer[4]; // box>
|
char label4buffer[4]; // box>
|
||||||
uint16_t coinsInVault[16];
|
uint16_t coinsInVault[16];
|
||||||
uint16_t billsInStacker[8];
|
uint16_t billsInStacker[8];
|
||||||
// 48
|
// 48
|
||||||
|
|
||||||
char label5buffer[4]; // val>
|
char label5buffer[4]; // val>
|
||||||
// actually constant unless exchange rate is changed
|
// actually constant unless exchange rate is changed
|
||||||
uint16_t coinDenomination[16]; // 5..50000 (z.B. 2? sind in Ungarn 760Ft)
|
uint16_t coinDenomination[16]; // 5..50000 (z.B. 2? sind in Ungarn 760Ft)
|
||||||
@ -135,12 +149,17 @@ struct T_vaultRecord {
|
|||||||
uint16_t tubeDenom[6];
|
uint16_t tubeDenom[6];
|
||||||
uint16_t exchangeRate;
|
uint16_t exchangeRate;
|
||||||
uint16_t resint9;
|
uint16_t resint9;
|
||||||
|
|
||||||
// 64
|
// 64
|
||||||
|
|
||||||
char endofblock[4]; // end>
|
char endofblock[4]; // end>
|
||||||
|
|
||||||
// 316 byte Block im Speicher
|
// 316 byte Block im Speicher
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct T_moduleCondition {
|
struct T_moduleCondition
|
||||||
|
{
|
||||||
// store conditon of all system components, hold in RAM
|
// store conditon of all system components, hold in RAM
|
||||||
// 0 means unknown, not yet tested/used
|
// 0 means unknown, not yet tested/used
|
||||||
// 1 means OK
|
// 1 means OK
|
||||||
@ -186,9 +205,11 @@ struct T_moduleCondition {
|
|||||||
uint8_t res11;
|
uint8_t res11;
|
||||||
uint8_t res12;
|
uint8_t res12;
|
||||||
uint8_t res13;
|
uint8_t res13;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct T_dynamicCondition {
|
struct T_dynamicCondition
|
||||||
|
{
|
||||||
char allDoorsDebounced;
|
char allDoorsDebounced;
|
||||||
char openedAuthorized;
|
char openedAuthorized;
|
||||||
uint8_t CBinDebounced;
|
uint8_t CBinDebounced;
|
||||||
@ -235,7 +256,8 @@ struct T_dynamicCondition {
|
|||||||
//54
|
//54
|
||||||
};
|
};
|
||||||
|
|
||||||
struct T_extTime {
|
struct T_extTime
|
||||||
|
{
|
||||||
uint8_t Hours;
|
uint8_t Hours;
|
||||||
uint8_t Min;
|
uint8_t Min;
|
||||||
uint8_t Sec;
|
uint8_t Sec;
|
||||||
@ -261,16 +283,19 @@ struct T_extTime {
|
|||||||
uint8_t res4;
|
uint8_t res4;
|
||||||
uint16_t res5;
|
uint16_t res5;
|
||||||
uint32_t MinutesOfMillenium;
|
uint32_t MinutesOfMillenium;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class hwinf {
|
class hwinf
|
||||||
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum class DownloadResult {OK, ERROR, TIMEOUT, NOP};
|
enum class DownloadResult {OK, ERROR, TIMEOUT, NOP};
|
||||||
enum class FileTypeJson {CONFIG=1, DEVICE, CASH, SERIAL, TIME, PRINTER};
|
enum class FileTypeJson {CONFIG=1, DEVICE, CASH, SERIAL, TIME, PRINTER};
|
||||||
|
|
||||||
virtual ~hwinf() {}
|
virtual ~hwinf() {}
|
||||||
|
|
||||||
virtual QStringList dc_getStatus() const = 0;
|
|
||||||
|
|
||||||
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
||||||
// Use serial interface and protocol stack in Cashagent-Library
|
// Use serial interface and protocol stack in Cashagent-Library
|
||||||
|
@ -169,22 +169,6 @@ bool hwapi::dc_openSerial(int BaudNr, QString BaudStr,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList hwapi::dc_getStatus() const {
|
|
||||||
QStringList status;
|
|
||||||
|
|
||||||
if (m_sharedMem) {
|
|
||||||
SharedMemBuffer const *shMem = SharedMemBuffer::getDataConst();
|
|
||||||
status += QString("comport : %1").arg(shMem->rs.comportName);
|
|
||||||
status += QString("baudrate : %1").arg(shMem->rs.baudNr);
|
|
||||||
status += QString("baudNr : %1").arg(shMem->rs.baudStr);
|
|
||||||
status += QString("connect : %1").arg(shMem->rs.connect);
|
|
||||||
status += QString("port open: %1").arg(shMem->rs.portIsOpen);
|
|
||||||
// to be continued
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool hwapi::dc_closeSerial(void) const {
|
bool hwapi::dc_closeSerial(void) const {
|
||||||
epi_closeSerial();
|
epi_closeSerial();
|
||||||
for (int i = 0; i < 10; ++i) {
|
for (int i = 0; i < 10; ++i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user