17#ifndef VRPN_AUXILIARY_LOGGER_H
18#define VRPN_AUXILIARY_LOGGER_H
43 const char *local_in_logfile_name,
44 const char *local_out_logfile_name,
45 const char *remote_in_logfile_name,
46 const char *remote_out_logfile_name);
55 char **local_in_logfile_name,
56 char **local_out_logfile_name,
57 char **remote_in_logfile_name,
58 char **remote_out_logfile_name);
85 const char *local_out_logfile_name,
86 const char *remote_in_logfile_name,
87 const char *remote_out_logfile_name) = 0;
92 const char *local_out_logfile_name,
93 const char *remote_in_logfile_name,
94 const char *remote_out_logfile_name)
101 remote_in_logfile_name, remote_out_logfile_name);
110 virtual void handle_dropped_last_connection(
void);
138 const char *connection_to_log,
149 const char *local_out_logfile_name,
150 const char *remote_in_logfile_name,
151 const char *remote_out_logfile_name);
180typedef struct _vrpn_AUXLOGGERCB {
208 const char *local_out_logfile_name =
"",
209 const char *remote_in_logfile_name =
"",
210 const char *remote_out_logfile_name =
"")
217 remote_in_logfile_name, remote_out_logfile_name);
bool send_logging_status_request()
bool send_logging_request(const char *local_in_logfile_name, const char *local_out_logfile_name="", const char *remote_in_logfile_name="", const char *remote_out_logfile_name="")
virtual int unregister_report_handler(void *userdata, vrpn_AUXLOGGERREPORTHANDLER handler)
static int VRPN_CALLBACK handle_report_message(void *userdata, vrpn_HANDLERPARAM p)
vrpn_Callback_List< vrpn_AUXLOGGERCB > d_callback_list
virtual int register_report_handler(void *userdata, vrpn_AUXLOGGERREPORTHANDLER handler)
vrpn_Auxiliary_Logger_Remote(const char *name, vrpn_Connection *c=NULL)
virtual void mainloop(void)
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
vrpn_Auxiliary_Logger_Server_Generic(const char *logger_name, const char *connection_to_log, vrpn_Connection *c=NULL)
vrpn_Connection * d_logging_connection
virtual void handle_request_logging(const char *local_in_logfile_name, const char *local_out_logfile_name, const char *remote_in_logfile_name, const char *remote_out_logfile_name)
virtual void handle_request_logging_status()
static int VRPN_CALLBACK static_handle_request_logging(void *userdata, vrpn_HANDLERPARAM p)
static int VRPN_CALLBACK static_handle_request_logging_status(void *userdata, vrpn_HANDLERPARAM p)
static int VRPN_CALLBACK static_handle_dropped_last_connection(void *userdata, vrpn_HANDLERPARAM p)
vrpn_int32 dropped_last_connection_m_id
virtual void handle_request_logging_status()=0
virtual void handle_request_logging(const char *local_in_logfile_name, const char *local_out_logfile_name, const char *remote_in_logfile_name, const char *remote_out_logfile_name)=0
virtual void mainloop(void)
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
bool send_report_logging(const char *local_in_logfile_name, const char *local_out_logfile_name, const char *remote_in_logfile_name, const char *remote_out_logfile_name)
vrpn_Auxiliary_Logger_Server(const char *name, vrpn_Connection *c)
vrpn_int32 request_logging_m_id
bool unpack_log_message_from_buffer(const char *buf, vrpn_int32 buflen, char **local_in_logfile_name, char **local_out_logfile_name, char **remote_in_logfile_name, char **remote_out_logfile_name)
bool pack_log_message_of_type(vrpn_int32 type, const char *local_in_logfile_name, const char *local_out_logfile_name, const char *remote_in_logfile_name, const char *remote_out_logfile_name)
vrpn_int32 request_logging_status_m_id
vrpn_Auxiliary_Logger(const char *name, vrpn_Connection *c)
vrpn_int32 report_logging_m_id
vrpn_Connection * d_connection
Connection that this object talks to.
vrpn_MESSAGEHANDLER handler
void server_mainloop(void)
Handles functions that all servers should provide in their mainloop() (ping/pong, for example) Should...
virtual void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
virtual int register_types(void)=0
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.
vrpn_BaseClass(const char *name, vrpn_Connection *c=NULL)
Names the device and assigns or opens connection, calls registration methods.
Generic connection class not specific to the transport mechanism.
const char * remote_out_logfile_name
const char * local_in_logfile_name
const char * local_out_logfile_name
const char * remote_in_logfile_name
This structure is what is passed to a vrpn_Connection message callback.
void(VRPN_CALLBACK * vrpn_AUXLOGGERREPORTHANDLER)(void *userdata, const vrpn_AUXLOGGERCB info)
All types of client/server/peer objects in VRPN should be derived from the vrpn_BaseClass type descri...