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