Commit 2ca67c9d authored by Pavel Vainerman's avatar Pavel Vainerman

add timestamp in to HistoryInfo

parent 269f43d1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Name: libuniset Name: libuniset
Version: 0.98 Version: 0.98
Release: eter7 Release: eter8
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
...@@ -184,6 +184,10 @@ rm -f %buildroot%_libdir/*.la ...@@ -184,6 +184,10 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc %exclude %_pkgconfigdir/libUniSet.pc
%changelog %changelog
* Wed Aug 11 2010 Pavel Vainerman <pv@altlinux.ru> 0.98-eter7
- add new types for MTR
- minor fixes in SharedMemory::HistoryInfo (add timestamp)
* Fri Jul 30 2010 Ilya Shpigor <elly@altlinux.org> 0.98-eter6 * Fri Jul 30 2010 Ilya Shpigor <elly@altlinux.org> 0.98-eter6
- add MTR support - add MTR support
- add db_ignore parameter for DBServer - add db_ignore parameter for DBServer
......
...@@ -834,6 +834,7 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm ) ...@@ -834,6 +834,7 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm )
if( dlog.debugging(Debug::INFO) ) if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl; dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_tm = sm->tm;
m_historySignal.emit( &(*it) ); m_historySignal.emit( &(*it) );
} }
} }
...@@ -847,7 +848,8 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm ) ...@@ -847,7 +848,8 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm )
{ {
if( dlog.debugging(Debug::INFO) ) if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl; dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_tm = sm->tm;
m_historySignal.emit( &(*it) ); m_historySignal.emit( &(*it) );
} }
} }
...@@ -858,6 +860,7 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm ) ...@@ -858,6 +860,7 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm )
if( dlog.debugging(Debug::INFO) ) if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl; dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_tm = sm->tm;
m_historySignal.emit( &(*it) ); m_historySignal.emit( &(*it) );
} }
} }
......
...@@ -238,16 +238,21 @@ class SharedMemory: ...@@ -238,16 +238,21 @@ class SharedMemory:
id(0), id(0),
size(0),filter(""), size(0),filter(""),
fuse_id(UniSetTypes::DefaultObjectId), fuse_id(UniSetTypes::DefaultObjectId),
fuse_invert(false),fuse_use_val(false),fuse_val(0){} fuse_invert(false),fuse_use_val(false),fuse_val(0)
{
struct timezone tz;
gettimeofday(&fuse_tm,&tz);
}
long id; // ID long id; // ID
HistoryList hlst; // history list HistoryList hlst; // history list
int size; int size;
std::string filter; // filter field std::string filter; // filter field
UniSetTypes::ObjectId fuse_id; // fuse sesnsor UniSetTypes::ObjectId fuse_id; // fuse sesnsor
bool fuse_invert; bool fuse_invert;
bool fuse_use_val; bool fuse_use_val;
long fuse_val; long fuse_val;
struct timeval fuse_tm; // timestamp
}; };
friend std::ostream& operator<<( std::ostream& os, const HistoryInfo& h ); friend std::ostream& operator<<( std::ostream& os, const HistoryInfo& h );
......
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