FACT++  1.0
DimNetwork Class Reference

Implements automatic subscription to MESSAGE and STATE services. More...

#include <DimNetwork.h>

+ Inheritance diagram for DimNetwork:
+ Collaboration diagram for DimNetwork:

Public Member Functions

 DimNetwork (std::ostream &out=std::cout)
 ~DimNetwork ()
int GetCurrentState (const string &server) const
- Public Member Functions inherited from MessageImp
 MessageImp (std::ostream &out=std::cout)
virtual ~MessageImp ()
virtual void IndicateStateChange (const Time &, const std::string &)
void StateChanged (const Time &time, const std::string &server, const std::string &msg, int state)
virtual int Write (const Time &time, const std::string &txt, int qos=kMessage)
int Update (const std::string &txt, int severity=kMessage)
int Update (const char *txt, int severity=kMessage)
int Update (const std::ostringstream &str, int severity=kMessage)
int Debug (const std::string &str)
int Message (const std::string &str)
int Info (const std::string &str)
int Warn (const std::string &str)
int Error (const std::string &str)
int Alarm (const std::string &str)
int Fatal (const std::string &str)
int Comment (const std::string &str)
int Debug (const char *txt)
int Message (const char *txt)
int Info (const char *txt)
int Warn (const char *txt)
int Error (const char *txt)
int Alarm (const char *txt)
int Fatal (const char *txt)
int Comment (const char *txt)
int Debug (const std::ostringstream &str)
int Message (const std::ostringstream &str)
int Info (const std::ostringstream &str)
int Warn (const std::ostringstream &str)
int Alarm (const std::ostringstream &str)
int Error (const std::ostringstream &str)
int Fatal (const std::ostringstream &str)
int Comment (const std::ostringstream &str)
std::ostream & operator() () const
std::ostream & Out () const
virtual bool MessageQueueEmpty () const
- Public Member Functions inherited from DimErrorRedirecter
 DimErrorRedirecter (MessageImp &imp)
 ~DimErrorRedirecter ()
- Public Member Functions inherited from DimErrorHandler
virtual ~DimErrorHandler ()
- Public Member Functions inherited from DimExitHandler
virtual ~DimExitHandler ()
- Public Member Functions inherited from DimServiceInfoListImp
virtual void AddService (const std::string &, const std::string &, const std::string &, bool)
virtual void RemoveService (std::string, std::string, bool)
virtual void RemoveAllServices (const std::string &)
virtual void AddDescription (const std::string &, const std::string &, const std::vector< Description > &)
virtual void AddStates (const std::string &, const std::vector< State > &)
 DimServiceInfoListImp ()
 ~DimServiceInfoListImp ()
std::vector< std::string > GetServiceList (bool iscmd=false) const
std::vector< std::string > GetServiceList (const std::string &server, bool iscmd=false) const
std::vector< std::string > GetCommandList () const
std::vector< std::string > GetCommandList (const std::string &server) const
std::vector< DescriptionGetDescription (const std::string &server, const std::string &service) const
std::vector< StateGetStates (const std::string &server) const
State GetState (const std::string &server, int state) const
int IsCommand (const std::string &server, const std::string &service) const
int PrintDescription (std::ostream &out, bool iscmd, const std::string &serv="", const std::string &service="") const
int PrintStates (std::ostream &out, const std::string &serv="") const
bool SendDimCommand (std::ostream &lout, const std::string &server, const std::string &str) const
void SendDimCommand (const std::string &server, std::string str, std::ostream &lout) const
void SendDimCommand (const std::string &server, const std::string &str) const
- Public Member Functions inherited from DimServerListImp
 DimServerListImp ()
virtual ~DimServerListImp ()
const DimServerList::ServerListGetServerList () const
bool HasServer (const std::string &server) const

Protected Types

typedef std::map< const std::string, StateClient * > ClientList

Protected Member Functions

void AddServer (const std::string &s)
 A list with all MESSAGE services to which we subscribed. More...
void RemoveServer (std::string s)
void RemoveAllServers ()

Protected Attributes

ClientList fClientList

Private Member Functions

void DeleteClientList ()
 Delete all StateClient objects from teh list and clear the list. More...

Additional Inherited Members

- Public Types inherited from MessageImp
enum  Severity {
  kMessage = 10, kInfo = 20, kWarn = 30, kError = 40,
  kAlarm = 45, kFatal = 50, kComment = 90, kDebug = 99
 Severity of a message. More...
- Public Attributes inherited from DimServiceInfoListImp
DimServiceInfoList fInfo

Detailed Description

Implements automatic subscription to MESSAGE and STATE services.

This class derives from DimServiceInfoList, so that it has a full overview of all commands and services existing in the current Dim network. In addition it automatically subscribes to all available MESSAGE and STATE services and redirects them to its MessageImp base class.

  • maybe the StateClient can be abondoned, this way it would be possible to subscribe to only available MESSAGE and STATE services

Definition at line 61 of file DimNetwork.h.

The documentation for this class was generated from the following files: