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