22 #ifndef IOConfig_XML_H_
23 #define IOConfig_XML_H_
26 #include <sigc++/sigc++.h>
29 #include "UniSetTypes.h"
43 virtual IOController::IOStateList
read()
override;
49 IOConfig_XML(
const std::string& fname,
const std::shared_ptr<Configuration>& conf );
56 IOConfig_XML(
const std::shared_ptr<UniXML>& _xml,
const std::shared_ptr<Configuration>& conf, xmlNode* root =
nullptr );
97 void setItemFilter(
const std::string& filterField,
const std::string& filterValue =
"" );
102 void setConsumerFilter(
const std::string& filterField,
const std::string& filterValue =
"" );
113 void setThresholdsFilter(
const std::string& filterField,
const std::string& filterValue =
"" );
127 typedef sigc::slot<bool, const std::shared_ptr<UniXML>&,
UniXML::iterator&, xmlNode*, std::shared_ptr<IOController::USensorInfo>&> NCReaderSlot;
138 void read_consumers(
const std::shared_ptr<UniXML>& xml, xmlNode* node, std::shared_ptr<IOController::USensorInfo>& inf );
139 IOController::IOStateList read_list( xmlNode* node );
140 void init_thresholds( xmlNode* node, IOController::IOStateList& iolist );
141 void init_depends_signals( IOController::IOStateList& lst );
144 bool getSensorInfo( xmlNode* snode, std::shared_ptr<IOController::USensorInfo>& si )
const;
145 bool getThresholdInfo(xmlNode* tnode, std::shared_ptr<IOController::UThresholdInfo>& ti)
const;
148 static void set_dumptime(
const std::shared_ptr<UniXML>& xml, xmlNode* node );
149 static xmlNode* bind_node(
const std::shared_ptr<UniXML>& xml, xmlNode* root,
const std::string& nodename,
const std::string& nm =
"");
150 static xmlNode* rebind_node(
const std::shared_ptr<UniXML>& xml, xmlNode* root,
const std::string& nodename,
const std::string& nm =
"");
152 std::string s_filterField = {
"" };
153 std::string s_filterValue = {
"" };
154 std::string t_filterField = {
"" };
155 std::string t_filterValue = {
"" };
157 std::string i_filterField = {
"" };
158 std::string i_filterValue = {
"" };
159 std::string c_filterField = {
"" };
160 std::string c_filterValue = {
"" };
162 std::string fname = {
"" };
163 std::shared_ptr<Configuration> conf;
164 std::shared_ptr<UniXML> uxml;
165 xmlNode* root = {
nullptr };
169 NCReaderSlot ncrslot;
Definition: IOConfig_XML.h:38
void setThresholdsFilter(const std::string &filterField, const std::string &filterValue="")
Definition: IOConfig_XML.cc:451
void setReadThresholdItem(ReaderSlot sl)
Definition: IOConfig_XML.cc:441
void setNCReadItem(NCReaderSlot sl)
Definition: IOConfig_XML.cc:446
bool getConsumerInfo(UniXML::iterator &it, uniset::ObjectId &cid, uniset::ObjectId &cnode) const
Definition: IOConfig_XML.cc:469
void setConsumerFilter(const std::string &filterField, const std::string &filterValue="")
Definition: IOConfig_XML.cc:463
void setReadItem(ReaderSlot sl)
Definition: IOConfig_XML.cc:535
void setReadConsumerItem(ReaderSlot sl)
Definition: IOConfig_XML.cc:540
virtual IOController::IOStateList read() override
Definition: IOConfig_XML.cc:53
void setItemFilter(const std::string &filterField, const std::string &filterValue="")
Definition: IOConfig_XML.cc:457
sigc::slot< bool, const std::shared_ptr< UniXML > &, UniXML::iterator &, xmlNode * > ReaderSlot
Definition: IOConfig_XML.h:65
Definition: IOConfig.h:27
Definition: CommonEventLoop.h:15
long ObjectId
Definition: UniSetTypes_i.idl:30
Definition: IOController_i.idl:58