2010-11-14 00:46:12 +00:00
|
|
|
#ifndef QSSPT_H
|
|
|
|
#define QSSPT_H
|
|
|
|
|
|
|
|
#include "qssp.h"
|
|
|
|
#include <QThread>
|
|
|
|
#include <QQueue>
|
2010-12-10 19:16:09 +00:00
|
|
|
#include <QWaitCondition>
|
|
|
|
class qsspt:public qssp, public QThread
|
2010-11-14 00:46:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-12-10 19:16:09 +00:00
|
|
|
qsspt(port * info,bool debug);
|
2010-11-14 00:46:12 +00:00
|
|
|
void run();
|
|
|
|
int packets_Available();
|
2010-12-10 19:16:09 +00:00
|
|
|
int read_Packet(void *);
|
2010-11-14 00:46:12 +00:00
|
|
|
~qsspt();
|
2010-12-10 19:16:09 +00:00
|
|
|
bool sendData(uint8_t * buf,uint16_t size);
|
2010-11-14 00:46:12 +00:00
|
|
|
private:
|
|
|
|
virtual void pfCallBack( uint8_t *, uint16_t);
|
2010-12-10 19:16:09 +00:00
|
|
|
uint8_t * mbuf;
|
|
|
|
uint16_t msize;
|
2010-11-14 00:46:12 +00:00
|
|
|
QQueue<QByteArray> queue;
|
|
|
|
QMutex mutex;
|
2010-12-10 19:16:09 +00:00
|
|
|
QMutex sendbufmutex;
|
|
|
|
bool datapending;
|
2010-11-14 00:46:12 +00:00
|
|
|
bool endthread;
|
2010-12-10 19:16:09 +00:00
|
|
|
uint16_t sendstatus;
|
|
|
|
uint16_t receivestatus;
|
|
|
|
QWaitCondition sendwait;
|
|
|
|
QMutex msendwait;
|
|
|
|
bool debug;
|
2010-11-14 00:46:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QSSPT_H
|