Commit a5ca0a91 authored by Pavel Vainerman's avatar Pavel Vainerman

new version (add new properties for MBSlave)

parent 0630856a
......@@ -178,6 +178,9 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Mon Aug 03 2009 Pavel Vainerman <pv@altlinux.ru> 0.96-eter35
- new RS properties
* Sat Aug 01 2009 Pavel Vainerman <pv@altlinux.ru> 0.96-eter30
- new build
......
......@@ -171,6 +171,9 @@ prefix(prefix)
}
}
askcount_id = conf->getSensorID(conf->getArgParam("--" + prefix + "-askcount-id",it.getProp("askcount_id")));
dlog[Debug::INFO] << myname << ": init askcount_id=" << askcount_id << endl;
dlog[Debug::INFO] << myname << ": init test_id=" << test_id << endl;
wait_msec = getHeartBeatTime() - 100;
......@@ -307,6 +310,19 @@ void MBSlave::execute_rtu()
<< "(execute_rtu): (hb) " << ex << std::endl;
}
}
if( askcount_id!=DefaultObjectId )
{
try
{
shm->localSaveValue(aitAskCount,askcount_id,askCount,getId());
}
catch(Exception& ex)
{
dlog[Debug::CRIT] << myname
<< "(execute_rtu): (askCount) " << ex << std::endl;
}
}
for( IOMap::iterator it=iomap.begin(); it!=iomap.end(); ++it )
IOBase::processingThreshold(&it->second,shm,force);
......@@ -712,6 +728,7 @@ void MBSlave::initIterators()
}
shm->initAIterator(aitHeartBeat);
shm->initAIterator(aitAskCount);
}
// -----------------------------------------------------------------------------
void MBSlave::help_print( int argc, char* argv[] )
......
......@@ -163,6 +163,9 @@ class MBSlave:
IOController::AIOStateList::iterator aitHeartBeat;
UniSetTypes::ObjectId test_id;
IOController::AIOStateList::iterator aitAskCount;
UniSetTypes::ObjectId askcount_id;
PassiveTimer ptTimeout;
ModbusRTU::mbErrCode prev;
long askCount;
......
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