Commit b6450fea authored by Pavel Vaynerman's avatar Pavel Vaynerman

fixed bug in askSensor!

parent 52769342
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.96
Release: eter37
Release: eter38
Summary: UniSet - library for building distributed industrial control systems
......@@ -177,6 +177,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Thu Aug 06 2009 Pavel Vainerman <pv@etersoft.ru> 0.96-eter38
- new build
* Wed Aug 05 2009 Vitaly Lipatov <lav@altlinux.ru> 0.96-eter37
- fixed smp build
......
......@@ -103,7 +103,7 @@ export BUILDNAME=$BASENAME-$VERSION-$RELEASE
add_changelog_helper "- new build" $SPECNAME
#prepare_tarball || fatal "Can't prepare tarball"
prepare_tarball || fatal "Can't prepare tarball"
rpmbb $SPECNAME || fatal "Can't build"
......
......@@ -196,14 +196,16 @@ void IONotifyController::askState( const IOController_i::SensorInfo& si,
//
// ( )
// ()
string name = conf->oind->getNameById(ci.id, ci.node);
if( unideb.debugging(Debug::INFO) )
unideb[Debug::INFO] << " "<< name << " "
if( unideb.debugging(Debug::INFO) )
{
unideb[Debug::INFO] << " "
<< conf->oind->getNameById(ci.id, ci.node) << " "
<< conf->oind->getNameById(si.id,si.node) << endl;
}
// , ...
DIOStateList::iterator li = mydioEnd();
bool st = localGetState(li,si);
// lock ???
if( li==mydioEnd() )
{
......@@ -253,11 +255,12 @@ void IONotifyController::askState( const IOController_i::SensorInfo& si,
}
catch(Exception& ex)
{
unideb[Debug::WARN] << myname << "(askState): " << name << " "<< ex << endl;
unideb[Debug::WARN] << myname << "(askState): "
<< conf->oind->getNameById(si.id, si.node) << " "<< ex << endl;
}
catch( CORBA::SystemException& ex )
{
unideb[Debug::WARN] << name << " !!(CORBA::SystemException): "
unideb[Debug::WARN] << conf->oind->getNameById(ci.id, ci.node) << " !!(CORBA::SystemException): "
<< ex.NP_minorString() << endl;
}
catch(...){}
......@@ -278,19 +281,21 @@ void IONotifyController::askValue(const IOController_i::SensorInfo& si,
// ( )
//
string name = conf->oind->getNameById(ci.id, ci.node);
if( unideb.debugging(Debug::INFO) )
{
unideb[Debug::INFO] << " "<< name << " "
unideb[Debug::INFO] << " "<< conf->oind->getNameById(ci.id, ci.node)
<< " "
<< conf->oind->getNameById(si.id,si.node) << endl;
}
// , ...
AIOStateList::iterator li = myaioEnd();
long val = localGetValue(li,si);
if( li->second.type != UniversalIO::AnalogInput )
{
ostringstream err;
err << myname << "(askState): " << conf->oind->getNameById(si.id) << " ";
err << myname << "(askState): " << conf->oind->getNameById(si.id)
<< " ";
if( unideb.debugging(Debug::INFO) )
unideb[Debug::INFO] << err.str() << endl;
throw IOController_i::NameNotFound(err.str().c_str());
......@@ -331,11 +336,12 @@ void IONotifyController::askValue(const IOController_i::SensorInfo& si,
}
catch(Exception& ex)
{
unideb[Debug::WARN] << myname << "(askValue): " << name << " catch "<< ex << endl;
unideb[Debug::WARN] << myname << "(askValue): " << conf->oind->getNameById(si.id, si.node) << " catch "<< ex << endl;
}
catch( CORBA::SystemException& ex )
{
unideb[Debug::WARN] << name << " !!(CORBA::SystemException): "
unideb[Debug::WARN] << conf->oind->getNameById(ci.id, ci.node)
<< " !!(CORBA::SystemException): "
<< ex.NP_minorString() << endl;
}
catch(...){}
......
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