vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_Log.h
Go to the documentation of this file.
1#ifndef VRPN_LOG_H
2#define VRPN_LOG_H
3
11
12public:
13 vrpn_Log(vrpn_TranslationTable* senders, vrpn_TranslationTable* types);
14 ~vrpn_Log(void);
15
16 // ACCESSORS
17 char* getName();
21
22 // MANIPULATORS
23 int open(void);
25
26 int close(void);
28
29 int saveLogSoFar(void);
31
32 int logIncomingMessage(size_t payloadLen, struct timeval time,
33 vrpn_int32 type, vrpn_int32 sender,
34 const char* buffer);
37
38 int logOutgoingMessage(vrpn_int32 payloadLen, struct timeval time,
39 vrpn_int32 type, vrpn_int32 sender,
40 const char* buffer);
41
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);
47
48 int setCookie(const char* cookieBuffer);
53
54 int setCompoundName(const char* name, int index);
58
59 int setName(const char* name);
60 int setName(const char* name, size_t len);
61
62 long& logMode(void);
64
65 int addFilter(vrpn_LOGFILTER filter, void* userdata);
66
67 timeval lastLogTime();
69
70protected:
71 int checkFilters(vrpn_int32 payloadLen, struct timeval time,
72 vrpn_int32 type, vrpn_int32 sender, const char* buffer);
73
76
79
80 FILE* d_file;
81
83
85
87
88 vrpn_TranslationTable* d_senders;
89 vrpn_TranslationTable* d_types;
90
92};
93
94#endif // VRPN_LOG_H
Logs a VRPN stream.
Definition vrpn_Log.h:10
vrpn_bool d_wroteMagicCookie
Definition vrpn_Log.h:84
long d_logmode
Definition vrpn_Log.h:75
char * d_logFileName
Definition vrpn_Log.h:74
FILE * d_file
Definition vrpn_Log.h:80
vrpn_LOGLIST * d_logTail
Definition vrpn_Log.h:77
vrpn_TranslationTable * d_senders
Definition vrpn_Log.h:88
vrpn_TranslationTable * d_types
Definition vrpn_Log.h:89
timeval d_lastLogTime
Definition vrpn_Log.h:91
char * d_magicCookie
Definition vrpn_Log.h:82
vrpnLogFilterEntry * d_filters
Definition vrpn_Log.h:86
vrpn_LOGLIST * d_firstEntry
Definition vrpn_Log.h:78
Placed here so vrpn_FileConnection can use it too.
#define VRPN_API
class VRPN_API vrpn_Log
vrpn_MESSAGEHANDLER vrpn_LOGFILTER
Type of handler for filters on logfiles is the same as connection handler.