RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_Log.h
1#ifndef VRPN_LOG_H
2#define VRPN_LOG_H
3
10class VRPN_API vrpn_Log {
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
74 char* d_logFileName;
75 long d_logmode;
76
77 vrpn_LOGLIST* d_logTail;
78 vrpn_LOGLIST* d_firstEntry;
79
80 FILE* d_file;
81
82 char* d_magicCookie;
83
84 vrpn_bool d_wroteMagicCookie;
85
86 vrpnLogFilterEntry* d_filters;
87
88 vrpn_TranslationTable* d_senders;
89 vrpn_TranslationTable* d_types;
90
91 timeval d_lastLogTime;
92};
93
94#endif // VRPN_LOG_H
定义 vrpn_Log.h:10
int logIncomingMessage(size_t payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer)
int saveLogSoFar(void)
Saves any messages logged so far.
int setCookie(const char *cookieBuffer)
long & logMode(void)
Returns a reference so we can |= it.
char * getName()
int open(void)
Opens the log file.
int close(void)
Closes and saves the log file.
timeval lastLogTime()
Returns the time of the last message that was logged
int setCompoundName(const char *name, int index)
int logMessage(vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer, vrpn_bool isRemote=VRPN_FALSE)
定义 vrpn_Connection.h:235
Placed here so vrpn_FileConnection can use it too.
定义 vrpn_Connection.h:160