source: trunk/FACT++/src/MessageDim.h@ 18428

Last change on this file since 18428 was 17230, checked in by tbretz, 11 years ago
Use Queue from externals instead of src.
File size: 1.1 KB
Line 
1#ifndef FACT_MessageDim
2#define FACT_MessageDim
3
4#include "MessageImp.h"
5#include "DimDescriptionService.h"
6//#include <dis.hxx> // DimService
7
8#include "../externals/Queue.h"
9
10class MessageDimTX : public DimDescribedService, public MessageImp
11{
12private:
13 bool fDebug;
14
15 Queue<std::tuple<Time,std::string,int>> fMsgQueue;
16
17 bool UpdateService(const std::tuple<Time,std::string,int> &data);
18
19public:
20 MessageDimTX(const std::string &name, std::ostream &out=std::cout);
21 ~MessageDimTX();
22
23 int Write(const Time &t, const std::string &txt, int qos=kInfo);
24
25 void SetDebug(bool b=true) { fDebug=b; }
26
27 bool MessageQueueEmpty() const { return fMsgQueue.empty(); }
28};
29
30
31
32#include <dic.hxx> // DimStampedInfo
33
34class MessageDimRX : public DimInfoHandler
35{
36private:
37 int fMinLogLevel;
38 bool fConnected;
39
40protected:
41 MessageImp &fMsg;
42
43private:
44 DimStampedInfo fDimMessage;
45
46protected:
47 void infoHandler();
48
49public:
50 MessageDimRX(const std::string &name, MessageImp &imp);
51
52 void SetMinLogLevel(int min=0) { fMinLogLevel=min; }
53 bool IsConnected() const { return fConnected; }
54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.