UniSet
1.4.0
|
#include <Configuration.h>
Открытые члены | |
Configuration (int argc, const char *const *argv, const std::string xmlfile="") | |
Configuration (int argc, const char *const *argv, 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 char *const * | getArgv () const |
ObjectId | getTimerService () const |
ObjectId | getDBServer () const |
ObjectId | getInfoServer () 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::IOTypes | getIOType (UniSetTypes::ObjectId) |
UniversalIO::IOTypes | 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 alias="") |
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 () |
bool | isTransientIOR () |
std::string | getArgParam (const std::string name, const std::string defval="") |
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 * | initDebug (DebugStream &deb, const std::string &nodename) |
UniSetTypes::ListOfNode::const_iterator | listNodesBegin () |
UniSetTypes::ListOfNode::const_iterator | listNodesEnd () |
UniXML * | getConfXML () |
CORBA::ORB_ptr | getORB () |
CORBA::PolicyList | getPolicy () const |
Открытые статические члены | |
static std::ostream & | help (std::ostream &os) |
Открытые атрибуты | |
MessageInterface * | mi |
ObjectIndex * | oind |
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 (std::string nodename) |
std::string | getPort (const std::string port="") |
Защищенные данные | |
std::string | rootDir |
UniXML | unixml |
int | _argc |
const char *const * | _argv |
CORBA::ORB_var | orb |
CORBA::PolicyList | policyList |
std::string | NSName |
unsigned int | countOfNet |
unsigned int | repeatCount |
unsigned int | repeatTimeout |
UniSetTypes::ListOfNode | lnodes |
std::string | secRoot |
std::string | secSensors |
std::string | secObjects |
std::string | secControlles |
std::string | secServices |
ObjectId | localTimerService |
ObjectId | localDBServer |
ObjectId | localInfoServer |
ObjectId | localNode |
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 |
bool | transientIOR |
int | heartbeat_msec |
Статические защищенные данные | |
static xmlNode * | xmlSensorsSec = 0 |
static xmlNode * | xmlObjectsSec = 0 |
static xmlNode * | xmlControllersSec = 0 |
static xmlNode * | xmlServicesSec = 0 |
static xmlNode * | xmlNodesSec = 0 |
Друзья | |
class | ::SystemGuard |
Конфигуратор системы
UniSetTypes::Configuration::Configuration | ( | int | argc, |
const char *const * | argv, | ||
const std::string | xmlfile = "" |
||
) |
конфигурирование xml-файлом ( предпочтительный способ )
UniSetTypes::Configuration::Configuration | ( | int | argc, |
const char *const * | argv, | ||
ObjectIndex * | oind, | ||
const std::string | xmlfile = "" |
||
) |
конфигурирование xml-файлом
UniSetTypes::Configuration::Configuration | ( | int | argc, |
const char *const * | argv, | ||
const std::string | fileConf, | ||
UniSetTypes::ObjectInfo * | objectsMap | ||
) |
устаревший вариант, для поддержки старых проектов
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().
Используется в IOControl::init_iocontrol(), MBTCPMaster::init_mbmaster(), RTUExchange::init_rtuexchange(), SMDBServer::init_smdbserver(), SharedMemory::init_smemory() и UNetExchange::init_unetexchange().
int UniSetTypes::Configuration::getArgPInt | ( | const std::string | name, |
int | defval | ||
) |
получить числовое значение параметра, но если оно не положительное, вернуть defval
Используется в IOControl::init_iocontrol().
UniXML* UniSetTypes::Configuration::getConfXML | ( | ) | [inline] |
указатель на конфигурационный xml
ObjectId UniSetTypes::Configuration::getDBServer | ( | ) | const [inline] |
получение идентификатора DBServer-а
Используется в IOController::dumpToDB(), IOController::logging() и InfoServer::preprocessing().
string UniSetTypes::Configuration::getField | ( | const std::string | path | ) |
Получить значение полей с путём path.
ObjectId UniSetTypes::Configuration::getInfoServer | ( | ) | const [inline] |
получение идентификатора InfoServer-а
int UniSetTypes::Configuration::getIntField | ( | const std::string | path | ) |
Получить число из поле с путём path.
ObjectId UniSetTypes::Configuration::getLocalNode | ( | ) | const [inline] |
получение идентификатора локального узла
Используется в UniversalInterface::askSensor(), UniversalInterface::askSensorsSeq(), Restorer_XML::getConsumerInfo(), UniversalInterface::getSensorSeq(), SMInterface::localSetUndefinedState(), Restorer_XML::old_getConsumerInfo() и InfoServer::preprocessing().
std::string UniSetTypes::Configuration::getLocalNodeName | ( | ) | const [inline] |
получение название локального узла
int UniSetTypes::Configuration::getPIntField | ( | const std::string | path, |
int | def | ||
) |
Получить число из поле с путём path (или def, если значение <= 0)
string UniSetTypes::Configuration::getRootDir | ( | ) |
Получение каталога, в котором находится выполняющаяся программа
ObjectId UniSetTypes::Configuration::getTimerService | ( | ) | const [inline] |
получение идентификатора TimerServic-а
void UniSetTypes::Configuration::initConfiguration | ( | int | argc, |
const char *const * | argv | ||
) | [protected, virtual] |
Перекрестные ссылки UniSetTypes::conf, DebugStream::debugging(), UniSetTypes::getArgParam() и UniSetTypes::unideb.
unsigned int UniSetTypes::Configuration::countOfNet [protected] |
количество резервных каналов
интерфейс к работе с локальнымми ior-файлами
интерфейс к карте сообщений
Используется в InfoServer::ackMessage().
std::string UniSetTypes::Configuration::NSName [protected] |
имя сервиса именования на ланной машине (обычно "NameService")
интерфейс к карте объектов
Используется в InfoServer::ackMessage(), ProxyManager::activateObject(), IONotifyController::askSensor(), IONotifyController::askState(), IONotifyController::askValue(), IOController::asRegistration(), IOController::dsRegistration(), Restorer_XML::getConsumerInfo(), ORepHelpers::getShortName(), SharedMemory::init_smemory(), IOController::localSetUndefinedState(), Restorer_XML::old_getConsumerInfo(), InfoServer::preprocessing(), InfoServer::send() и IONotifyController::send().
unsigned int UniSetTypes::Configuration::repeatCount [protected] |
количество попыток получить доступ к удаленному объекту прежде чем будет выработано исключение TimeOut.
unsigned int UniSetTypes::Configuration::repeatTimeout [protected] |
пауза между попытками [мс]