Commit b6450fea authored by Pavel Vaynerman's avatar Pavel Vaynerman

fixed bug in askSensor!

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