94 void load(
const std::shared_ptr<uniset::Configuration> conf
95 ,
const std::string& filter_field =
""
96 ,
const std::string& filter_value =
"" );
103 void initFromItem(
const std::shared_ptr<uniset::Configuration> conf
110 const std::string orig_key;
111 const std::string orig_value;
113 Tag(
const std::string& _key
114 ,
const std::string& _val
115 ,
const std::string& _orig_key
116 ,
const std::string& _orig_val):
120 orig_value(_orig_val)
125 static std::vector<Tag> parseTags(
const std::string& s_tags,
const char sep =
' ');
131 size_t getTagsCount()
const;
132 size_t getSensorsCount()
const;
134 using StateMap = std::unordered_map<uniset::ObjectId, long>;
136 std::vector<uniset::ObjectId> getAskedSensors()
const;
149 bool checkInRange(
long value )
const;
150 void updateText(
long value );
151 std::vector<Tag> tags;
153 bool needReplaceKey = {
true};
154 bool needReplaceVal = {
true};
158 using RangeList = std::list<Range>;
163 using TagsMap = std::unordered_map<std::string, RangeList>;
169 std::vector<Tag> any_tags;
170 TagsMap::iterator vit;
171 StateMap::iterator it;
172 long prev_value = { 0 };
173 bool initOk = {
false };
177 using TagList = std::list<TagsInfo>;
179 std::vector<Tag> makeTags( TagList& lst );
182 std::unordered_map<uniset::ObjectId, TagList> tags;
184 void initDynamicTags();
185 void initFromTags(
const std::shared_ptr<uniset::Configuration>& conf,
uniset::UniXML::iterator it,
const std::string& s_tags );
186 void initFromValues(
const std::shared_ptr<uniset::Configuration>& conf,
uniset::UniXML::iterator it,
const std::string& s_values );