UniSet 2.32.1
Открытые члены | Открытые статические члены | Открытые атрибуты | Защищенные члены | Защищенные данные | Полный список членов класса
Класс uniset::Configuration

#include <Configuration.h>

Граф связей класса uniset::Configuration:
Collaboration graph
[см. легенду]

Открытые члены

 Configuration (int argc, const char *const *argv, const std::string &xmlfile="")
 
 Configuration (int argc, const char *const *argv, std::shared_ptr< UniXML > xml)
 
 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, uniset::ObjectInfo *objectsMap)
 
std::string getField (const std::string &path) const noexcept
 Получить значение полей с путём path.
 
int getIntField (const std::string &path) const noexcept
 Получить число из поле с путём path.
 
int getPIntField (const std::string &path, int def) const noexcept
 Получить число из поле с путём path (или def, если значение <= 0)
 
xmlNode * findNode (xmlNode *node, const std::string &searchnode, const std::string &name="") const noexcept
 
xmlNode * getNode (const std::string &path) const noexcept
 
std::string getProp (xmlNode *, const std::string &name) const noexcept
 
int getIntProp (xmlNode *, const std::string &name) const noexcept
 
int getPIntProp (xmlNode *, const std::string &name, int def) const noexcept
 
std::string getPropByNodeName (const std::string &nodename, const std::string &prop) const noexcept
 
std::string getRootDir () const noexcept
 
int getArgc () const noexcept
 
const char *const * getArgv () const noexcept
 
ObjectId getDBServer () const noexcept
 
ObjectId getLocalNode () const noexcept
 
std::string getLocalNodeName () const noexcept
 
const std::string getNSName () const noexcept
 
std::string getRootSection () const noexcept
 
std::string getSensorsSection () const noexcept
 
std::string getObjectsSection () const noexcept
 
std::string getControllersSection () const noexcept
 
std::string getServicesSection () const noexcept
 
xmlNode * getXMLSensorsSection () noexcept
 
xmlNode * getXMLObjectsSection () noexcept
 
xmlNode * getXMLControllersSection () noexcept
 
xmlNode * getXMLServicesSection () noexcept
 
xmlNode * getXMLNodesSection () noexcept
 
xmlNode * getXMLObjectNode (uniset::ObjectId) const noexcept
 
UniversalIO::IOType getIOType (uniset::ObjectId) const noexcept
 
UniversalIO::IOType getIOType (const std::string &name) const noexcept
 
size_t getCountOfNet () const noexcept
 
timeout_t getRepeatTimeout () const noexcept
 
size_t getRepeatCount () const noexcept
 
uniset::ObjectId getSensorID (const std::string &name) const noexcept
 
uniset::ObjectId getControllerID (const std::string &name) const noexcept
 
uniset::ObjectId getObjectID (const std::string &name) const noexcept
 
uniset::ObjectId getServiceID (const std::string &name) const noexcept
 
uniset::ObjectId getNodeID (const std::string &name) const noexcept
 
uniset::ObjectId getAnyID (const std::string &name) const noexcept
 
const std::string getConfFileName () const noexcept
 
std::string getImagesDir () const noexcept
 
std::string getNodeIp (uniset::ObjectId node)
 
timeout_t getHeartBeatTime () const noexcept
 
timeout_t getNCReadyTimeout () const noexcept
 
timeout_t getStartupIgnoreTimeout () const noexcept
 
const std::string getConfDir () const noexcept
 
const std::string getDataDir () const noexcept
 
const std::string getBinDir () const noexcept
 
const std::string getLogDir () const noexcept
 
const std::string getLockDir () const noexcept
 
const std::string getDocDir () const noexcept
 
bool isLocalIOR () const noexcept
 
bool isTransientIOR () const noexcept
 
size_t getHttpResovlerPort () const noexcept
 
std::string getArgParam (const std::string &name, const std::string &defval="") const noexcept
 
std::string getArg2Param (const std::string &name, const std::string &defval, const std::string &defval2="") const noexcept
 
int getArgInt (const std::string &name, const std::string &defval="") const noexcept
 
int getArgPInt (const std::string &name, int defval) const noexcept
 
int getArgPInt (const std::string &name, const std::string &strdefval, int defval) const noexcept
 
xmlNode * initLogStream (DebugStream &deb, const std::string &nodename) noexcept
 
xmlNode * initLogStream (std::shared_ptr< DebugStream > deb, const std::string &nodename) noexcept
 
xmlNode * initLogStream (DebugStream *deb, const std::string &nodename) noexcept
 
uniset::ListOfNode::const_iterator listNodesBegin () const noexcept
 
uniset::ListOfNode::const_iterator listNodesEnd () const noexcept
 
const std::shared_ptr< UniXMLgetConfXML () const noexcept
 
CORBA::ORB_ptr getORB () const
 
const CORBA::PolicyList getPolicy () const noexcept
 

Открытые статические члены

static std::string help ()
 
static bool checkOmniORBendPoint (const std::string &endPoint)
 

Открытые атрибуты

std::shared_ptr< ObjectIndexoind
 
std::shared_ptr< IORFileiorfile
 

Защищенные члены

