Serial.h
上传用户:pumpssky
上传日期:2007-12-07
资源大小:110k
文件大小:1k
- // Serial.h
- #ifndef __SERIAL_H__
- #define __SERIAL_H__
- DWORD WINAPI ReadPortThread(LPVOID lpvoid); //Read serial Port Thread
- class CGps;
- class CSerial
- {
- public:
- BOOL m_bNoRead;
- void SetGps( CGps * pGps );
- CSerial();
- ~CSerial();
- BOOL Open( int nPort, int nBaud); //open serial port
- BOOL Close( void ); //close serial port
- int SendData( const char *, int ); // serial port sends data
-
- // BOOL IsOpened( void )
- // { return( m_bOpened ); }
- HANDLE hReadThread;
- HANDLE m_hIDComDev;
- CGps * m_pGps;
-
- protected:
- BOOL WriteCommByte( unsigned char ); // serial port send data by byte
- BOOL m_bOpened;
- };
- #endif