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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 74 - (hide annotations) (download)
Mon Aug 6 12:34:02 2007 UTC (16 years, 10 months ago) by torben
File MIME type: text/plain
File size: 740 byte(s)
Fixed incorrect signature of assignment operator

1 torben 67 #pragma once
2    
3     #include <boost/thread/mutex.hpp>
4     #include <queue>
5     #include <cppsocket/tcpserver.h>
6    
7     #include "../H7Serial.h"
8     #include "serialthread.h"
9    
10     struct WriteCommand
11     {
12     WriteCommand(int t, int d) {target=t; data=d;}
13     unsigned char target;
14     unsigned char data;
15     };
16    
17     //Singleton
18     class GlobalStorage
19     {
20     public:
21     static GlobalStorage* instance();
22    
23     CH7Serial serialPort;
24     boost::mutex writeMutex;
25     std::queue<WriteCommand> commands;
26     CPPSocket::TCPServer server;
27     SerialThread serialThread;
28    
29     bool led3,led4,led5,switch2,switch3;
30     int temp,potmeter;
31    
32     protected:
33     GlobalStorage() {} //default constructor
34     GlobalStorage(const GlobalStorage&) {} //copy constructor
35 torben 74 GlobalStorage& operator=(const GlobalStorage&) {} //assignment operator
36 torben 67 };

  ViewVC Help
Powered by ViewVC 1.1.20