virtual void initConfiguration (int argc, const char *const *argv)
 
void createNodesList ()
 
virtual void initNode (uniset::NodeInfo &ninfo, UniXML::iterator &it) noexcept
 
void initRepSections ()
 
std::pair< std::string, xmlNode * > getRepSectionName (const std::string &sec)
 
void setConfFileName (const std::string &fn="")
 
void initParameters ()
 
void setLocalNode (const std::string &nodename)
 
std::string getPort (const std::string &port="") const noexcept
 

Защищенные данные

std::string rootDir = { "" }
 
std::shared_ptr< UniXMLunixml
 
int _argc = { 0 }
 
const char ** _argv = { nullptr }
 
CORBA::ORB_var orb
 
CORBA::PolicyList policyList
 
std::string NSName = { "" }
 
size_t countOfNet = { 1 }
 
size_t repeatCount = { 3 }
 
timeout_t repeatTimeout = { 50 }
 
size_t httpResolverPort = { 8008 }
 
uniset::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 = { uniset::DefaultObjectId }
 
ObjectId localNode = { uniset::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 }
 
timeout_t heartbeat_msec = { 3000 }
 
timeout_t ncreadytimeout_msec = { 180000 }
 
timeout_t startupIgnoretimeout_msec = { 5000 }
 

Подробное описание

Конфигурация системы

Заметки
В случае обнаружения критической ошибки в настроечном файле файле. Вырабатывает исключение и прекращает работу.

Конструктор(ы)

◆ Configuration() [1/4]

uniset::Configuration::Configuration ( int argc,
const char *const * argv,
const std::string & xmlfile = "" )

конфигурирование xml-файлом ( предпочтительный способ )

◆ Configuration() [2/4]

uniset::Configuration::Configuration ( int argc,
const char *const * argv,
std::shared_ptr< UniXML > xml )

конфигурирование внешним xml

◆ Configuration() [3/4]

uniset::Configuration::Configuration ( int argc,
const char *const * argv,
std::shared_ptr< ObjectIndex > oind,
const std::string & xmlfile = "" )

конфигурирование xml-файлом

◆ Configuration() [4/4]

uniset::Configuration::Configuration ( int argc,
const char *const * argv,
const std::string & fileConf,
uniset::ObjectInfo * objectsMap )

устаревший вариант, для поддержки старых проектов

Методы

◆ getArg2Param()

std::string uniset::Configuration::getArg2Param ( const std::string & name,
const std::string & defval,
const std::string & defval2 = "" ) const
noexcept

получить значение, если пустое, то defval, если defval="" return defval2

◆ getArgInt()

int uniset::Configuration::getArgInt ( const std::string & name,
const std::string & defval = "" ) const
noexcept

получить числовое значение параметра, если не число, то 0. Если параметра нет, используется значение defval

◆ getArgParam()

string uniset::Configuration::getArgParam ( const std::string & name,
const std::string & defval = "" ) const
noexcept

получить значение указанного параметра, или значение по умолчанию

◆ getArgPInt()

int uniset::Configuration::getArgPInt ( const std::string & name,
int defval ) const
noexcept

получить числовое значение параметра, но если оно не положительное, вернуть defval

◆ getConfXML()

const std::shared_ptr< UniXML > uniset::Configuration::getConfXML ( ) const
noexcept

указатель на конфигурационный xml

◆ getDBServer()

ObjectId uniset::Configuration::getDBServer ( ) const
noexcept

< получение идентификатора DBServer-а

◆ getField()

string uniset::Configuration::getField ( const std::string & path) const
noexcept

Получить значение полей с путём path.

◆ getIntField()

int uniset::Configuration::getIntField ( const std::string & path) const
noexcept

Получить число из поле с путём path.

◆ getLocalNode()

ObjectId uniset::Configuration::getLocalNode ( ) const
noexcept

< получение идентификатора локального узла

◆ getLocalNodeName()

string uniset::Configuration::getLocalNodeName ( ) const
noexcept

< получение название локального узла

◆ getPIntField()

int uniset::Configuration::getPIntField ( const std::string & path,
int def ) const
noexcept

Получить число из поле с путём path (или def, если значение <= 0)

◆ getRootDir()

string uniset::Configuration::getRootDir ( ) const
noexcept

Получение каталога, в котором находится выполняющаяся программа

Данные класса

◆ countOfNet

size_t uniset::Configuration::countOfNet = { 1 }
protected

количество резервных каналов

◆ iorfile

std::shared_ptr<IORFile> uniset::Configuration::iorfile

интерфейс к работе с локальными ior-файлами

◆ NSName

std::string uniset::Configuration::NSName = { "" }
protected

имя сервиса именования на данной машине (обычно "NameService")

◆ oind

std::shared_ptr<ObjectIndex> uniset::Configuration::oind

интерфейс к карте объектов

◆ repeatCount

size_t uniset::Configuration::repeatCount = { 3 }
protected

количество попыток получить доступ к удаленному объекту прежде чем будет выработано исключение TimeOut.

◆ repeatTimeout

timeout_t uniset::Configuration::repeatTimeout = { 50 }
protected

пауза между попытками [мс]