vrpn  07.33
Virtual Reality Peripheral Network
vrpn_Log.h
Go to the documentation of this file.
1 #ifndef VRPN_LOG_H
2 #define VRPN_LOG_H
3 
11 
12 public:
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 
70 protected:
71  int checkFilters(vrpn_int32 payloadLen, struct timeval time,
72  vrpn_int32 type, vrpn_int32 sender, const char* buffer);
73 
75  long d_logmode;
76 
79 
80  FILE* d_file;
81 
83 
84  vrpn_bool d_wroteMagicCookie;
85 
87 
90 
91  timeval d_lastLogTime;
92 };
93 
94 #endif // VRPN_LOG_H
char * d_magicCookie
Definition: vrpn_Log.h:82
vrpn_LOGLIST * d_firstEntry
Definition: vrpn_Log.h:78
vrpn_bool d_wroteMagicCookie
Definition: vrpn_Log.h:84
class VRPN_API vrpn_Log
Logs a VRPN stream.
Definition: vrpn_Log.h:10
vrpn_TranslationTable * d_senders
Definition: vrpn_Log.h:88
FILE * d_file
Definition: vrpn_Log.h:80
char * d_logFileName
Definition: vrpn_Log.h:74
#define VRPN_API
timeval d_lastLogTime
Definition: vrpn_Log.h:91
class VRPN_API vrpn_TranslationTable
vrpn_MESSAGEHANDLER vrpn_LOGFILTER
Type of handler for filters on logfiles is the same as connection handler.
vrpnLogFilterEntry * d_filters
Definition: vrpn_Log.h:86
long d_logmode
Definition: vrpn_Log.h:75
vrpn_TranslationTable * d_types
Definition: vrpn_Log.h:89
vrpn_LOGLIST * d_logTail
Definition: vrpn_Log.h:77
Placed here so vrpn_FileConnection can use it too.