Constructor for a Loopback connection that will basically just pass messages between objects that are connected to it. It offers no external connections, via IP or any other mechanism. It is useful if you want to make the client and server in the same connection and you don't need to have anything else connect.
更多...
|
virtual int | mainloop (const struct timeval *timeout=NULL) |
|
virtual vrpn_bool | doing_okay (void) const |
| Returns vrpn_true if the connection is okay, vrpn_false if not
|
|
virtual vrpn_bool | connected (void) const |
|
void | get_log_names (char **local_in_logname, char **local_out_logname, char **remote_in_logname, char **remote_out_logname) |
|
virtual vrpn_int32 | register_sender (const char *name) |
|
virtual vrpn_int32 | register_message_type (const char *name) |
|
virtual int | register_handler (vrpn_int32 type, vrpn_MESSAGEHANDLER handler, void *userdata, vrpn_int32 sender=vrpn_ANY_SENDER) |
|
virtual int | unregister_handler (vrpn_int32 type, vrpn_MESSAGEHANDLER handler, void *userdata, vrpn_int32 sender=vrpn_ANY_SENDER) |
|
virtual int | pack_message (vrpn_uint32 len, struct timeval time, vrpn_int32 type, vrpn_int32 sender, const char *buffer, vrpn_uint32 class_of_service) |
|
virtual int | time_since_connection_open (struct timeval *elapsed_time) |
|
virtual timeval | get_time () |
|
virtual const char * | sender_name (vrpn_int32 sender) |
|
virtual const char * | message_type_name (vrpn_int32 type) |
|
virtual int | register_log_filter (vrpn_LOGFILTER filter, void *userdata) |
| Sets up a filter function for logging. Any user message to be logged is first passed to this function, and will only be logged if the function returns zero (XXX). NOTE: this only affects local logging - remote logging is unfiltered! Only user messages are filtered; all system messages are logged. Returns nonzero on failure.
|
|
virtual int | save_log_so_far () |
| Save any messages on any endpoints which have been logged so far.
|
|
virtual vrpn_File_Connection * | get_File_Connection (void) |
|
void | Jane_stop_this_crazy_thing (vrpn_uint32 stop_looking_after) |
|
vrpn_uint32 | get_Jane_value (void) |
|
void | addReference () |
| Counting references to this connection.
|
|
void | removeReference () |
|
void | setAutoDeleteStatus (bool setvalue) |
|
|
| vrpn_Connection_Loopback () |
|
virtual int | send_pending_reports (void) |
| send pending report, clear the buffer.
|
|
| vrpn_Connection (const char *local_in_logfile_name, const char *local_out_logfile_name, vrpn_EndpointAllocator epa=allocateEndpoint) |
|
| vrpn_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_EndpointAllocator epa=allocateEndpoint) |
|
int | delete_endpoint (vrpn_Endpoint *endpoint) |
|
int | compact_endpoints (void) |
|
virtual int | pack_sender_description (vrpn_int32 which) |
| Send the sender description to ALL endpoints.
|
|
virtual int | pack_type_description (vrpn_int32 which) |
| Send the type description to ALL endpoints.
|
|
virtual int | do_callbacks_for (vrpn_int32 type, vrpn_int32 sender, struct timeval time, vrpn_uint32 len, const char *buffer) |
|
int | message_type_is_registered (const char *) const |
| Returns message type ID, or -1 if unregistered
|
|
int | doSystemCallbacksFor (vrpn_HANDLERPARAM, void *) |
|
virtual void | updateEndpoints (void) |
|
Constructor for a Loopback connection that will basically just pass messages between objects that are connected to it. It offers no external connections, via IP or any other mechanism. It is useful if you want to make the client and server in the same connection and you don't need to have anything else connect.
VRPN_API vrpn_Connection * vrpn_create_server_connection |
( |
const char * | cname, |
|
|
const char * | local_in_logfile_name = NULL, |
|
|
const char * | local_out_logfile_name = NULL ) |
|
friend |
Create a server connection of arbitrary type (VRPN UDP/TCP, TCP, File, Loopback, MPI).
Returns NULL if the name is not understood or the connection cannot be created. WARNING: May not be thread safe. To create a VRPN TCP/UDP server, use a name like: vrpn:machine_name_or_ip:port machine_name_or_ip:port machine_name_or_ip :port (This port on any network card.) To create an MPI server, use a name like: mpi:MPI_COMM_WORLD mpi:comm_number When done with the object, call removeReference() on it (which will delete it if there are no other references).