|
UniSet
2.2.1
|
#include <Configuration.h>
Открытые члены | |
| Configuration (int argc, const char *const *argv, const std::string &xmlfile="") | |
| Configuration (int argc, const char *const *argv, std::shared_ptr< ObjectIndex > oind, const std::string &xmlfile="") | |
| Configuration (int argc, const char *const *argv, const std::string &fileConf, UniSetTypes::ObjectInfo *objectsMap) | |
| std::string | getField (const std::string &path) |
| Получить значение полей с путём path. | |
| int | getIntField (const std::string &path) |
| Получить число из поле с путём path. | |
| int | getPIntField (const std::string &path, int def) |
| Получить число из поле с путём path (или def, если значение <= 0) | |
| xmlNode * | findNode (xmlNode *node, const std::string &searchnode, const std::string &name="") |
| xmlNode * | getNode (const std::string &path) |
| std::string | getProp (xmlNode *, const std::string &name) |
| int | getIntProp (xmlNode *, const std::string &name) |
| int | getPIntProp (xmlNode *, const std::string &name, int def) |
| std::string | getPropByNodeName (const std::string &nodename, const std::string &prop) |
| std::string | getRootDir () |
| int | getArgc () const |
| const char *const * | getArgv () const |
| ObjectId | getDBServer () const |
| ObjectId | getLocalNode () const |
| std::string | getLocalNodeName () const |
| const std::string | getNSName () const |
| std::string | getRootSection () const |
| std::string | getSensorsSection () const |
| std::string | getObjectsSection () const |
| std::string | getControllersSection () const |
| std::string | getServicesSection () const |
| xmlNode * | getXMLSensorsSection () |
| xmlNode * | getXMLObjectsSection () |
| xmlNode * | getXMLControllersSection () |
| xmlNode * | getXMLServicesSection () |
| xmlNode * | getXMLNodesSection () |
| xmlNode * | getXMLObjectNode (UniSetTypes::ObjectId) |
| UniversalIO::IOType | getIOType (UniSetTypes::ObjectId) |
| UniversalIO::IOType | getIOType (const std::string &name) |
| unsigned int | getCountOfNet () const |
| unsigned int | getRepeatTimeout () const |
| unsigned int | getRepeatCount () const |
| UniSetTypes::ObjectId | getSensorID (const std::string &name) |
| UniSetTypes::ObjectId | getControllerID (const std::string &name) |
| UniSetTypes::ObjectId | getObjectID (const std::string &name) |
| UniSetTypes::ObjectId | getServiceID (const std::string &name) |
| UniSetTypes::ObjectId | getNodeID (const std::string &name) |
| const std::string | getConfFileName () const |
| std::string | getImagesDir () const |
| int | getHeartBeatTime () |
| const std::string | getConfDir () const |
| const std::string | getDataDir () const |
| const std::string | getBinDir () const |
| const std::string | getLogDir () const |
| const std::string | getLockDir () const |
| const std::string | getDocDir () const |
| bool | isLocalIOR () const |
| bool | isTransientIOR () const |
| std::string | getArgParam (const std::string &name, const std::string &defval="") |
| std::string | getArg2Param (const std::string &name, const std::string &defval, const std::string &defval2="") |
| int | getArgInt (const std::string &name, const std::string &defval="") |
| int | getArgPInt (const std::string &name, int defval) |
| int | getArgPInt (const std::string &name, const std::string &strdefval, int defval) |
| xmlNode * | initLogStream (DebugStream &deb, const std::string &nodename) |
| xmlNode * | initLogStream (std::shared_ptr< DebugStream > deb, const std::string &nodename) |
| xmlNode * | initLogStream (DebugStream *deb, const std::string &nodename) |
| UniSetTypes::ListOfNode::const_iterator | listNodesBegin () |
| UniSetTypes::ListOfNode::const_iterator | listNodesEnd () |
| const std::shared_ptr< UniXML > | getConfXML () const |
| CORBA::ORB_ptr | getORB () const |
| const CORBA::PolicyList | getPolicy () const |
Открытые статические члены | |
| static std::ostream & | help (std::ostream &os) |
Открытые атрибуты | |
| std::shared_ptr< ObjectIndex > | oind |
| std::shared_ptr< IORFile > | iorfile |
Защищенные члены | |
| virtual void | initConfiguration (int argc, const char *const *argv) |
| void | createNodesList () |
| virtual void | initNode (UniSetTypes::NodeInfo &ninfo, UniXML::iterator &it) |
| void | initRepSections () |
| std::string | getRepSectionName (const std::string &sec, xmlNode *secnode=0) |
| void | setConfFileName (const std::string &fn="") |
| void | initParameters () |
| void | setLocalNode (const std::string &nodename) |
| std::string | getPort (const std::string &port="") |
Защищенные данные | |
| std::string | rootDir = { "" } |
| std::shared_ptr< UniXML > | unixml |
| int | _argc = { 0 } |
| const char *const * | _argv |
| CORBA::ORB_var | orb |
| CORBA::PolicyList | policyList |
| std::string | NSName = { "" } |
| unsigned int | countOfNet = { 1 } |
| unsigned int | repeatCount = { 3 } |
| unsigned int | repeatTimeout = { 50 } |
| UniSetTypes::ListOfNode | lnodes |
| std::string | secRoot = { "" } |
| std::string | secSensors = { "" } |
| std::string | secObjects = { "" } |
| std::string | secControlles = { "" } |
| std::string | secServices = { "" } |
| xmlNode * | xmlSensorsSec = { 0 } |
| xmlNode * | xmlObjectsSec = { 0 } |
| xmlNode * | xmlControllersSec = { 0 } |
| xmlNode * | xmlServicesSec = { 0 } |
| xmlNode * | xmlNodesSec = { 0 } |
| ObjectId | localDBServer = { UniSetTypes::DefaultObjectId } |
| ObjectId | localNode = { UniSetTypes::DefaultObjectId } |
| std::string | localNodeName = { "" } |
| std::string | fileConfName = { "" } |
| std::string | imagesDir = { "" } |
| std::string | confDir = { "" } |
| std::string | dataDir = { "" } |
| std::string | binDir = { "" } |
| std::string | logDir = { "" } |
| std::string | docDir = { "" } |
| std::string | lockDir = { "" } |
| bool | localIOR = { false } |
| bool | transientIOR = { false } |
| int | heartbeat_msec = { 3000 } |
Конфигуратор системы
| UniSetTypes::Configuration::Configuration | ( | int | argc, |
| const char *const * | argv, | ||
| const std::string & | xmlfile = "" |
||
| ) |
конфигурирование xml-файлом ( предпочтительный способ )
| UniSetTypes::Configuration::Configuration | ( | int | argc, |
| const char *const * | argv, | ||
| std::shared_ptr< ObjectIndex > | oind, | ||
| const std::string & | xmlfile = "" |
||
| ) |
конфигурирование xml-файлом
| UniSetTypes::Configuration::Configuration | ( | int | argc, |
| const char *const * | argv, | ||
| const std::string & | fileConf, | ||
| UniSetTypes::ObjectInfo * | objectsMap | ||
| ) |
устаревший вариант, для поддержки старых проектов
| std::string UniSetTypes::Configuration::getArg2Param | ( | const std::string & | name, |
| const std::string & | defval, | ||
| const std::string & | defval2 = "" |
||
| ) |
получить значение, если пустое, то defval, если defval="" return defval2
Перекрестные ссылки UniSetTypes::getArgParam().
| int UniSetTypes::Configuration::getArgInt | ( | const std::string & | name, |
| const std::string & | defval = "" |
||
| ) |
получить числовое значение параметра, если не число, то 0. Если параметра нет, используется значение defval
Перекрестные ссылки UniSetTypes::getArgParam() и UniSetTypes::uni_atoi().
| string UniSetTypes::Configuration::getArgParam | ( | const std::string & | name, |
| const std::string & | defval = "" |
||
| ) |
получить значение указанного параметра, или значение по умолчанию
Перекрестные ссылки UniSetTypes::getArgParam().
| int UniSetTypes::Configuration::getArgPInt | ( | const std::string & | name, |
| int | defval | ||
| ) |
получить числовое значение параметра, но если оно не положительное, вернуть defval
| const std::shared_ptr<UniXML> UniSetTypes::Configuration::getConfXML | ( | ) | const [inline] |
указатель на конфигурационный xml
| ObjectId UniSetTypes::Configuration::getDBServer | ( | ) | const [inline] |
< получение идентификатора DBServer-а
| string UniSetTypes::Configuration::getField | ( | const std::string & | path | ) |
Получить значение полей с путём path.
| int UniSetTypes::Configuration::getIntField | ( | const std::string & | path | ) |
Получить число из поле с путём path.
| ObjectId UniSetTypes::Configuration::getLocalNode | ( | ) | const [inline] |
< получение идентификатора локального узла
| std::string UniSetTypes::Configuration::getLocalNodeName | ( | ) | const [inline] |
< получение название локального узла
| int UniSetTypes::Configuration::getPIntField | ( | const std::string & | path, |
| int | def | ||
| ) |
Получить число из поле с путём path (или def, если значение <= 0)
| string UniSetTypes::Configuration::getRootDir | ( | ) |
Получение каталога, в котором находится выполняющаяся программа
unsigned int UniSetTypes::Configuration::countOfNet = { 1 } [protected] |
количество резервных каналов
| std::shared_ptr<IORFile> UniSetTypes::Configuration::iorfile |
интерфейс к работе с локальнымми ior-файлами
std::string UniSetTypes::Configuration::NSName = { "" } [protected] |
имя сервиса именования на ланной машине (обычно "NameService")
| std::shared_ptr<ObjectIndex> UniSetTypes::Configuration::oind |
интерфейс к карте объектов
unsigned int UniSetTypes::Configuration::repeatCount = { 3 } [protected] |
количество попыток получить доступ к удаленному объекту прежде чем будет выработано исключение TimeOut.
unsigned int UniSetTypes::Configuration::repeatTimeout = { 50 } [protected] |
пауза между попытками [мс]
1.7.6.1