|
DABC (Data Acquisition Backbone Core)
2.9.9
|
Full-functional class to reading configuration from xml files. More...
#include <dabc/Configuration.h>
Public Member Functions | |
| std::string | Affinity () |
| Return default affinity of any newly created thread. More... | |
| std::string | ConetextAppClass () |
| Configuration (const char *fname=0) | |
| double | GetHaltTime () |
| Returns time, required to halt DABC process. More... | |
| double | GetRunTime () |
| Returns configured time to run DABC process. More... | |
| double | GetThrdStopTime () |
| Returns time, required for normal thread stopping. More... | |
| std::string | GetUserPar (const char *name, const char *dflt=0) |
| int | GetUserParInt (const char *name, int dflt=0) |
| std::string | InitFuncName () |
| bool | LoadLibs () |
| std::string | MasterName () |
| Defines master DABC process, to which application will be connected Master means all control and monitoring functions will be delegated to master. More... | |
| std::string | MgrHost () const |
| const char * | MgrName () const |
| int | MgrNodeId () const |
| int | MgrNumNodes () const |
| int | MgrPort () const |
| bool | NextCreationNode (XMLNodePointer_t &prev, const char *nodename, bool check_name_for_multicast) |
| Method is used to find xml nodes like Module, MemoryPool, Connection in the xml file which should be used for autocreation. More... | |
| bool | NormalMainThread () |
| std::string | RunFuncName () |
| bool | SelectContext (unsigned nodeid, unsigned numnodes) |
| int | ShowCpuInfo () |
| std::string | ThreadsLayout () |
| int | UseControl () |
| Defines if control used in dabc node. More... | |
| bool | UseSlowTime () |
| int | WithPublisher () |
| Returns true when publisher should be created. More... | |
| virtual | ~Configuration () |
Public Member Functions inherited from dabc::ConfigBase | |
| void | AddCmdVariable (const char *name, const char *value) |
| Add variable from command line. More... | |
| ConfigBase (const char *fname=0) | |
| std::string | ContextName (unsigned id) |
| returns name of specified context More... | |
| int | GetVersion () const |
| bool | IsOk () const |
| bool | NodeActive (unsigned id) |
| returns configured (initial) state of the node More... | |
| std::string | NodeName (unsigned id) |
| returns nodename of specified context More... | |
| int | NodePort (unsigned id) |
| returns communication port of specified context More... | |
| unsigned | NumNodes () |
| returns number of nodes in xml file More... | |
| std::string | ResolveEnv (const std::string &arg, int id=-1) |
| Replaces entries like ${name} be variable value. More... | |
| std::string | SshArgs (unsigned id=0, const char *skind="run", const char *topcfgfile=0, const char *topworkdir=0) |
| method used by run.sh script to produce command line More... | |
| ~ConfigBase () | |
Static Public Member Functions | |
| static std::string | GetLocalHost () |
Protected Attributes | |
| std::string | fMgrHost |
| std::string | fMgrName |
| int | fMgrNodeId |
| int | fMgrNumNodes |
| int | fMgrPort |
| XMLNodePointer_t | fSelected |
Protected Attributes inherited from dabc::ConfigBase | |
| std::string | envContext |
| std::string | envDABCNODEID |
| std::string | envDABCNUMNODES |
| std::string | envDABCSYS |
| std::string | envDABCUSERDIR |
| std::string | envDABCWORKDIR |
| std::string | envHost |
| XMLNodePointer_t | fCmdVariables |
| XMLDocPointer_t | fDoc |
| XMLNodePointer_t | fVariables |
| int | fVersion |
Static Protected Attributes | |
| static std::string | fLocalHost = "" |
Friends | |
| class | ConfigIO |
Additional Inherited Members | |
Protected Types inherited from dabc::ConfigBase | |
| enum | ESshArgsKinds { kindTest , kindCopy , kindStart , kindRun , kindStop , kindKill , kindGetlog , kindDellog } |
Protected Member Functions inherited from dabc::ConfigBase | |
| std::string | Find1 (XMLNodePointer_t node, const std::string &dflt, const char *sub1, const char *sub2=0, const char *sub3=0) |
| Search first entry for item sub1/sub2/sub3 in specified node First tries full path, than found sub1 and path sub2/sub3. More... | |
| XMLNodePointer_t | FindChild (XMLNodePointer_t node, const char *name) |
| XMLNodePointer_t | FindContext (unsigned id) |
| XMLNodePointer_t | FindItemMatch (XMLNodePointer_t &lastmatch, XMLNodePointer_t node, const char *sub1=0, const char *sub2=0, const char *sub3=0) |
| XMLNodePointer_t | FindMatch (XMLNodePointer_t lastmatch, XMLNodePointer_t node, const char *sub1=0, const char *sub2=0, const char *sub3=0) |
| std::string | FindN (XMLNodePointer_t node, XMLNodePointer_t &prev, const char *sub1, const char *sub2=0, const char *sub3=0) |
| const char * | GetAttr (XMLNodePointer_t node, const char *attr, const char *defvalue=0) |
| std::string | GetAttrValue (XMLNodePointer_t node, const char *name) |
| std::string | GetEnv (const char *name) |
| int | GetIntAttr (XMLNodePointer_t node, const char *attr, int defvalue=0) |
| std::string | GetNodeValue (XMLNodePointer_t node) |
| bool | NodeMaskMatch (XMLNodePointer_t node, XMLNodePointer_t mask) |
| XMLNodePointer_t | RootNode () |
| XMLNodePointer_t | Variables () |
Static Protected Member Functions inherited from dabc::ConfigBase | |
| static bool | IsContextNode (XMLNodePointer_t node) |
| Identifies, if node can be identified as valid context - no any wildcards in names. More... | |
| static bool | IsNodeName (XMLNodePointer_t node, const char *name) |
| static bool | IsWildcard (const char *str) |
Full-functional class to reading configuration from xml files.
Definition at line 34 of file Configuration.h.
| dabc::Configuration::Configuration | ( | const char * | fname = 0 | ) |
Definition at line 27 of file Configuration.cxx.
|
virtual |
Definition at line 38 of file Configuration.cxx.
| bool dabc::Configuration::SelectContext | ( | unsigned | nodeid, |
| unsigned | numnodes | ||
| ) |
Definition at line 42 of file Configuration.cxx.
|
inline |
Definition at line 54 of file Configuration.h.
|
inline |
Definition at line 55 of file Configuration.h.
|
inline |
Definition at line 56 of file Configuration.h.
|
inline |
Definition at line 57 of file Configuration.h.
|
inline |
Definition at line 58 of file Configuration.h.
| std::string dabc::Configuration::InitFuncName | ( | ) |
Definition at line 121 of file Configuration.cxx.
| std::string dabc::Configuration::RunFuncName | ( | ) |
Definition at line 128 of file Configuration.cxx.
| int dabc::Configuration::ShowCpuInfo | ( | ) |
Definition at line 135 of file Configuration.cxx.
| bool dabc::Configuration::UseSlowTime | ( | ) |
Definition at line 144 of file Configuration.cxx.
| int dabc::Configuration::UseControl | ( | ) |
Defines if control used in dabc node.
Definition at line 153 of file Configuration.cxx.
| std::string dabc::Configuration::MasterName | ( | ) |
Defines master DABC process, to which application will be connected Master means all control and monitoring functions will be delegated to master.
Typically master provide http-server, which allows to control also all clients
Definition at line 172 of file Configuration.cxx.
| double dabc::Configuration::GetRunTime | ( | ) |
Returns configured time to run DABC process.
Definition at line 179 of file Configuration.cxx.
| double dabc::Configuration::GetHaltTime | ( | ) |
Returns time, required to halt DABC process.
Definition at line 188 of file Configuration.cxx.
| double dabc::Configuration::GetThrdStopTime | ( | ) |
Returns time, required for normal thread stopping.
Definition at line 197 of file Configuration.cxx.
| bool dabc::Configuration::NormalMainThread | ( | ) |
Definition at line 206 of file Configuration.cxx.
| std::string dabc::Configuration::ThreadsLayout | ( | ) |
Definition at line 219 of file Configuration.cxx.
| std::string dabc::Configuration::Affinity | ( | ) |
Return default affinity of any newly created thread.
Definition at line 212 of file Configuration.cxx.
| int dabc::Configuration::WithPublisher | ( | ) |
Returns true when publisher should be created.
Definition at line 162 of file Configuration.cxx.
| bool dabc::Configuration::NextCreationNode | ( | XMLNodePointer_t & | prev, |
| const char * | nodename, | ||
| bool | check_name_for_multicast | ||
| ) |
Method is used to find xml nodes like Module, MemoryPool, Connection in the xml file which should be used for autocreation.
Definition at line 278 of file Configuration.cxx.
| std::string dabc::Configuration::GetUserPar | ( | const char * | name, |
| const char * | dflt = 0 |
||
| ) |
Definition at line 227 of file Configuration.cxx.
| int dabc::Configuration::GetUserParInt | ( | const char * | name, |
| int | dflt = 0 |
||
| ) |
Definition at line 233 of file Configuration.cxx.
| std::string dabc::Configuration::ConetextAppClass | ( | ) |
Definition at line 241 of file Configuration.cxx.
| bool dabc::Configuration::LoadLibs | ( | ) |
Definition at line 261 of file Configuration.cxx.
|
inlinestatic |
Definition at line 108 of file Configuration.h.
|
friend |
Definition at line 35 of file Configuration.h.
|
protected |
Definition at line 38 of file Configuration.h.
|
protected |
Definition at line 40 of file Configuration.h.
|
protected |
Definition at line 41 of file Configuration.h.
|
protected |
Definition at line 42 of file Configuration.h.
|
protected |
Definition at line 43 of file Configuration.h.
|
protected |
Definition at line 44 of file Configuration.h.
|
staticprotected |
Definition at line 46 of file Configuration.h.