Commit 2a9f1eb1 authored by Pavel Vainerman's avatar Pavel Vainerman

(UniSetTypes): доработал IDList, чтобы при добавлении можно было задать

либо название датчика либо сразу его id.
parent c5ef2617
......@@ -126,8 +126,19 @@ UniSetTypes::IDList::IDList( std::vector<std::string>&& svec ):
UniSetTypes::IDList::IDList( std::vector<std::string>& svec ):
UniSetTypes::IDList::IDList()
{
auto conf = uniset_conf();
for( const auto& s : svec )
add( uni_atoi(s) );
{
ObjectId id;
if( is_digit(s) )
id = uni_atoi(s);
else
id = conf->getSensorID(s);
add(id);
}
}
// -------------------------------------------------------------------------
UniSetTypes::IDList::IDList():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment