RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_Log类 参考

#include <vrpn_Log.h>

+ vrpn_Log 的协作图:

Public 成员函数

 vrpn_Log (vrpn_TranslationTable *senders, vrpn_TranslationTable *types)
 
char * getName ()
 
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 (size_t payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer)
 
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)
 
int setCookie (const char *cookieBuffer)
 
int setCompoundName (const char *name, int index)
 
int setName (const char *name)
 
int setName (const char *name, size_t 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 成员函数

int checkFilters (vrpn_int32 payloadLen, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer)
 

Protected 属性

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_TranslationTable * d_senders
 
vrpn_TranslationTable * d_types
 
timeval d_lastLogTime
 

详细描述

Logs a VRPN stream. Used by vrpn_Endpoint.

成员函数说明

◆ close()

int close ( void )

Closes and saves the log file.

◆ getName()

char * getName ( )

Allocates a new string and copies the log file name to it. IMPORTANT: code calling this function is responsible for freeing the memory.

◆ lastLogTime()

timeval lastLogTime ( )

Returns the time of the last message that was logged

◆ logIncomingMessage()

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.

◆ logMessage()

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 cleverer.

◆ logMode()

long & logMode ( void )

Returns a reference so we can |= it.

◆ open()

int open ( void )

Opens the log file.

◆ saveLogSoFar()

int saveLogSoFar ( void )

Saves any messages logged so far.

◆ setCompoundName()

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>.bar; if there is no period in the name, merely appends -<n>.

◆ setCookie()

int setCookie ( const char * cookieBuffer)

The magic cookie is set to the default value of the version of VRPN compiled, but a more correct value to write in the logfile (if we're logging incoming messages) is that of the version of VRPN we're communicating with.


该类的文档由以下文件生成: