--- branches/linux-serial/server/serialthread.h 2007/02/06 21:47:56 66 +++ branches/linux-serial/server/serialthread.h 2007/02/06 23:37:39 67 @@ -1,37 +1,14 @@ #pragma once -#include -#include +#include "thread.h" -#include "../H7Serial.h" - -struct WriteCommand -{ - WriteCommand(int t, int d) {target=t; data=d;} - unsigned char target; - unsigned char data; -}; - -class SerialThread +class SerialThread : public Thread { - bool mContinue; - bool mStopped; public: - bool led3,led4,led5; - bool switch2, switch3; - short temp,potmeter; - - std::queue commands; - - boost::mutex& mWriteMutex; - CH7Serial& mSerial; - SerialThread(CH7Serial& s, boost::mutex& m); + SerialThread(); - void stop(); - bool stopped(); - void operator()(); };