#ifndef FACT_MessageDim #define FACT_MessageDim #include "MessageImp.h" #include "DimDescriptionService.h" //#include // DimService class MessageDimTX : public DimDescribedService, public MessageImp { private: bool fDebug; public: MessageDimTX(const std::string &name, std::ostream &out=std::cout); ~MessageDimTX(); int Write(const Time &t, const std::string &txt, int qos=kInfo); void SetDebug(bool b=true) { fDebug=b; } }; #include // DimStampedInfo class DimNetworkInfo : public DimStampedInfo { public: DimNetworkInfo(const char *name, const char *nolink, int size, DimInfoHandler *ptr) : DimStampedInfo(name, const_cast(nolink), size, ptr) { secs = 0; millisecs = 0; } }; class MessageDimRX : public DimInfoHandler { private: int fMinLogLevel; bool fConnected; protected: MessageImp &fMsg; private: DimNetworkInfo fDimMessage; protected: void infoHandler(); public: MessageDimRX(const std::string &name, MessageImp &imp); void SetMinLogLevel(int min=0) { fMinLogLevel=min; } bool IsConnected() const { return fConnected; } }; #endif // ************************************************************************** /** @class DimNetworkInfo @brief Direct derivative of DimStampedInfo Since secs and millisecs are not initialized in the base class valgrind throws a couple of warnings debugging applications. This derivative just initialized them with 0. It will be removed as soon as the initialization was done in Dim itself. **/ // **************************************************************************