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;
135 bool check_list_item( UniXML::iterator& it )
const;
136 bool check_consumer_item( UniXML::iterator& it )
const;
137 bool check_thresholds_item( UniXML::iterator& it )
const;
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;
176 #endif // IOConfig_XML_H_ void setReadThresholdItem(ReaderSlot sl)
Definition: IOConfig_XML.cc:440
Definition: CallbackTimer.h:29
Definition: IOConfig.h:26
void setReadConsumerItem(ReaderSlot sl)
Definition: IOConfig_XML.cc:539
void setConsumerFilter(const std::string &filterField, const std::string &filterValue="")
Definition: IOConfig_XML.cc:462
void setThresholdsFilter(const std::string &filterField, const std::string &filterValue="")
Definition: IOConfig_XML.cc:450
sigc::slot< bool, const std::shared_ptr< UniXML > &, UniXML::iterator &, xmlNode * > ReaderSlot
Definition: IOConfig_XML.h:65
void setNCReadItem(NCReaderSlot sl)
Definition: IOConfig_XML.cc:445
Definition: IOConfig_XML.h:36
void setReadItem(ReaderSlot sl)
Definition: IOConfig_XML.cc:534
Definition: IOController_i.idl:56
bool getConsumerInfo(UniXML::iterator &it, uniset::ObjectId &cid, uniset::ObjectId &cnode) const
Definition: IOConfig_XML.cc:468
virtual IOController::IOStateList read() override
Definition: IOConfig_XML.cc:53
long ObjectId
Definition: UniSetTypes_i.idl:30
void setItemFilter(const std::string &filterField, const std::string &filterValue="")
Definition: IOConfig_XML.cc:456