1#ifndef VRPN_FILE_CONNECTION_H
2#define VRPN_FILE_CONNECTION_H
76 const char *local_in_logfile_name = NULL,
77 const char *local_out_logfile_name = NULL);
80 virtual int mainloop(
const timeval *timeout = NULL);
120 int play_to_time(vrpn_float64 end_time);
121 int play_to_time(timeval end_time);
126 int play_to_filetime(
const timeval end_filetime);
133 int playone_to_filetime(timeval end_filetime);
136 timeval get_length();
137 double get_length_secs();
140 timeval get_lowest_user_timestamp();
143 timeval get_highest_user_timestamp();
146 const char *get_filename();
150 int jump_to_time(vrpn_float64 newtime);
151 int jump_to_time(timeval newtime);
155 int jump_to_filetime(timeval absolute_time);
222 timeval d_filetime_accum_since_last_playback;
226 timeval d_time_of_last_accum;
229 vrpn_float32 d_replay_rate;
237 return d_filetime_accum_since_last_playback;
248 void accumulate_to(
const timeval &now_time);
256 void reset_at_time(
const timeval &now_time);
vrpn_Connection(const char *local_in_logfile_name, const char *local_out_logfile_name, vrpn_EndpointAllocator epa=allocateEndpoint)
Constructor for server connection. This cannot be called directly any more because vrpn_Connection is...
virtual int time_since_connection_open(struct timeval *elapsed_time)
Returns the time since the connection opened. Some subclasses may redefine time.
virtual int send_pending_reports(void)=0
send pending report, clear the buffer. This function was protected, now is public,...
virtual vrpn_File_Connection * get_File_Connection(void)
vrpn_File_Connection implements this as "return this" so it can be used to detect a File_Connection a...
void Jane_stop_this_crazy_thing(vrpn_uint32 stop_looking_after)
This function should be seldom used. It is here for the case of the vrpn_Imager, whose servers do not...
virtual int mainloop(const struct timeval *timeout=NULL)=0
Call each time through program main loop to handle receiving any incoming messages and sending any pa...
const timeval & time_of_last_accum(void)
vrpn_float32 replay_rate(void)
const timeval & accumulated(void)
vrpn_LOGLIST * oldCurrentLogEntryPtr
vrpn_LOGLIST * oldCurrentLogEntryCopy
virtual int read_cookie(void)
bool return_to_bookmark()
virtual int close_file(void)
vrpn_int32 d_controllerId
timeval d_highest_user_time
void play_to_user_message()
virtual timeval get_time()
returns the current time in the connection (since the epoch – UTC time).
vrpn_bool d_earliest_user_time_valid
vrpn_float32 get_replay_rate()
int need_to_play(timeval filetime)
vrpn_LOGLIST * d_currentLogEntry
static int VRPN_CALLBACK handle_reset(void *, vrpn_HANDLERPARAM)
static int VRPN_CALLBACK handle_set_replay_rate(void *, vrpn_HANDLERPARAM)
virtual int advance_currentLogEntry(void)
vrpn_int32 d_play_to_time_type
vrpn_File_Connection(const char *station_name, const char *local_in_logfile_name=NULL, const char *local_out_logfile_name=NULL)
FileTime_Accumulator d_filetime_accum
static int VRPN_CALLBACK handle_play_to_time(void *, vrpn_HANDLERPARAM)
timeval d_earliest_user_time
virtual int read_entry(void)
vrpn_int32 d_set_replay_rate_type
void limit_messages_played_back(vrpn_uint32 max_playback)
vrpn_FileBookmark d_bookmark
bool store_stream_bookmark()
vrpn_LOGLIST * d_startEntry
vrpn_bool d_highest_user_time_valid
void find_superlative_user_times()
void set_replay_rate(vrpn_float32 rate)
This structure is what is passed to a vrpn_Connection message callback.
Placed here so vrpn_FileConnection can use it too.
class VRPN_API vrpn_File_Connection
bool vrpn_FILE_CONNECTIONS_SHOULD_ACCUMULATE
bool vrpn_FILE_CONNECTIONS_SHOULD_SKIP_TO_USER_MESSAGES
bool vrpn_FILE_CONNECTIONS_SHOULD_PRELOAD