Commit 73965f0f authored by Pavel Vainerman's avatar Pavel Vainerman

add history logging in SharedMemory

parent 66eb4a98
#!/bin/sh #!/bin/sh
START=uniset-start.sh ./uniset-start.sh -f "./uniset-admin --confile test.xml --`basename $0 .sh` $1 $2 $3 $4"
${START} -f "./uniset-admin --confile test.xml --`basename $0 .sh` $1 $2 $3 $4"
...@@ -8,10 +8,6 @@ ln -s -f admin.sh foldUp ...@@ -8,10 +8,6 @@ ln -s -f admin.sh foldUp
ln -s -f admin.sh info ln -s -f admin.sh info
ln -s -f admin.sh alarm ln -s -f admin.sh alarm
ln -s -f admin.sh create ln -s -f admin.sh create
#ln -s -f admin.sh setState
#ln -s -f admin.sh dbcreate
#ln -s -f admin.sh statistic
#ln -s -f admin.sh database
ln -s -f admin.sh logrotate ln -s -f admin.sh logrotate
ln -s -f admin.sh omap ln -s -f admin.sh omap
ln -s -f admin.sh msgmap ln -s -f admin.sh msgmap
...@@ -28,5 +24,7 @@ ln -s -f admin.sh getCalibrate ...@@ -28,5 +24,7 @@ ln -s -f admin.sh getCalibrate
ln -s -f admin.sh help ln -s -f admin.sh help
ln -s -f admin.sh oinfo ln -s -f admin.sh oinfo
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
...@@ -44,7 +44,12 @@ ...@@ -44,7 +44,12 @@
<dlog name="dlog" levels="" file=""/> <dlog name="dlog" levels="" file=""/>
<SharedMemory name="SharedMemory" shmID="SharedMemory"/> <SharedMemory name="SharedMemory" shmID="SharedMemory">
<History savetime="200">
<item id="1" fuse="AlarmFuse1_S" size="30" filter="a1"/>
<item id="2" fuse="AlarmFuse2_S" size="30" filter="a2"/>
</History>
</SharedMemory>
<MBMaster1 name="MBMaster1" iaddr="127.0.0.1" addr="0x31" port="30000" <MBMaster1 name="MBMaster1" iaddr="127.0.0.1" addr="0x31" port="30000"
levels="info,warn,crit" poll_time="200" reply_timeout="60" levels="info,warn,crit" poll_time="200" reply_timeout="60"
...@@ -123,6 +128,18 @@ ...@@ -123,6 +128,18 @@
<item name="RespondRTU_S" textname="respond rtu" node="" iotype="DI"/> <item name="RespondRTU_S" textname="respond rtu" node="" iotype="DI"/>
<item name="NoRespondRTU2_S" textname="no respond rtu" node="" iotype="DI"/> <item name="NoRespondRTU2_S" textname="no respond rtu" node="" iotype="DI"/>
<item name="AlarmFuse1_S" textname="alarm fuse sensor 1" node="" iotype="DI" priority="Medium"/>
<item name="AlarmFuse2_S" textname="alarm fuse sensor 2" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor1_S" textname="alarm dumpm sensor 1" a1="1" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor2_S" textname="alarm dumpm sensor 2" a1="1" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor3_S" textname="alarm dumpm sensor 3" a1="1" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor4_S" textname="alarm dumpm sensor 4" a1="1" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor5_S" textname="alarm dumpm sensor 5" a2="1" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor6_S" textname="alarm dumpm sensor 6" a2="1" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor7_S" textname="alarm dumpm sensor 7" a2="1" node="" iotype="DI" priority="Medium"/>
<item name="DumpSensor8_S" textname="alarm dumpm sensor 8" a2="1" node="" iotype="DI" priority="Medium"/>
</sensors> </sensors>
<thresholds name="thresholds"> <thresholds name="thresholds">
......
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
...@@ -12,6 +12,7 @@ using namespace UniSetExtensions; ...@@ -12,6 +12,7 @@ using namespace UniSetExtensions;
SharedMemory::SharedMemory( ObjectId id, string datafile ): SharedMemory::SharedMemory( ObjectId id, string datafile ):
IONotifyController_LT(id), IONotifyController_LT(id),
heartbeatCheckTime(5000), heartbeatCheckTime(5000),
histSaveTime(200),
wdt(0), wdt(0),
activated(false), activated(false),
workready(false), workready(false),
...@@ -23,12 +24,14 @@ SharedMemory::SharedMemory( ObjectId id, string datafile ): ...@@ -23,12 +24,14 @@ SharedMemory::SharedMemory( ObjectId id, string datafile ):
if( cnode == NULL ) if( cnode == NULL )
throw SystemError("Not find conf-node for SharedMemory"); throw SystemError("Not find conf-node for SharedMemory");
UniXML_iterator it(cnode); UniXML_iterator it(cnode);
// ----------------------
buildHistoryList(cnode);
signal_change_state().connect(sigc::mem_fun(*this, &SharedMemory::updateHistory));
// ---------------------- // ----------------------
restorer = NULL; restorer = NULL;
NCRestorer_XML* rxml = new NCRestorer_XML(datafile); NCRestorer_XML* rxml = new NCRestorer_XML(datafile);
// rxml = new NCRestorer_XML1(datafile);
string s_field = conf->getArgParam("--s-filter-field"); string s_field = conf->getArgParam("--s-filter-field");
string s_fvalue = conf->getArgParam("--s-filter-value"); string s_fvalue = conf->getArgParam("--s-filter-value");
...@@ -158,6 +161,8 @@ void SharedMemory::timerInfo( TimerMessage *tm ) ...@@ -158,6 +161,8 @@ void SharedMemory::timerInfo( TimerMessage *tm )
sendEvent(sm1); sendEvent(sm1);
askTimer(tm->id,0); askTimer(tm->id,0);
} }
else if( tm->id == tmHistory )
saveHistory();
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
...@@ -185,10 +190,11 @@ void SharedMemory::sysCommand( SystemMessage *sm ) ...@@ -185,10 +190,11 @@ void SharedMemory::sysCommand( SystemMessage *sm )
UniSetTypes::uniset_mutex_lock l(mutex_start, 10000); UniSetTypes::uniset_mutex_lock l(mutex_start, 10000);
askTimer(tmHeartBeatCheck,heartbeatCheckTime); askTimer(tmHeartBeatCheck,heartbeatCheckTime);
askTimer(tmEvent,evntPause,1); askTimer(tmEvent,evntPause,1);
askTimer(tmHistory,histSaveTime);
} }
break; break;
case SystemMessage::FoldUp: case SystemMessage::FoldUp:
case SystemMessage::Finish: case SystemMessage::Finish:
break; break;
...@@ -207,14 +213,21 @@ void SharedMemory::sysCommand( SystemMessage *sm ) ...@@ -207,14 +213,21 @@ void SharedMemory::sysCommand( SystemMessage *sm )
void SharedMemory::askSensors( UniversalIO::UIOCommand cmd ) void SharedMemory::askSensors( UniversalIO::UIOCommand cmd )
{ {
try /*
for( History::iterator it=hist.begin(); it!=hist.end(); ++it )
{ {
// ui.askState( SID, cmd); if( sm->id == it->idFuse )
} {
catch(Exception& ex) try
{ {
dlog[Debug::CRIT] << myname << "(askSensors): " << ex << endl; ui.askState( SID, cmd);
}
catch(Exception& ex)
{
dlog[Debug::CRIT] << myname << "(askSensors): " << ex << endl;
}
} }
*/
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
...@@ -233,8 +246,17 @@ bool SharedMemory::activateObject() ...@@ -233,8 +246,17 @@ bool SharedMemory::activateObject()
// //
for( HeartBeatList::iterator it=hlist.begin(); it!=hlist.end(); ++it ) for( HeartBeatList::iterator it=hlist.begin(); it!=hlist.end(); ++it )
{ {
it->ait = myaioEnd(); it->ait = myaioEnd();
it->dit = mydioEnd(); it->dit = mydioEnd();
}
for( History::iterator it=hist.begin(); it!=hist.end(); ++it )
{
for( HistoryList::iterator hit=it->hlst.begin(); hit!=it->hlst.end(); ++hit )
{
hit->ait = myaioEnd();
hit->dit = mydioEnd();
}
} }
activated = true; activated = true;
...@@ -252,7 +274,7 @@ CORBA::Boolean SharedMemory::exist() ...@@ -252,7 +274,7 @@ CORBA::Boolean SharedMemory::exist()
void SharedMemory::sigterm( int signo ) void SharedMemory::sigterm( int signo )
{ {
if( signo == SIGTERM ) if( signo == SIGTERM )
wdt->stop(); wdt->stop();
// raise(SIGKILL); // raise(SIGKILL);
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
...@@ -322,6 +344,9 @@ bool SharedMemory::readItem( UniXML& xml, UniXML_iterator& it, xmlNode* sec ) ...@@ -322,6 +344,9 @@ bool SharedMemory::readItem( UniXML& xml, UniXML_iterator& it, xmlNode* sec )
catch(...){} catch(...){}
} }
// check history filters
checkHistoryFilter(it);
if( heartbeat_node.empty() || it.getProp("heartbeat").empty()) if( heartbeat_node.empty() || it.getProp("heartbeat").empty())
return true; return true;
...@@ -391,7 +416,7 @@ bool SharedMemory::readItem( UniXML& xml, UniXML_iterator& it, xmlNode* sec ) ...@@ -391,7 +416,7 @@ bool SharedMemory::readItem( UniXML& xml, UniXML_iterator& it, xmlNode* sec )
// .. // ..
// id - configure.xml // id - configure.xml
hlist.push_back(hi); hlist.push_back(hi);
return true; return true;
} }
// ------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------
void SharedMemory::saveValue( const IOController_i::SensorInfo& si, CORBA::Long value, void SharedMemory::saveValue( const IOController_i::SensorInfo& si, CORBA::Long value,
...@@ -523,3 +548,145 @@ void SharedMemory::loggingInfo( SensorMessage& sm ) ...@@ -523,3 +548,145 @@ void SharedMemory::loggingInfo( SensorMessage& sm )
IONotifyController_LT::loggingInfo(sm); IONotifyController_LT::loggingInfo(sm);
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
void SharedMemory::buildHistoryList( xmlNode* cnode )
{
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(buildHistoryList): ..." << endl;
xmlNode* n = conf->findNode(cnode,"History");
if( !n )
{
dlog[Debug::WARN] << myname << "(buildHistoryList): <History> not found " << endl;
return;
}
UniXML_iterator it(n);
histSaveTime = uni_atoi(it.getProp("savetime").c_str());
if( histSaveTime < 0 )
histSaveTime = 200;
if( !it.goChildren() )
{
dlog[Debug::WARN] << myname << "(buildHistoryList): <History> empty..." << endl;
return;
}
for( ; it.getCurrent(); it.goNext() )
{
HistoryInfo hi;
hi.id = UniSetTypes::uni_atoi( it.getProp("id").c_str() );
hi.size = UniSetTypes::uni_atoi( it.getProp("size").c_str() );
if( hi.size <=0 )
continue;
hi.filter = it.getProp("filter");
if( hi.filter.empty() )
continue;
hi.idFuse = conf->getSensorID(it.getProp("fuse"));
if( hi.idFuse == DefaultObjectId )
{
dlog[Debug::WARN] << myname << "(buildHistory): not found sensor ID for "
<< it.getProp("idFuse")
<< " history item id=" << it.getProp("id") << endl;
continue;
}
hi.invert = uni_atoi(it.getProp("invert").c_str());
// WARNING: no check duplicates...
hist.push_back(hi);
}
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(buildHistoryList): histoty size=" << hist.size() << endl;
}
// -----------------------------------------------------------------------------
void SharedMemory::checkHistoryFilter( UniXML_iterator& xit )
{
for( History::iterator it=hist.begin(); it!=hist.end(); ++it )
{
if( xit.getProp(it->filter).empty() )
continue;
HistoryItem ai;
if( !xit.getProp("id").empty() )
{
ai.id = uni_atoi(xit.getProp("id").c_str());
it->hlst.push_back(ai);
continue;
}
ai.id = conf->getSensorID(xit.getProp("name"));
if( ai.id == DefaultObjectId )
{
dlog[Debug::WARN] << myname << "(checkHistoryFilter): not found sensor ID for " << xit.getProp("name") << endl;
continue;
}
it->hlst.push_back(ai);
}
}
// -----------------------------------------------------------------------------
SharedMemory::HistorySlot SharedMemory::signal_history()
{
return m_historySignal;
}
// -----------------------------------------------------------------------------
void SharedMemory::saveHistory()
{
// if( dlog.debugging(Debug::INFO) )
// dlog[Debug::INFO] << myname << "(saveHistory): ..." << endl;
for( History::iterator it=hist.begin(); it!=hist.end(); ++it )
{
for( HistoryList::iterator hit=it->hlst.begin(); hit!=it->hlst.end(); ++hit )
{
long val = 0;
if( hit->ait != myaioEnd() )
val = localGetValue( hit->ait, hit->ait->second.si );
else if( hit->dit != mydioEnd() )
val = localGetState( hit->dit, hit->dit->second.si );
else
continue;
hit->add( val, it->size );
}
}
}
// -----------------------------------------------------------------------------
void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm )
{
if( dlog.debugging(Debug::INFO) )
{
dlog[Debug::INFO] << myname << "(updateHistory): "
<< " sid=" << sm->id
<< " state=" << sm->state
<< " value=" << sm->value
<< endl;
}
for( History::iterator it=hist.begin(); it!=hist.end(); ++it )
{
if( sm->id == it->idFuse )
{
bool st = it->invert ? !sm->state : sm->state;
if( st )
{
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
m_historySignal.emit( &(*it) );
}
}
}
}
// -----------------------------------------------------------------------------
std::ostream& operator<<( std::ostream& os, const SharedMemory::HistoryInfo& h )
{
os << "id=" << h.id << " idFuse=" << h.idFuse;
return os;
}
// ------------------------------------------------------------------------------------------
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/*! /*!
, :
( ), -
"" . - ( ),
"" .
-
*/ */
class SharedMemory: class SharedMemory:
public IONotifyController_LT public IONotifyController_LT
...@@ -46,6 +48,51 @@ class SharedMemory: ...@@ -46,6 +48,51 @@ class SharedMemory:
void addReadItem( Restorer_XML::ReaderSlot sl ); void addReadItem( Restorer_XML::ReaderSlot sl );
// ------------ HISTORY --------------------
typedef std::list<long> HBuffer;
struct HistoryItem
{
HistoryItem():id(UniSetTypes::DefaultObjectId){}
UniSetTypes::ObjectId id;
HBuffer buf;
AIOStateList::iterator ait;
DIOStateList::iterator dit;
void add( long val, int size )
{
buf.push_back(val);
if( buf.size() >= size )
buf.erase(buf.begin());
}
};
typedef std::list<HistoryItem> HistoryList;
struct HistoryInfo
{
HistoryInfo():
id(0),idFuse(UniSetTypes::DefaultObjectId),
size(0),filter(""),invert(false){}
long id; // ID
UniSetTypes::ObjectId idFuse; // fuse sesnsor
HistoryList hlst; // history list
int size;
std::string filter; // filter field
bool invert;
};
friend std::ostream& operator<<( std::ostream& os, const HistoryInfo& h );
typedef std::list<HistoryInfo> History;
typedef sigc::signal<void,HistoryInfo*> HistorySlot;
HistorySlot signal_history();
protected: protected:
typedef std::list<Restorer_XML::ReaderSlot> ReadSlotList; typedef std::list<Restorer_XML::ReaderSlot> ReadSlotList;
ReadSlotList lstRSlot; ReadSlotList lstRSlot;
...@@ -97,11 +144,13 @@ class SharedMemory: ...@@ -97,11 +144,13 @@ class SharedMemory:
enum Timers enum Timers
{ {
tmHeartBeatCheck, tmHeartBeatCheck,
tmEvent tmEvent,
tmHistory
}; };
int heartbeatCheckTime; int heartbeatCheckTime;
std::string heartbeat_node; std::string heartbeat_node;
int histSaveTime;
void checkHeartBeat(); void checkHeartBeat();
...@@ -125,7 +174,14 @@ class SharedMemory: ...@@ -125,7 +174,14 @@ class SharedMemory:
bool dblogging; bool dblogging;
private: private:
HistorySlot m_historySignal;
History hist;
void buildHistoryList( xmlNode* cnode );
void checkHistoryFilter( UniXML_iterator& it );
void saveHistory();
void updateHistory( UniSetTypes::SensorMessage* sm );
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#endif // SharedMemory_H_ #endif // SharedMemory_H_
......
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
#!/bin/sh #!/bin/sh
export LD_LIBRARY_PATH="../../lib/.libs;../lib/.libs"
ulimit -Sc 1000000000000 ulimit -Sc 1000000000000
uniset-start.sh -f ./uniset-smemory --smemory-id SharedMemory1 \ ./uniset-start.sh -f ./uniset-smemory --smemory-id SharedMemory \
--confile test.xml --datfile test.xml \ --confile test.xml --datfile test.xml \
--unideb-add-levels info,crit,warn,level9,system --unideb-add-levels info,crit,warn,level9,system \
--dlog-add-levels info,crit,warn
#!/bin/sh #!/bin/sh
ln -s -f /usr/bin/uniset-stop.sh stop.sh ln -s -f ../../Utilities/scripts/uniset-start.sh
ln -s -f ../../Utilities/scripts/uniset-stop.sh stop.sh
ln -s -f ../../Utilities/scripts/uniset-functions.sh
ln -s -f ../../conf/test.xml test.xml ln -s -f ../../conf/test.xml test.xml
...@@ -69,6 +69,10 @@ class IONotifyController: ...@@ -69,6 +69,10 @@ class IONotifyController:
const UniSetTypes::ConsumerInfo& ci, UniversalIO::UIOCommand cmd); const UniSetTypes::ConsumerInfo& ci, UniversalIO::UIOCommand cmd);
// -----------------------------------------------
typedef sigc::signal<void,UniSetTypes::SensorMessage*> ChangeSignal;
ChangeSignal signal_change_state(){ return changeSignal; }
// -------------------- !!!!!!!!! --------------------------------- // -------------------- !!!!!!!!! ---------------------------------
virtual IONotifyController_i::ThresholdsListSeq* getThresholdsList(); virtual IONotifyController_i::ThresholdsListSeq* getThresholdsList();
...@@ -209,6 +213,8 @@ class IONotifyController: ...@@ -209,6 +213,8 @@ class IONotifyController:
void onChangeUndefined( DependsList::iterator it, bool undefined ); void onChangeUndefined( DependsList::iterator it, bool undefined );
ChangeSignal changeSignal;
private: private:
friend class NCRestorer; friend class NCRestorer;
......
...@@ -487,6 +487,12 @@ void IONotifyController::localSaveState( IOController::DIOStateList::iterator& i ...@@ -487,6 +487,12 @@ void IONotifyController::localSaveState( IOController::DIOStateList::iterator& i
try try
{ {
changeSignal.emit(&sm);
}
catch(...){}
try
{
loggingInfo(sm); loggingInfo(sm);
} }
catch(...){} catch(...){}
...@@ -494,7 +500,7 @@ void IONotifyController::localSaveState( IOController::DIOStateList::iterator& i ...@@ -494,7 +500,7 @@ void IONotifyController::localSaveState( IOController::DIOStateList::iterator& i
AskMap::iterator it1 = askDIOList.find( key(si.id,si.node) ); AskMap::iterator it1 = askDIOList.find( key(si.id,si.node) );
if( it1!=askDIOList.end() ) if( it1!=askDIOList.end() )
{ // lock { // lock
uniset_mutex_lock lock(askDMutex, 1000); uniset_mutex_lock lock(askDMutex, 1000);
send(it1->second, sm); send(it1->second, sm);
} // unlock } // unlock
} }
...@@ -544,6 +550,12 @@ void IONotifyController::localSaveValue( IOController::AIOStateList::iterator& l ...@@ -544,6 +550,12 @@ void IONotifyController::localSaveValue( IOController::AIOStateList::iterator& l
try try
{ {
changeSignal.emit(&sm);
}
catch(...){}
try
{
loggingInfo(sm); loggingInfo(sm);
} }
catch(...){} catch(...){}
...@@ -1172,6 +1184,12 @@ void IONotifyController::localSetState( IOController::DIOStateList::iterator& it ...@@ -1172,6 +1184,12 @@ void IONotifyController::localSetState( IOController::DIOStateList::iterator& it
sm.sensor_type = it->second.type; sm.sensor_type = it->second.type;
sm.supplier = sup_id; sm.supplier = sup_id;
} // unlock } // unlock
try
{
changeSignal.emit(&sm);
}
catch(...){}
try try
{ {
...@@ -1225,6 +1243,12 @@ void IONotifyController::localSetValue( IOController::AIOStateList::iterator& li ...@@ -1225,6 +1243,12 @@ void IONotifyController::localSetValue( IOController::AIOStateList::iterator& li
try try
{ {
changeSignal.emit(&sm);
}
catch(...){}
try
{
loggingInfo(sm); loggingInfo(sm);
} }
catch(...){} catch(...){}
......
...@@ -128,6 +128,9 @@ void NCRestorer::addthresholdlist( IONotifyController* ic, SInfo& inf, IONotifyC ...@@ -128,6 +128,9 @@ void NCRestorer::addthresholdlist( IONotifyController* ic, SInfo& inf, IONotifyC
case UniversalIO::AnalogOutput: case UniversalIO::AnalogOutput:
ic->asRegistration(inf); ic->asRegistration(inf);
break; break;
default:
break;
} }
} }
} }
...@@ -157,6 +160,9 @@ void NCRestorer::addthresholdlist( IONotifyController* ic, SInfo& inf, IONotifyC ...@@ -157,6 +160,9 @@ void NCRestorer::addthresholdlist( IONotifyController* ic, SInfo& inf, IONotifyC
ic->checkThreshold(it,inf.si,false); ic->checkThreshold(it,inf.si,false);
} }
break; break;
default:
break;
} }
} }
catch(Exception& ex) catch(Exception& ex)
......
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