FACT++  1.0
MessageDim.h
Go to the documentation of this file.
1 #ifndef FACT_MessageDim
2 #define FACT_MessageDim
3 
4 #include "MessageImp.h"
6 //#include <dis.hxx> // DimService
7 
8 #include "../externals/Queue.h"
9 
11 {
12 private:
13  bool fDebug;
14 
16 
17  bool UpdateService(const std::tuple<Time,std::string,int> &data);
18 
19 public:
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 
35 {
36 private:
38  bool fConnected;
39 
40 protected:
42 
43 private:
45 
46 protected:
47  void infoHandler();
48 
49 public:
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
bool fConnected
Definition: MessageDim.h:38
Queue< std::tuple< Time, std::string, int > > fMsgQueue
Definition: MessageDim.h:15
The base implementation of a distributed messaging system.
Definition: MessageImp.h:10
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
bool UpdateService(const std::tuple< Time, std::string, int > &data)
Definition: MessageDim.cc:62
int Write(const Time &t, const std::string &txt, int qos=kInfo)
Definition: MessageDim.cc:83
Definition: Queue.h:28
MessageDimTX(const std::string &name, std::ostream &out=std::cout)
Definition: MessageDim.cc:36
An info telling something which can be interesting to know.
Definition: MessageImp.h:17
void SetMinLogLevel(int min=0)
Definition: MessageDim.h:52
bool empty() const
Definition: Queue.h:308
Based on MessageImp, redirects log-output to a Dim service MESSAGE.
Definition: MessageDim.h:10
uint16_t qos
Definition: HeadersGPS.h:29
int fMinLogLevel
Definition: MessageDim.h:37
float data[4 *1440]
DimStampedInfo fDimMessage
Definition: MessageDim.h:44
Based on MessageImp, subscribes to a MESSAGE service in the Dim network.
Definition: MessageDim.h:34
TT t
Definition: test_client.c:26
bool MessageQueueEmpty() const
Definition: MessageDim.h:27
MessageImp & fMsg
Definition: MessageDim.h:41
bool IsConnected() const
Definition: MessageDim.h:53
void SetDebug(bool b=true)
Definition: MessageDim.h:25