###########################################################################
SENFSCons.Binary( env, 'ratestuffer', SENFSCons.GlobSources(),
- LIBS = [ 'PPI', 'Scheduler', 'Packets', 'Socket', 'Utils' ] );
+ LIBS = [ 'PPI', 'Scheduler', 'Packets', 'Socket', 'Scheduler', 'Utils' ] );
SENFSCons.Doxygen(env, extra_sources=[
env.Dia2Png('ratestuffer.dia')
###########################################################################
SENFSCons.Binary(env, 'client', 'client.cc',
- LIBS = [ 'Packets', 'Socket', 'Utils' ]);
+ LIBS = [ 'Packets', 'Socket', 'Scheduler', 'Utils' ]);
SENFSCons.Binary(env, 'server', 'server.cc',
- LIBS = [ 'Scheduler', 'Packets', 'Socket', 'Utils' ]);
+ LIBS = [ 'Scheduler', 'Packets', 'Socket', 'Scheduler', 'Utils' ]);
###########################################################################
SENFSCons.Binary(env, 'udpClient', 'udpClient.cc',
- LIBS = [ 'Packets', 'Socket', 'Utils' ]);
+ LIBS = [ 'Packets', 'Socket', 'Scheduler', 'Utils' ]);
SENFSCons.Binary(env, 'udpServer', 'udpServer.cc',
- LIBS = [ 'Scheduler', 'Packets', 'Socket', 'Utils' ]);
+ LIBS = [ 'Scheduler', 'Packets', 'Socket', 'Scheduler', 'Utils' ]);
SENFSCons.Doxygen(env)
/** \mainpage The SENF Scheduler Library
- The Scheduler library provides a simple yet flexible abstraction
- of the standard asynchronous UNIX mainloop utilizing \c select or
- \c poll. The Scheduler library is based on the highly efficient
- (but linux specific) \c epoll() system call.
+ The Scheduler library provides a simple yet flexible abstraction of the standard asynchronous
+ UNIX mainloop utilizing \c select or \c poll. The Scheduler library is based on the highly
+ efficient (but linux specific) \c epoll() system call.
The library provides
- \li a central \ref Scheduler singleton and
- \li \ref ReadHelper and \ref WriteHelper templates to simplify
- common tasks.
+ \li the ClockService as a reliable high-resolution highly accurate monotonous time source
+ \li a central \ref Scheduler %singleton and
+ \li \ref ReadHelper and \ref WriteHelper templates to simplify common tasks.
- In it's current incarnation, the library only supports network
- file handles (including pipes etc) and simple timers (especially
- it does not support asynchronous notification for on-disc file
- transfers etc). Additional features will be added:
- \li UNIX signal support
- \li async IO support for local (disc) file handles
- \li multi threading support
- \li IPC support for multithreaded applications
+ The Scheduler supports several types of scheduling activites:
+ \li Arbitrary file descriptors (however, local disk file-handles are not guaranteed
+ non-blocking)
+ \li Timers
+ \li UNIX Signals
*/
}
SENFSCons.Lib(env,
library = 'Scheduler',
sources = sources,
- LIBS = [ 'Socket', 'Utils' ])
+ LIBS = [ 'Utils' ])
SENFSCons.Doxygen(env)
allob = []
allob.extend(
- SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] ) )
+ SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Scheduler', 'Utils' ] ) )
for sc in glob.glob("*/SConscript"):
ob = SConscript(sc)
#define prefix_
///////////////////////////////cc.p////////////////////////////////////////
-prefix_ struct timeval senf::DatagramSocketProtocol::timestamp()
+prefix_ senf::ClockService::clock_type senf::DatagramSocketProtocol::timestamp()
const
{
struct timeval tv;
if (::ioctl(fd(), SIOCGSTAMP, &tv) < 0)
SENF_THROW_SYSTEM_EXCEPTION("");
- return tv;
+ return ClockService::from_timeval(tv);
}
///////////////////////////////cc.e////////////////////////////////////////
// Custom includes
#include <sys/time.h>
#include "../../Socket/SocketProtocol.hh"
+#include "../../Scheduler/ClockService.hh"
//#include "DatagramSocketProtocol.mpp"
///////////////////////////////hh.p////////////////////////////////////////
: public virtual SocketProtocol
{
public:
- struct timeval timestamp() const; ///< Return packet timestamp of last packet
+ ClockService::clock_type timestamp() const; ///< Return packet timestamp of last packet
/**< The returned timestamp represents the time, at which
the last network packet passed to the user has been
received from the network. This allows precise network
timing.
+
+ The returned value can be converted to the
+ senf::ClockService::clock_type representation using
+ semf::ClockService::from_timeval().
+
\pre The \c SO_TIMESTAMP socket option must not be set
on the socket.
\returns timestamp when last packet was received */
allob = []
allob.extend(
- SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] ) )
+ SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Scheduler', 'Utils' ] ) )
for sc in glob.glob("*/SConscript"):
ob = SConscript(sc)
allob = []
allob.extend(
- SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] ) )
+ SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Scheduler', 'Utils' ] ) )
for sc in glob.glob("*/SConscript"):
ob = SConscript(sc)
SENFSCons.StandardTargets(env)
sources = SENFSCons.GlobSources()
-objects = SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] )
+objects = SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Scheduler', 'Utils' ] )
for sc in glob.glob("*/SConscript"):
ob = SConscript(sc)
allob = []
allob.extend(
- SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Utils' ] ) )
+ SENFSCons.Objects( env, sources = sources, LIBS = [ 'Socket', 'Scheduler', 'Utils' ] ) )
for sc in glob.glob("*/SConscript"):
ob = SConscript(sc)
library = 'Socket',
sources = sources + subob,
testSources = testSources,
- LIBS = [ 'Utils' ])
+ LIBS = [ 'Scheduler', 'Utils' ])
SENFSCons.Doxygen(env, extra_sources = [
env.Dia2Png('SocketLibrary-classes.dia'),