UniSet
2.6.0
|
Реализация сохранения списка заказчиков в xml. Данный класс работает с глобальным xml-файлом проекта (обычно configure.xml), поэтому НЕ реализаует функции записи (dump)-а. Подробнее...
Открытые типы | |
typedef sigc::slot< bool, const std::shared_ptr< UniXML > &, UniXML::iterator &, xmlNode *, std::shared_ptr < IOController::USensorInfo > & > | NCReaderSlot |
![]() | |
typedef sigc::slot< bool, const std::shared_ptr< UniXML > &, UniXML::iterator &, xmlNode * > | ReaderSlot |
Открытые члены | |
NCRestorer_XML (const std::string &fname) | |
NCRestorer_XML (const std::string &fname, const std::string &sensor_filterField, const std::string &sensor_filterValue="") | |
void | setThresholdsFilter (const std::string &filterField, const std::string &filterValue="") |
bool | setFileName (const std::string &file, bool create) |
std::string | getFileName () const noexcept |
void | setReadThresholdItem (ReaderSlot sl) |
void | setNCReadItem (NCReaderSlot sl) |
virtual void | read (IONotifyController *ic, const std::string &filename="") |
virtual void | read (IONotifyController *ic, const std::shared_ptr< UniXML > &xml) |
virtual void | dump (const IONotifyController *ic, std::shared_ptr< NCRestorer::SInfo > &inf, const IONotifyController::ConsumerListInfo &lst) override |
virtual void | dumpThreshold (const IONotifyController *ic, std::shared_ptr< NCRestorer::SInfo > &inf, const IONotifyController::ThresholdExtList &lst) override |
![]() | |
void | setReadItem (ReaderSlot sl) |
void | setReadConsumerItem (ReaderSlot sl) |
void | setItemFilter (const std::string &filterField, const std::string &filterValue="") |
void | setConsumerFilter (const std::string &filterField, const std::string &filterValue="") |
bool | getConsumerInfo (UniXML::iterator &it, uniset::ObjectId &cid, uniset::ObjectId &cnode) |
![]() | |
virtual void | dump (const IONotifyController *ic, std::shared_ptr< SInfo > &inf, const IONotifyController::ConsumerListInfo &lst)=0 |
virtual void | dumpThreshold (const IONotifyController *ic, std::shared_ptr< SInfo > &inf, const IONotifyController::ThresholdExtList &lst)=0 |
Защищенные члены | |
bool | check_thresholds_item (UniXML::iterator &it) const |
void | read_consumers (const std::shared_ptr< UniXML > &xml, xmlNode *node, std::shared_ptr< NCRestorer_XML::SInfo > &inf, IONotifyController *ic) |
void | read_list (const std::shared_ptr< UniXML > &xml, xmlNode *node, IONotifyController *ic) |
void | read_thresholds (const std::shared_ptr< UniXML > &xml, xmlNode *node, IONotifyController *ic) |
void | init (const std::string &fname) |
bool | getBaseInfo (const std::shared_ptr< UniXML > &xml, xmlNode *it, IOController_i::SensorInfo &si) |
bool | getSensorInfo (const std::shared_ptr< UniXML > &xml, xmlNode *snode, std::shared_ptr< NCRestorer_XML::SInfo > &si) |
bool | getConsumerList (const std::shared_ptr< UniXML > &xml, xmlNode *node, IONotifyController::ConsumerListInfo &lst) |
bool | getThresholdInfo (const std::shared_ptr< UniXML > &xml, xmlNode *tnode, IONotifyController::ThresholdInfoExt &ti) |
![]() | |
virtual bool | check_list_item (UniXML::iterator &it) |
virtual bool | check_consumer_item (UniXML::iterator &it) |
Защищенные статические члены | |
static void | set_dumptime (const std::shared_ptr< UniXML > &xml, xmlNode *node) |
static xmlNode * | bind_node (const std::shared_ptr< UniXML > &xml, xmlNode *root, const std::string &nodename, const std::string &nm="") |
static xmlNode * | rebind_node (const std::shared_ptr< UniXML > &xml, xmlNode *root, const std::string &nodename, const std::string &nm="") |
![]() | |
static void | addlist (IONotifyController *ic, std::shared_ptr< IOController::USensorInfo > &inf, IONotifyController::ConsumerListInfo &&lst, bool force=false) |
static void | addthresholdlist (IONotifyController *ic, std::shared_ptr< IOController::USensorInfo > &inf, IONotifyController::ThresholdExtList &&lst, bool force=false) |
static void | ioRegistration (IONotifyController *ic, std::shared_ptr< IOController::USensorInfo > &inf, bool force=false) |
static IOController::IOStateList::iterator | ioFind (IONotifyController *ic, uniset::ObjectId k) noexcept |
static IOController::IOStateList::iterator | ioEnd (IONotifyController *ic) noexcept |
static IOController::IOStateList::iterator | ioBegin (IONotifyController *ic) noexcept |
static void | init_depends_signals (IONotifyController *ic) |
Защищенные данные | |
std::string | s_filterField = { "" } |
std::string | s_filterValue = { "" } |
std::string | t_filterField = { "" } |
std::string | t_filterValue = { "" } |
std::string | fname = { "" } |
std::shared_ptr< UniXML > | uxml |
ReaderSlot | rtslot |
NCReaderSlot | ncrslot |
![]() | |
ReaderSlot | rslot |
ReaderSlot | cslot |
std::string | i_filterField = { "" } |
std::string | i_filterValue = { "" } |
std::string | c_filterField = { "" } |
std::string | c_filterValue = { "" } |
Additional Inherited Members | |
![]() | |
static xmlNode * | find_node (const std::shared_ptr< UniXML > &xml, xmlNode *root, const std::string &nodename, const std::string &nm="") |
Реализация сохранения списка заказчиков в xml. Данный класс работает с глобальным xml-файлом проекта (обычно configure.xml), поэтому НЕ реализаует функции записи (dump)-а.
NCRestorer_XML::NCRestorer_XML | ( | const std::string & | fname | ) |
fname | - файл. (формата uniset-project) |
NCRestorer_XML::NCRestorer_XML | ( | const std::string & | fname, |
const std::string & | sensor_filterField, | ||
const std::string & | sensor_filterValue = "" |
||
) |
fname | - файл. (формата uniset-project) |
sensor_filterField | - читать из списка только те узлы, у которых filterField="filterValue" |
sensor_filterValue | - значение для фильтрования списка |
|
protected |
void NCRestorer_XML::setReadThresholdItem | ( | ReaderSlot | sl | ) |
установить функцию для callback-вызова при чтении списка пороговых датчиков.
bool xxxMyClass::myfunc(UniXML& xml, UniXML::iterator& it, xmlNode* sec) uxml - интерфейс для работы с xml-файлом it - интератор(указатель) на текущий считываемый xml-узел (<sensor>) sec - указатель на корневой узел секции (<threshold>)
void NCRestorer_XML::setThresholdsFilter | ( | const std::string & | filterField, |
const std::string & | filterValue = "" |
||
) |
Установить фильтр на чтение списка 'порогов'