Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
1197598a3d
|
|||
ec13e97226
|
|||
a8dd9d7e24
|
|||
82751eb1d4 | |||
17a4a69df2 | |||
a03261d04a |
@@ -15,7 +15,7 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
# In order to do so, uncomment the following line.
|
||||
# You can also select to disable deprecated APIs only up to a certain version of Qt.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
VERSION=1.3.3
|
||||
VERSION=1.3.5
|
||||
|
||||
INCLUDEPATH += plugins
|
||||
|
||||
|
51
plugins/interfaces.h
Normal file → Executable file
51
plugins/interfaces.h
Normal file → Executable file
@@ -193,7 +193,7 @@ struct T_moduleCondition
|
||||
uint8_t coinChecker; // EMP, OMP or mei-cashflow
|
||||
|
||||
uint8_t coinEscrow;
|
||||
uint8_t mifareReader;
|
||||
uint8_t mifareReader; // 0: unknown 1=OK 200=no response 201=wrong response 202: Reader reports HW-error
|
||||
uint8_t creditTerm;
|
||||
uint8_t coinReject;
|
||||
|
||||
@@ -818,7 +818,7 @@ public:
|
||||
// --------------------------------------------- MIFARE -----------------------------------------------------
|
||||
// ----------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// obsolete
|
||||
virtual uint8_t mif_returnReaderStateAndCardType(uint8_t *buf, uint8_t maxBufferSize) const =0;
|
||||
// retval 0=OK 1=error host buffer too small
|
||||
/* data description, new fast version:
|
||||
@@ -840,13 +840,16 @@ public:
|
||||
virtual bool mif_readerIsOK(void) const =0;
|
||||
|
||||
virtual bool mif_cardAttached(void) const =0;
|
||||
// not working! use mif_cardIsAttached() instead
|
||||
|
||||
virtual uint8_t mif_readResult(void) const =0;
|
||||
// result: 0: unknown or still in progress
|
||||
// 1: card read successful
|
||||
// 2: reading error
|
||||
// not working!
|
||||
|
||||
virtual QString mif_cardUID(void) const =0;
|
||||
// not working
|
||||
|
||||
virtual uint8_t mif_getCardDataDec(uint8_t blkNr, uint8_t *buf, uint8_t maxBufferSize) const =0;
|
||||
|
||||
@@ -1289,7 +1292,7 @@ public:
|
||||
// 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;
|
||||
@@ -1299,6 +1302,7 @@ public:
|
||||
// 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
|
||||
@@ -1343,6 +1347,37 @@ public:
|
||||
|
||||
|
||||
|
||||
// new functions from 8.9.23
|
||||
virtual QString mif_getReaderType(void) const =0;
|
||||
// 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 char mif_getAtbCardData(uint8_t *buf, uint8_t maxBuffSiz) const =0;
|
||||
// return complete buffer binary, just for test purpose
|
||||
|
||||
virtual bool mif_isValidAtbCard(void) const =0;
|
||||
|
||||
virtual uint32_t mif_getAtbCardCuNu(void) const =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 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 void mif_getAtbCardExpire(uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *hour, uint8_t *minute) const =0;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
signals:
|
||||
virtual void hwapi_templatePrintFinished_OK(void) const=0;
|
||||
virtual void hwapi_templatePrintFinished_Err(void) const=0;
|
||||
@@ -1413,9 +1448,15 @@ signals:
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/4.1"
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/4.2"
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/4.3"
|
||||
#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/4.4"
|
||||
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/4.4"
|
||||
// 8.9.2023 two new functions (end of file) for mifare test
|
||||
//#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/4.5"
|
||||
// 18.9.2023 major improvements for DC data exchange
|
||||
// verification of door and cash box signals
|
||||
// intensive verification of Json-Programming Master-Slave (PTU to DC), 100% ok
|
||||
|
||||
#define HWINF_iid "Atb.Psa1256ptu5.software.HWapi/4.6"
|
||||
// 20.9.2023: speeding up door and cash box signals
|
||||
|
||||
|
||||
Q_DECLARE_INTERFACE(hwinf, HWINF_iid)
|
||||
|
@@ -14,9 +14,9 @@
|
||||
#include <QRegExp>
|
||||
#include <QApplication>
|
||||
|
||||
//#include <iostream>
|
||||
//#include <fstream>
|
||||
//#include <ctime>
|
||||
#if defined (Q_OS_UNIX) || defined (Q_OS_LINUX)
|
||||
#include "unistd.h"
|
||||
#endif
|
||||
|
||||
#include "plugins/interfaces.h"
|
||||
|
||||
@@ -742,6 +742,9 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
|
||||
|
||||
QString const &parentName = Utils::getParentName();
|
||||
|
||||
Utils::printInfoMsg(
|
||||
QString("PARENT OF ATB-UPDATE-TOOL (ppid=%1) ").arg(getppid()) + parentName);
|
||||
|
||||
if (parentName == "ATBQT" || parentName == "systemd") {
|
||||
// the tool was not called during 'service' ot during an automatic
|
||||
// update procedure. and it was called explicitly with libCAmaster.so
|
||||
|
24
utils.cpp
24
utils.cpp
@@ -2,7 +2,10 @@
|
||||
#include "message_handler.h"
|
||||
#include "git/git_client.h"
|
||||
|
||||
|
||||
#if defined (Q_OS_UNIX) || defined (Q_OS_LINUX)
|
||||
#include "unistd.h"
|
||||
#endif
|
||||
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
@@ -180,18 +183,15 @@ bool Utils::sameFilesInDirs(QDir const &dir1, QDir const &dir2,
|
||||
|
||||
QString Utils::getParentName() { // get name of parent process
|
||||
QString ppid = QString("/proc/%1/status").arg(getppid());
|
||||
QFile f(ppid);
|
||||
if (f.exists()) {
|
||||
if (f.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
QTextStream in(&f);
|
||||
in.setCodec("UTF-8");
|
||||
while(!in.atEnd()) {
|
||||
// Name: ATBQT
|
||||
QStringList line = in.readLine().split(':');
|
||||
if (line.size() == 2) {
|
||||
if (line[0].trimmed() == "Name") {
|
||||
return line[1].trimmed();
|
||||
}
|
||||
std::ifstream f(ppid.toStdString().c_str());
|
||||
if (f.is_open()) {
|
||||
std::string next;
|
||||
while (std::getline(f, next)) {
|
||||
QString line = QString(next.c_str()).simplified();
|
||||
if (line.startsWith("Name")) {
|
||||
int const idx = line.indexOf(QChar(':'));
|
||||
if (idx != -1) {
|
||||
return line.mid(idx+1).trimmed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user