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

Last change on this file since 10492 was 10476, checked in by tbretz, 14 years ago
Changed the services to described services.
File size: 1.6 KB
Line 
1#ifndef FACT_MessageDim
2#define FACT_MessageDim
3
4#include "MessageImp.h"
5
6
7
8#include "DimDescriptionService.h"
9//#include <dis.hxx> // DimService
10
11class MessageDimTX : public DimDescribedService, public MessageImp
12{
13private:
14 bool fDebug;
15
16public:
17 MessageDimTX(const std::string &name, std::ostream &out=std::cout);
18 ~MessageDimTX();
19
20 int Write(const Time &t, const std::string &txt, int qos=kInfo);
21
22 void SetDebug(bool b=true) { fDebug=b; }
23};
24
25
26
27#include <dic.hxx> // DimStampedInfo
28
29class DimNetworkInfo : public DimStampedInfo
30{
31public:
32 DimNetworkInfo(const char *name, const char *nolink, int size, DimInfoHandler *ptr)
33 : DimStampedInfo(name, const_cast<char*>(nolink), size, ptr)
34 {
35 secs = 0;
36 millisecs = 0;
37 }
38};
39
40class MessageDimRX : public DimInfoHandler
41{
42private:
43 int fMinLogLevel;
44 bool fConnected;
45
46protected:
47 MessageImp &fMsg;
48
49private:
50 DimNetworkInfo fDimMessage;
51
52protected:
53 void infoHandler();
54
55public:
56 MessageDimRX(const std::string &name, MessageImp &imp);
57
58 void SetMinLogLevel(int min=0) { fMinLogLevel=min; }
59 bool IsConnected() const { return fConnected; }
60};
61
62#endif
63
64// **************************************************************************
65/** @class DimNetworkInfo
66
67@brief Direct derivative of DimStampedInfo
68
69Since secs and millisecs are not initialized in the base class
70valgrind throws a couple of warnings debugging applications.
71
72This derivative just initialized them with 0. It will be removed as
73soon as the initialization was done in Dim itself.
74
75**/
76// **************************************************************************
Note: See TracBrowser for help on using the repository browser.