13 vrpn_Log(vrpn_TranslationTable* senders, vrpn_TranslationTable* types);
33 vrpn_int32 type, vrpn_int32 sender,
39 vrpn_int32 type, vrpn_int32 sender,
42 int logMessage(vrpn_int32 payloadLen,
struct timeval time, vrpn_int32 type,
43 vrpn_int32 sender,
const char* buffer,
44 vrpn_bool isRemote = VRPN_FALSE);
60 int setName(
const char* name,
size_t len);
71 int checkFilters(vrpn_int32 payloadLen,
struct timeval time,
72 vrpn_int32 type, vrpn_int32 sender,
const char* buffer);
vrpn_bool d_wroteMagicCookie
int setCookie(const char *cookieBuffer)
The magic cookie is set to the default value of the version of VRPN compiled, but a more correct valu...
int addFilter(vrpn_LOGFILTER filter, void *userdata)
char * getName()
Allocates a new string and copies the log file name to it. IMPORTANT: code calling this function is r...
vrpn_Log(vrpn_TranslationTable *senders, vrpn_TranslationTable *types)
vrpn_TranslationTable * d_senders
int setName(const char *name)
int checkFilters(vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer)
int setCompoundName(const char *name, int index)
Takes a name of the form foo.bar and an index <n> and sets the name of the log file to be foo-<n>....
int open(void)
Opens the log file.
vrpn_TranslationTable * d_types
long & logMode(void)
Returns a reference so we can |= it.
vrpnLogFilterEntry * d_filters
int saveLogSoFar(void)
Saves any messages logged so far.
vrpn_LOGLIST * d_firstEntry
int logIncomingMessage(size_t payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer)
Should be called with the timeval adjusted by the clock offset on the receiving Endpoint.
timeval lastLogTime()
Returns the time of the last message that was logged.
int logMessage(vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer, vrpn_bool isRemote=VRPN_FALSE)
We'd like to make this protected, but there's one place it needs to be exposed, at least until we get...
int logOutgoingMessage(vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer)
int close(void)
Closes and saves the log file.
Placed here so vrpn_FileConnection can use it too.
vrpn_MESSAGEHANDLER vrpn_LOGFILTER
Type of handler for filters on logfiles is the same as connection handler.