/[H7]/branches/linux-serial/server/serialthread.h
ViewVC logotype

Annotation of /branches/linux-serial/server/serialthread.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 60 - (hide annotations) (download)
Mon Feb 5 20:34:51 2007 UTC (17 years, 4 months ago) by torben
File MIME type: text/plain
File size: 534 byte(s)
Beginning of a linux H7 server


1 torben 60 #pragma once
2    
3     #include <boost/thread/mutex.hpp>
4     #include <queue>
5    
6     #include "../H7Serial.h"
7    
8     struct WriteCommand
9     {
10     WriteCommand(int t, int d) {target=t; data=d;}
11     unsigned char target;
12     unsigned char data;
13     };
14    
15     class SerialThread
16     {
17     bool mContinue;
18     bool mStopped;
19     public:
20     bool led3,led4,led5;
21     bool switch2, switch3;
22     short temp,potmeter;
23    
24     std::queue<WriteCommand> commands;
25    
26     boost::mutex& mWriteMutex;
27     CH7Serial& mSerial;
28    
29    
30     SerialThread(CH7Serial& s, boost::mutex& m);
31    
32     void stop();
33     bool stopped();
34    
35     void operator()();
36     };

  ViewVC Help
Powered by ViewVC 1.1.20