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

add timestamp in to HistoryInfo

parent 269f43d1
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 0.98
Release: eter7
Release: eter8
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
......@@ -184,6 +184,10 @@ rm -f %buildroot%_libdir/*.la
%exclude %_pkgconfigdir/libUniSet.pc
%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
- add MTR support
- add db_ignore parameter for DBServer
......
......@@ -834,6 +834,7 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm )
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_tm = sm->tm;
m_historySignal.emit( &(*it) );
}
}
......@@ -848,6 +849,7 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm )
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_tm = sm->tm;
m_historySignal.emit( &(*it) );
}
}
......@@ -858,6 +860,7 @@ void SharedMemory::updateHistory( UniSetTypes::SensorMessage* sm )
if( dlog.debugging(Debug::INFO) )
dlog[Debug::INFO] << myname << "(updateHistory): HISTORY EVENT for " << (*it) << endl;
it->fuse_tm = sm->tm;
m_historySignal.emit( &(*it) );
}
}
......
......@@ -238,7 +238,11 @@ class SharedMemory:
id(0),
size(0),filter(""),
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
HistoryList hlst; // history list
......@@ -248,6 +252,7 @@ class SharedMemory:
bool fuse_invert;
bool fuse_use_val;
long fuse_val;
struct timeval fuse_tm; // timestamp
};
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