27 #ifndef TEREADERBASE_H 28 #define TEREADERBASE_H 31 #include <qvaluelist.h> 33 #include "templexports.h" 35 #define EVENT_READER_DATAARRIVED 1 36 #define EVENT_READER_ERROR 100 49 virtual QString text(
int iTrackNumber = 0 )
const;
54 void setBuffering(
int iBufEnabled);
55 int buffering()
const;
57 void setDropStopByte(
bool bDSB) {m_bDropStopByte=bDSB;}
58 bool dropStopByte()
const {
return m_bDropStopByte;}
60 void setUseStopByte(
bool bUSB) {m_bUseStopByte=bUSB;}
61 bool useStopByte()
const {
return m_bUseStopByte;}
63 void setMaxLength(
int iML) {m_iMaxLength=iML;}
64 int maxLength()
const {
return m_iMaxLength;}
66 void setDropBegCnt(
int iDBC) {m_iDropBegCnt=iDBC;}
67 int dropBegCnt()
const {
return m_iDropBegCnt;}
69 void setDropEndCnt(
int iDEC) {m_iDropEndCnt=iDEC;}
70 int dropEndCnt()
const {
return m_iDropEndCnt;}
74 void setStopByte(
int);
77 void setMaxDelay(
int);
80 void setStartSequence(
const QString &seq );
81 QString startSequence()
const {
return m_qsStartSequence;}
83 void setStopSequence(
const QString &seq );
84 QString stopSequence()
const {
return m_qsStopSequence;}
88 virtual int startDriver();
89 virtual int stopDriver();
91 virtual bool setParameter(
const QString &,
const QString &);
95 return (
int)m_qBuffer.size();
105 virtual int readerType()
const=0;
110 int pushText(
const QString &);
114 virtual int openPort()=0;
115 virtual int closePort()=0;
116 virtual int readBarcode()=0;
118 virtual void emitSignal();
119 virtual void reportError(
const QString &);
121 void setErrorText(
const QString & err);
123 virtual void handleData(
const QString &data );
128 QString m_qsReadBuffer;
130 QValueList <QString> m_qBuffer;
131 bool m_bClearToChangeBC;
133 bool m_bDropStopByte;
140 QString m_qsErrorText;
141 QString m_qsStartSequence, m_qsStopSequence;
The TEReaderBase is base class for all reader classes.
Definition: tereaderbase.h:39
virtual QString errorText() const
Definition: tebase.cpp:144
The TEBase is base class for all trade equipment classes.
Definition: tebase.h:148