TactileVestProject  V1.0
Tactile API documentation
 All Classes Functions
CSerial.h
1 
2 // Serial.h
3 
4 #ifndef __SERIAL_H__
5 #define __SERIAL_H__
6 
7 #define FC_DTRDSR 0x01
8 #define FC_RTSCTS 0x02
9 #define FC_XONXOFF 0x04
10 #define ASCII_BEL 0x07
11 #define ASCII_BS 0x08
12 #define ASCII_LF 0x0A
13 #define ASCII_CR 0x0D
14 #define ASCII_XON 0x11
15 #define ASCII_XOFF 0x13
16 
17 class CSerial
18 {
19 
20 public:
21  CSerial();
22  ~CSerial();
23 
24  bool Open(char*);
25  bool Close( void );
26 
27  int ReadData( void *, int );
28  int SendData(char *);
29 
30  bool IsOpened( void ){ return( isOpened ); }
31 
32 protected:
33  HANDLE deviceHandle;
34  bool isOpened;
35  char* comPort;
36  OVERLAPPED m_OverlappedRead, m_OverlappedWrite;
37 
38 };
39 
40 #endif
Definition: CSerial.h:17