|
|
// ########################################################################## // #### #### // #### RTP Audio Server Project #### // #### ============================ #### // #### #### // #### NetLog Reader #### // #### #### // #### Version 1.00 -- February 23, 2001 #### // #### #### // #### Copyright (C) 1999 Thomas Dreibholz #### // #### 2000 Universität Bonn, Abt. IV #### // #### 2001 EMail: Dreibholz@bigfoot.com #### // #### WWW: http://www.bigfoot.com/~dreibholz #### // #### #### // ########################################################################## #ifndef NETLOGREADER_H #define NETLOGREADER_H #include "system.h" #include "timedthread.h" #include "networkmonitorinterface.h" #include "streammonitorreport.h" namespace Coral { /** * This class implements a reader for NetworkMonitorReports. The reports will * be read from a file written by NetLogWriter. * * @short Network Log Reader * @author Thomas Dreibholz (Dreibholz@bigfoot.com) * @version 1.0 */ class NetLogReader { // ====== Constructor/Destructor ========================================= public: /** * Constructor for a new NetLogReader. * * @param name Name of log file. */ NetLogReader(const char* name); /** * Destructor. */ ~NetLogReader(); // ====== Status functions =============================================== /** * Check, if NetLogReader is ready. * * @return true, if ready; false, if not. */ inline bool ready() const; /** * Check, if NetLogReader has reached end of file. * * @return true, if end of file is reached; false, if not. */ inline bool eof() const; /** * Get time stamp of file (seconds since 01-Jan-1970). * * @return Time stamp. */ inline card64 getTimeStamp(); /** * Get interval of the entries in file. * * @return Interval in microseconds. */ inline card64 getInterval(); // ====== Report functions =============================================== /** * Read next report from file. * * @param report Address of NetworkMonitorReport to store the report. * @return true, if there was a report; false otherwise. */ bool readNextReport(NetworkMonitorReport* report); /** * Read next stream report from file. * * @param report Address of StreamReport to store the report. * @return true, if there was a stream report; false otherwise. */ bool readNextStreamReport(StreamReport* report); /** * Reset report file position to first report. */ inline void reset(); // ====== Private data =================================================== private: FILE* FileDescriptor; card64 TimeStamp; card64 Interval; card32 Flags; card32 StreamReportCount; }; } #include "netlogreader.icc" #endif
Generated by: viper@odin on Fri Feb 23 12:41:26 2001, using kdoc 2.0a36. |