/[H9]/trunk/FlisServer/Serial.h
ViewVC logotype

Contents of /trunk/FlisServer/Serial.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 174 - (show annotations) (download)
Thu Dec 6 12:53:06 2007 UTC (16 years, 5 months ago) by kevin
File MIME type: text/plain
File size: 703 byte(s)
updated the serversoftware with some fancy stuff torben found
1 #pragma once
2
3 #include <vector>
4
5 typedef std::vector<unsigned char> UCVector;
6
7 class CSerial
8 {
9 HANDLE mComport;
10 DCB mDcbRestore;
11 CString mPortstr;
12 int mBitrate;
13 bool mIsopen;
14
15 protected:
16 void printByte(char* description, unsigned char byte);
17 void open();
18
19 public:
20 CSerial();
21 CSerial(char* port, int bitrate);
22 ~CSerial(void);
23
24 void close();
25 void open(CString port, int bitrate);
26
27 unsigned char readByte();
28 void writeByte(unsigned char out);
29
30
31 COMSTAT getComstat() const;
32 int bytesReady() const;
33 int outQueueSize() const;
34 CString getPort() const {return mPortstr;}
35 int getBitrate() const {return mBitrate;}
36
37 bool isOpen() { return mIsopen; }
38
39 };

  ViewVC Help
Powered by ViewVC 1.1.20