You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
821 B
29 lines
821 B
#ifndef __TRANSPORT_SERIAL_HEADERS__
|
|
#define __TRANSPORT_SERIAL_HEADERS__
|
|
|
|
#include "../../components/base/basicDualThread.h"
|
|
#include "../../components/base/basicTransport.h"
|
|
|
|
#define MAXIMAL_SERIAL_PACKET_LENGTH 1024
|
|
|
|
class transportSerial: public basicTransport, public basicDualThread {
|
|
private:
|
|
basicLogCollection *m_pLog;
|
|
void m_fThreadAProc(void);
|
|
void m_fThreadBProc(void);
|
|
protected:
|
|
U8 *m_pInputBuffer;
|
|
int m_nInputBufferSize;
|
|
U8 *m_pOutputBuffer;
|
|
int m_nOutputBufferSize;
|
|
virtual int sendBlock(unsigned char *Data, int DataSize){ return 0;};
|
|
virtual int recptBlock(unsigned char *Buffer, int *BufferLength){ return 0;};
|
|
public:
|
|
transportSerial();
|
|
~transportSerial();
|
|
bool sendData( unsigned char *Data, int DataSize );
|
|
};
|
|
|
|
|
|
#endif
|
|
|