Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

vrpn_Log Class Reference

Logs a VRPN stream. More...

#include <vrpn_Log.h>

List of all members.


Public Members

 vrpn_Log (vrpn_TranslationTable * senders, vrpn_TranslationTable * types)
 ~vrpn_Log (void)
int open (void)
Opens the log file.

int close (void)
Closes and saves the log file.

int saveLogSoFar (void)
Saves any messages logged so far.

int logIncomingMessage (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer)
on the receiving Endpoint.

int logOutgoingMessage (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer)
int logMessage (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer, vrpn_bool isRemote = VRPN_FALSE)
to be exposed, at least until we get cleverer.

int setCookie (const char * cookieBuffer)
VRPN we're communicating with.

int setCompoundName (const char * name, int index)
in the name, merely appends -<n>.

int setName (const char * name)
int setName (const char * name, int len)
long& logMode (void)
Returns a reference so we can |= it.

int addFilter (vrpn_LOGFILTER filter, void * userdata)
timeval lastLogTime ()
Returns the time of the last message that was logged.


Protected Members

int checkFilters (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer)
char* d_logFileName
long d_logmode
vrpn_LOGLISTd_logTail
vrpn_LOGLISTd_firstEntry
FILE* d_file
char* d_magicCookie
vrpn_bool d_wroteMagicCookie
vrpnLogFilterEntryd_filters
vrpn_TranslationTabled_senders
vrpn_TranslationTabled_types
timeval d_lastLogTime


Detailed Description

Logs a VRPN stream.

Used by vrpn_Endpoint.

TODO: progressive write - currently we wait until the log is closed, typically in the Endpoint's destructor, before writing any to disk. This requires maintaining a prohibitively large in-core data structure. We ought to be able to write it out incrementally.


Member Function Documentation

vrpn_Log::vrpn_Log (vrpn_TranslationTable * senders, vrpn_TranslationTable * types)

vrpn_Log::~vrpn_Log (void)

int vrpn_Log::open (void)

Opens the log file.

int vrpn_Log::close (void)

Closes and saves the log file.

int vrpn_Log::saveLogSoFar (void)

Saves any messages logged so far.

int vrpn_Log::logIncomingMessage (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer)

on the receiving Endpoint.

int vrpn_Log::logOutgoingMessage (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer)

int vrpn_Log::logMessage (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer, vrpn_bool isRemote = VRPN_FALSE)

to be exposed, at least until we get cleverer.

int vrpn_Log::setCookie (const char * cookieBuffer)

VRPN we're communicating with.

int vrpn_Log::setCompoundName (const char * name, int index)

in the name, merely appends -<n>.

int vrpn_Log::setName (const char * name)

int vrpn_Log::setName (const char * name, int len)

long & vrpn_Log::logMode (void)

Returns a reference so we can |= it.

int vrpn_Log::addFilter (vrpn_LOGFILTER filter, void * userdata)

timeval vrpn_Log::lastLogTime ()

Returns the time of the last message that was logged.

int vrpn_Log::checkFilters (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char * buffer) [protected]


Member Data Documentation

char* vrpn_Log::d_logFileName [protected]

long vrpn_Log::d_logmode [protected]

vrpn_LOGLIST* vrpn_Log::d_logTail [protected]

vrpn_LOGLIST* vrpn_Log::d_firstEntry [protected]

FILE* vrpn_Log::d_file [protected]

char* vrpn_Log::d_magicCookie [protected]

vrpn_bool vrpn_Log::d_wroteMagicCookie [protected]

vrpnLogFilterEntry* vrpn_Log::d_filters [protected]

vrpn_TranslationTable* vrpn_Log::d_senders [protected]

vrpn_TranslationTable* vrpn_Log::d_types [protected]

timeval vrpn_Log::d_lastLogTime [protected]


The documentation for this class was generated from the following files:
Generated at Fri Sep 13 15:04:16 2002 for vrpn by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999