Commit 3c3d5ae9 authored by Pavel Vaynerman's avatar Pavel Vaynerman

i/o debugging

parent 9128b312
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.97
Release: eter3
Release: eter6
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
......@@ -178,6 +178,15 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Tue Sep 22 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter5
- minor fixes in SM
* Tue Sep 22 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter4
- minor fixes in IOBase
* Tue Sep 22 2009 Pavel Vainerman <pv@etersoft.ru> 0.97-eter3
- fixed bugs in IOControl
* Sat Sep 19 2009 Vitaly Lipatov <lav@altlinux.ru> 0.97-eter2
- fix build
......
......@@ -12,10 +12,18 @@ using namespace UniSetExtensions;
// -----------------------------------------------------------------------------
std::ostream& operator<<( std::ostream& os, IOControl::IOInfo& inf )
{
return os << "(" << inf.si.id << ")" << conf->oind->getMapName(inf.si.id)
os << "(" << inf.si.id << ")" << conf->oind->getMapName(inf.si.id)
<< " card=" << inf.ncard << " channel=" << inf.channel << " subdev=" << inf.subdev
<< " aref=" << inf.aref << " range=" << inf.range
<< " default=" << inf.defval << " safety=" << inf.safety;
if( inf.cal.minRaw!=inf.cal.maxRaw )
os << " rmin=" << inf.cal.minRaw
<< " rmax=" << inf.cal.maxRaw
<< " cmin=" << inf.cal.minCal
<< " cmax=" << inf.cal.maxCal;
return os;
}
// -----------------------------------------------------------------------------
......@@ -155,7 +163,7 @@ IOControl::IOControl( UniSetTypes::ObjectId id, UniSetTypes::ObjectId icID,
ptBlink2.setTiming(blink2_msec);
int blink3_msec = conf->getArgPInt("--io-blink3-time",it.getProp("blink3-time"), 100);
ptBlink3.setTiming(blink2_msec);
ptBlink3.setTiming(blink3_msec);
smReadyTimeout = conf->getArgInt("--io-sm-ready-timeout",it.getProp("ready_timeout"));
if( smReadyTimeout == 0 )
......@@ -475,8 +483,8 @@ void IOControl::ioread( IOInfo* it )
{
if( !it->lamp )
{
IOBase::processingAsAO( ib, shm, force_out );
card->setAnalogChannel(it->subdev,it->channel,it->value,it->range,it->aref);
long rval = IOBase::processingAsAO( ib, shm, force_out );
card->setAnalogChannel(it->subdev,it->channel,rval,it->range,it->aref);
}
else //
{
......
......@@ -180,9 +180,12 @@ void SharedMemory::timerInfo( TimerMessage *tm )
saveHistory();
else if( tm->id == tmPulsar )
{
bool st = localGetState(ditPulsar,siPulsar);
st ^= true;
localSaveState(ditPulsar,siPulsar,st,getId());
if( siPulsar.id != DefaultObjectId )
{
bool st = localGetState(ditPulsar,siPulsar);
st ^= true;
localSaveState(ditPulsar,siPulsar,st,getId());
}
}
}
......
......@@ -107,7 +107,7 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
if( it->cdiagram ) //
{
// ,
// ,
// ,
if( !it->nofilter && it->df.size() > 1 )
{
......@@ -129,7 +129,7 @@ void IOBase::processingAsAI( IOBase* it, long val, SMInterface* shm, bool force
else
{
IOController_i::CalibrateInfo* cal( &(it->cal) );
if( cal->maxRaw!=0 && cal->maxRaw!=cal->minRaw ) //
if( cal->maxRaw!=cal->minRaw ) //
val = UniSetTypes::lcalibrate(val,cal->minRaw,cal->maxRaw,cal->minCal,cal->maxCal,true);
// ,
......@@ -196,7 +196,7 @@ void IOBase::processingFasAI( IOBase* it, float fval, SMInterface* shm, bool for
}
IOController_i::CalibrateInfo* cal( &(it->cal) );
if( cal->maxRaw!=0 && cal->maxRaw!=cal->minRaw ) //
if( cal->maxRaw!=cal->minRaw ) //
val = UniSetTypes::lcalibrate(val,cal->minRaw,cal->maxRaw,cal->minCal,cal->maxCal,true);
// "",
......@@ -287,7 +287,7 @@ long IOBase::processingAsAO( IOBase* it, SMInterface* shm, bool force )
else
{
IOController_i::CalibrateInfo* cal( &(it->cal) );
if( cal && cal->maxRaw!=0 && cal->maxRaw!=cal->minRaw ) //
if( cal && cal->maxRaw!=cal->minRaw ) //
{
// !!!
val = UniSetTypes::lcalibrate(it->value,
......@@ -351,7 +351,7 @@ float IOBase::processingFasAO( IOBase* it, SMInterface* shm, bool force )
{
float fval = val;
IOController_i::CalibrateInfo* cal( &(it->cal) );
if( cal->maxRaw!=0 && cal->maxRaw!=cal->minRaw ) //
if( cal->maxRaw!=cal->minRaw ) //
{
// !!!
fval = UniSetTypes::fcalibrate(fval,
......@@ -475,7 +475,7 @@ bool IOBase::initItem( IOBase* b, UniXML_iterator& it, SMInterface* shm,
if( !it.getProp("filtersize").empty() )
{
#warning " 0, f_size def_filtersize?"
f_size = it.getPIntProp("filtersize", 0);
f_size = it.getPIntProp("filtersize",def_filtersize);
}
}
......
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