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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 66 by torben, Mon Feb 5 20:34:51 2007 UTC revision 67 by torben, Tue Feb 6 23:37:39 2007 UTC
# Line 1  Line 1 
1  #pragma once  #pragma once
2    
3  #include <boost/thread/mutex.hpp>  #include "thread.h"
 #include <queue>  
4    
5  #include "../H7Serial.h"  class SerialThread : public Thread
   
 struct WriteCommand  
 {  
         WriteCommand(int t, int d) {target=t; data=d;}  
         unsigned char target;  
         unsigned char data;  
 };  
   
 class SerialThread  
6  {  {
         bool mContinue;  
         bool mStopped;  
7  public:  public:
         bool led3,led4,led5;  
         bool switch2, switch3;  
         short temp,potmeter;  
   
         std::queue<WriteCommand> commands;  
   
         boost::mutex& mWriteMutex;  
         CH7Serial& mSerial;  
8    
9                    
10          SerialThread(CH7Serial& s, boost::mutex& m);          SerialThread();
11                    
         void stop();  
         bool stopped();  
   
12          void operator()();          void operator()();
13  };  };
14    

Legend:
Removed from v.66  
changed lines
  Added in v.67

  ViewVC Help
Powered by ViewVC 1.1.20