. 1.0.0
Класс TEConnect

The TEConnect is base class to connect with trade equipment. Подробнее...

#include <teconnect.h>

Граф наследования:TEConnect:
TE TEConnectKeyboard TEConnectSerial TEConnectTCP TEConnectTEServer

Открытые слоты

virtual void processEvent (int Code)
 
virtual QStringList execCommand (const QString &cmd)
 
virtual QString errorText () const
 

Сигналы

void deviceEvent (int Code)
 

Открытые члены

 TEConnect (int pn)
 
virtual void setActivationKey (const QString &key)
 
virtual QString activationKey () const
 
int connectionType ()
 
virtual int setPortNumber (int pn)
 
int portNumber () const
 
void setPollInterval (int pint)
 
int pollInterval ()
 
virtual int isOpen ()
 
int timeout ()
 
bool isTimeout ()
 
int debugLevel ()
 
void setDebugLevel (int level)
 
virtual QCString utf8ToDevice (const QString &text)
 
virtual QString deviceToUtf8 (const QCString &text)
 
virtual int isActivationKeyValid ()
 
QString productSuffix () const
 
void setProductSuffix (const QString &sProductSuffix)
 
void setPortBaudRate (int)
 
int portBaudRate () const
 
void setPortFlowControl (FlowType)
 
FlowType portFlowControl () const
 
void setPortParity (ParityType)
 
ParityType portParity () const
 
void setPortDataBits (DataBitsType)
 
DataBitsType portDataBits () const
 
void setPortStopBits (StopBitsType)
 
StopBitsType portStopBits () const
 
virtual QValueList< int > supportedBaudRates ()
 
virtual int setConnectionType (int ct)
 
virtual int open ()
 
virtual int close ()
 

Защищенные члены

void startPoll (int PollInterval=500, bool defaultProc=true)
 
void startPoll (bool defaultProc=true)
 
void stopPoll ()
 
void startIOTransaction ()
 
void stopIOTransaction ()
 
virtual int poll ()
 
TSerialPortport ()
 
virtual int putch (int b)
 
virtual int getch ()
 
virtual Q_ULONG writeBlock (const char *data, Q_ULONG len)
 
virtual Q_ULONG readBlock (char *data, Q_ULONG maxlen=1)
 
virtual Q_ULONG readCount ()
 
void setTimeout (int timeout)
 
void clearPPP ()
 
virtual void setErrorText (const QString &err)
 
void timerEvent (QTimerEvent *)
 

Защищенные данные

ExecEngine m_ee
 

Свойства

QString ActivationKey
 
int PortNumber
 
int PortBaudRate
 

Дополнительные унаследованные члены

- Открытые типы унаследованные от TE
enum  CaptureMode { CM_Exclusive =0 , CM_NonExclusive =1 }
 Define connection capture mode for setCaptureMode()
 
enum  EquipmentConnectionType {
  ECT_NOCONNECTION =0x0 , ECT_SERIAL =0x1 , ECT_KEYBOARD =0x2 , ECT_TCP =0x3 ,
  ECT_TESERVER =0x4
}
 
enum  CashRegisterOperations {
  CRO_SELL = 0x0 , CRO_BUY = 0x1 , CRO_SELLRET = 0x2 , CRO_BUYRET = 0x3 ,
  CRO_SELLSTORNO = 0x4 , CRO_BUYSTORNO = 0x5 , CRO_CASHIN = 0x6 , CRO_CASHOUT = 0x7 ,
  CRO_DISCOUNT = 0x8 , CRO_DISCOUNTPERCENT = 0x9 , CRO_OPMASK = 0xF
}
 

Подробное описание

The TEConnect is base class to connect with trade equipment.

Abstract trade equipment connection object. Object have internal text command interpreter that give access to object functions.

Аргументы
cmd(in) command text. Command format: <function> '(' <parm1> ',' <parm2> ',' ... <parmN> ')'
Возвращает
- command execution result.

Конструктор(ы)

◆ TEConnect()

TEConnect::TEConnect ( int pn)

Abstract trade equipment object. Object have internal text command interpreter that give access to object functions.

Аргументы
cmd(in) command text. Command format: <function> '(' <parm1> ',' <parm2> ',' ... <parmN> ')'
Возвращает
- command execution result.

Перекрестные ссылки startPoll(), stopPoll() и TEConnect().

Используется в TEConnect().

Методы

◆ execCommand

QStringList TEConnect::execCommand ( const QString & cmd)
virtualslot

Execute command. Object have internal text command interpreter that give access to object functions.

Аргументы
cmd(in) command text. Command format: <function> '(' <parm1> ',' <parm2> ',' ... <parmN> ')'
Возвращает
- command execution result.

◆ getch()

int TEConnect::getch ( )
protectedvirtual

Get character.

Используется в readBlock().

◆ isOpen()

int TEConnect::isOpen ( )
virtual

Check comunication port connection.

◆ port()

TSerialPort * TEConnect::port ( )
protected

Return pointer to device serial port object.

◆ putch()

int TEConnect::putch ( int b)
protectedvirtual

Put character

Используется в writeBlock().

◆ readBlock()

Q_ULONG TEConnect::readBlock ( char * data,
Q_ULONG maxlen = 1 )
protectedvirtual

Read data block from device.

Перекрестные ссылки getch().

◆ startPoll() [1/2]

void TEConnect::startPoll ( bool defaultProc = true)
protected

Перекрестные ссылки startPoll().

◆ startPoll() [2/2]

void TEConnect::startPoll ( int PollInterval = 500,
bool defaultProc = true )
protected

Используется в startPoll() и TEConnect().

◆ stopPoll()

void TEConnect::stopPoll ( )
protected

Используется в TEConnect().

◆ timerEvent()

void TEConnect::timerEvent ( QTimerEvent * )
protected

Poll device on timer event.

◆ writeBlock()

Q_ULONG TEConnect::writeBlock ( const char * data,
Q_ULONG len )
protectedvirtual

Write data block to device.

Перекрестные ссылки putch().


Объявления и описания членов классов находятся в файлах: