1#ifndef VRPN_IMAGER_STREAM_BUFFER_H
2#define VRPN_IMAGER_STREAM_BUFFER_H
42 fprintf(stderr,
"vrpn_Message_List::~vrpn_Message_List(): delete failed\n");
92 fprintf(stderr,
"vrpn_Message_List::retrieve_front(): delete failed\n");
166 vrpn_int32 &nDepth, vrpn_int32 &nChannels,
167 const char **channelBuffer)
182 vrpn_int32 nDepth, vrpn_int32 nChannels,
183 const char *channelBuffer)
236 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::get_logfile_request(): delete failed\n");
255 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_request(): delete failed\n");
264 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_request(): delete failed\n");
273 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_request(): delete failed\n");
282 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_request(): delete failed\n");
333 if ((*lil =
new char[strlen(
d_result_lil) + 1]) != NULL) {
340 if ((*lol =
new char[strlen(
d_result_lol) + 1]) != NULL) {
347 if ((*ril =
new char[strlen(
d_result_ril) + 1]) != NULL) {
354 if ((*rol =
new char[strlen(
d_result_rol) + 1]) != NULL) {
375 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_result(): delete failed\n");
384 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_result(): delete failed\n");
393 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_result(): delete failed\n");
402 fprintf(stderr,
"vrpn_Imager_Stream_Shared_State::set_logfile_result(): delete failed\n");
410 if ((
d_result_lil =
new char[strlen(lil) + 1]) != NULL) {
415 if ((
d_result_lol =
new char[strlen(lol) + 1]) != NULL) {
420 if ((
d_result_ril =
new char[strlen(ril) + 1]) != NULL) {
425 if ((
d_result_rol =
new char[strlen(rol) + 1]) != NULL) {
629 const char *local_out_logfile_name,
630 const char *remote_in_logfile_name,
631 const char *remote_out_logfile_name);
702 const char *local_out_logfile_name,
703 const char *remote_in_logfile_name,
704 const char *remote_out_logfile_name);
719 const char *local_out_logfile_name,
720 const char *remote_in_logfile_name,
721 const char *remote_out_logfile_name);
An RAII lock/guard class for vrpn_Semaphore.
vrpn_Auxiliary_Logger_Server(const char *name, vrpn_Connection *c)
Generic connection class not specific to the transport mechanism.
This is the class users deal with: it tells the format and the region data when it arrives.
vrpn_Imager_Server(const char *name, vrpn_Connection *c, vrpn_int32 nCols, vrpn_int32 nRows, vrpn_int32 nDepth=1)
bool teardown_handlers_for_logging_connection(vrpn_Connection *c)
vrpn_int32 got_first_connection_m_id
vrpn_int32 d_server_regionu16_m_id
vrpn_Imager_Stream_Shared_State d_shared_state
vrpn_int32 d_server_begin_frame_m_id
bool setup_handlers_for_logging_connection(vrpn_Connection *c)
bool make_new_logging_connection(const char *local_in_logfile_name, const char *local_out_logfile_name, const char *remote_in_logfile_name, const char *remote_out_logfile_name)
void logging_thread_func(void)
vrpn_int32 d_server_regionu8_m_id
vrpn_Connection * open_new_log_connection(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_Thread * d_logging_thread
static void static_logging_thread_func(vrpn_ThreadData &threadData)
vrpn_int32 d_server_frames_to_send
bool d_ready_to_drop_old_connection
char * d_imager_server_name
virtual void mainloop(void)
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
bool transcode_and_send(const vrpn_HANDLERPARAM &p)
static int VRPN_CALLBACK static_handle_throttle_message(void *userdata, vrpn_HANDLERPARAM p)
vrpn_int32 d_server_end_frame_m_id
vrpn_Imager_Stream_Buffer(const char *name, const char *imager_server_name, vrpn_Connection *c)
static int VRPN_CALLBACK static_handle_server_messages(void *pvISB, vrpn_HANDLERPARAM p)
vrpn_int32 d_server_ping_m_id
vrpn_Imager_Remote * d_imager_remote
vrpn_int32 d_server_description_m_id
virtual void handle_dropped_last_connection(void)
vrpn_int32 d_server_text_m_id
virtual void handle_request_logging_status()
virtual void handle_got_first_connection(void)
static int VRPN_CALLBACK static_handle_request_logging(void *userdata, vrpn_HANDLERPARAM p)
vrpn_Connection * d_log_connection
vrpn_int32 transcode_type(vrpn_int32 type)
vrpn_int32 d_server_discarded_frames_m_id
static int VRPN_CALLBACK static_handle_got_first_connection(void *userdata, vrpn_HANDLERPARAM p)
vrpn_int32 d_server_pong_m_id
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)
vrpn_uint16 d_server_dropped_due_to_throttle
static void VRPN_CALLBACK handle_image_description(void *pvISB, const struct timeval msg_time)
int handle_server_messages(const vrpn_HANDLERPARAM &p)
vrpn_int32 d_server_regionu12in16_m_id
bool stop_logging_thread(void)
vrpn_int32 d_server_regionf32_m_id
vrpn_Message_List d_logger_to_client_messages
bool insert_logger_to_client_message(const vrpn_HANDLERPARAM &p)
void set_logfile_result(const char *lil, const char *lol, const char *ril, const char *rol)
vrpn_Imager_Stream_Shared_State()
vrpn_int32 decrement_frames_in_queue(void)
vrpn_int32 d_frames_in_queue
vrpn_int32 get_logger_to_client_queue_size(void)
bool d_description_updated
void set_logfile_request(const char *lil, const char *lol, const char *ril, const char *rol)
bool get_logfile_result(char **lil, char **lol, char **ril, char **rol)
bool get_logfile_request(char **lil, char **lol, char **ril, char **rol)
vrpn_int32 get_frames_in_queue(void)
bool retrieve_logger_to_client_message(vrpn_HANDLERPARAM *p)
vrpn_int32 d_throttle_count
bool get_imager_description(vrpn_int32 &nRows, vrpn_int32 &nCols, vrpn_int32 &nDepth, vrpn_int32 &nChannels, const char **channelBuffer)
const char * d_channel_buffer
vrpn_int32 increment_frames_in_queue(void)
void set_throttle_request(vrpn_int32 throttle_count)
bool set_imager_description(vrpn_int32 nRows, vrpn_int32 nCols, vrpn_int32 nDepth, vrpn_int32 nChannels, const char *channelBuffer)
bool get_throttle_request(vrpn_int32 *throttle_count)
bool d_new_throttle_request
void get_logfile_names(char **local_in, char **local_out, char **remote_in, char **remote_out)
void time_to_exit(bool do_exit)
bool retrieve_front(vrpn_HANDLERPARAM *p)
unsigned size(void) const
struct d_ELEMENT * d_first
struct d_ELEMENT * d_last
bool insert_back(const vrpn_HANDLERPARAM &p)
This structure is what is passed to a vrpn_Connection message callback.