Commit 1edb174c authored by Pavel Vainerman's avatar Pavel Vainerman

Исправил ошибку в порядоке обработки параметров командой строки и конф. файла

в IOControl.
parent dc139884
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Name: libuniset Name: libuniset
Version: 1.0 Version: 1.0
Release: alt39 Release: alt40
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
......
...@@ -65,8 +65,14 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID, ...@@ -65,8 +65,14 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
UniXML_iterator it(cnode); UniXML_iterator it(cnode);
noCards = true; noCards = true;
for( unsigned int i=1; i<cards.size(); i++ ) for( unsigned int i=1; i<cards.size(); i++ )
cards[i] = NULL;
buildCardsList();
for( unsigned int i=1; i<cards.size(); i++ )
{ {
stringstream s1; stringstream s1;
s1 << "--" << prefix << "-dev" << i; s1 << "--" << prefix << "-dev" << i;
...@@ -76,11 +82,13 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID, ...@@ -76,11 +82,13 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
string iodev = conf->getArgParam(s1.str(),it.getProp(s2.str())); string iodev = conf->getArgParam(s1.str(),it.getProp(s2.str()));
if( iodev.empty() || iodev == "/dev/null" ) if( iodev.empty() || iodev == "/dev/null" )
{ {
unideb[Debug::LEVEL3] << myname << "(init): КАРТА N" << i if( cards[i] == NULL )
<< " ОТКЛЮЧЕНА (TestMode)!!! в КАЧЕСТВЕ УСТРОЙСТВА УКАЗАНО '" {
<< iodev << "'" << endl; unideb[Debug::LEVEL3] << myname << "(init): КАРТА N" << i
cards[i] = NULL; << " ОТКЛЮЧЕНА (TestMode)!!! в КАЧЕСТВЕ УСТРОЙСТВА УКАЗАНО '"
cout << "******************** CARD" << i << ": IO IMITATOR MODE ****************" << endl; << iodev << "'" << endl;
cout << "******************** CARD" << i << ": IO IMITATOR MODE ****************" << endl;
}
} }
else else
{ {
...@@ -95,17 +103,15 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID, ...@@ -95,17 +103,15 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
{ {
stringstream t1; stringstream t1;
t1 << s1.str() << "-subdev" << s << "-type"; t1 << s1.str() << "-subdev" << s << "-type";
stringstream t2;
t2 << s2.str() << "-subdev" << s << "-type";
string stype = conf->getArgParam(t1.str(),it.getProp(t2.str())); string stype = conf->getArgParam(t1.str());
if( !stype.empty() ) if( !stype.empty() )
{ {
ComediInterface::SubdevType st = ComediInterface::str2type(stype.c_str()); ComediInterface::SubdevType st = ComediInterface::str2type(stype.c_str());
if( !stype.empty() && st == ComediInterface::Unknown ) if( !stype.empty() && st == ComediInterface::Unknown )
{ {
ostringstream err; ostringstream err;
err << "Unknown subdev type '" << stype << " for " << t1 << " OR " << t2; err << "Unknown subdev type '" << stype << " for " << t1;
throw SystemError(err.str()); throw SystemError(err.str());
} }
...@@ -122,7 +128,7 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID, ...@@ -122,7 +128,7 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
} }
} }
buildCardsList();
unideb[Debug::INFO] << myname << "(init): result numcards=" << cards.size() << endl; unideb[Debug::INFO] << myname << "(init): result numcards=" << cards.size() << endl;
......
...@@ -151,9 +151,7 @@ class NCRestorer_XML: ...@@ -151,9 +151,7 @@ class NCRestorer_XML:
*/ */
void setDependsFilter( const std::string filterField, const std::string filterValue="" ); void setDependsFilter( const std::string filterField, const std::string filterValue="" );
/*! Установить фильтр на чтение списка 'порогов') /*! Установить фильтр на чтение списка 'порогов' */
\note Функцию необходимо вызывать до вызова buildDependsList(...)
*/
void setThresholdsFilter( const std::string filterField, const std::string filterValue="" ); void setThresholdsFilter( const std::string filterField, const std::string filterValue="" );
bool setFileName( const std::string& file, bool create ); bool setFileName( const std::string& file, bool create );
......
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