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

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. 更多...

#include <vrpn_Connection.h>

+ 类 vrpn_Connection_Loopback 继承关系图:
+ vrpn_Connection_Loopback 的协作图:

Public 成员函数

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
 
- Public 成员函数 继承自 vrpn_Connection
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_Connectionget_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)
 

Protected 成员函数

 vrpn_Connection_Loopback ()
 
virtual int send_pending_reports (void)
 send pending report, clear the buffer.
 
- Protected 成员函数 继承自 vrpn_Connection
 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)
 

友元

VRPN_API vrpn_Connectionvrpn_create_server_connection (const char *cname, const char *local_in_logfile_name=NULL, const char *local_out_logfile_name=NULL)
 Create a server connection of arbitrary type (VRPN UDP/TCP, TCP, File, Loopback, MPI).
 

额外继承的成员函数

- Public 属性 继承自 vrpn_Connection
vrpn_TypeDispatcher * d_dispatcher
 
- 静态 Protected 成员函数 继承自 vrpn_Connection
static vrpn_Endpoint_IPallocateEndpoint (vrpn_Connection *, vrpn_int32 *connectedEC)
 
static int VRPN_CALLBACK handle_log_message (void *userdata, vrpn_HANDLERPARAM p)
 Routines that handle system messages
 
static int VRPN_CALLBACK handle_disconnect_message (void *userdata, vrpn_HANDLERPARAM p)
 
- Protected 属性 继承自 vrpn_Connection
vrpn_uint32 d_stop_processing_messages_after
 
int connectionStatus
 Status of the connection
 
vrpn::BoundEndpointAllocator d_boundEndpointAllocator
 
vrpn::EndpointContainer d_endpoints
 
vrpn_int32 d_numConnectedEndpoints
 
timeval start_time
 Timekeeping - TCH 30 June 98
 
int d_serverLogCount
 
vrpn_int32 d_serverLogMode
 
char * d_serverLogName
 
vrpn_bool d_updateEndpoint
 

详细描述

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_Connection_Loopback()

vrpn_Connection_Loopback ( )
protected

Make a client connection. To access this from user code, call vrpn_create_server_connection() with a service name of 'loopback:'. For now, we don't enable logging on a Loopback connection.

成员函数说明

◆ connected()

virtual vrpn_bool connected ( void ) const
inlinevirtual

Returns vrpn_true if the connection has been established, vrpn_false if not (For a networkless connection, this is equivalent to doing_okay()).

重载 vrpn_Connection .

◆ doing_okay()

virtual vrpn_bool doing_okay ( void ) const
inlinevirtual

Returns vrpn_true if the connection is okay, vrpn_false if not

重载 vrpn_Connection .

◆ mainloop()

virtual int mainloop ( const struct timeval * timeout = NULL)
virtual

Call each time through program main loop to handle receiving any incoming messages and sending any packed messages. Returns -1 on error, 0 otherwise. Optional argument is TOTAL time to block on select() calls; there may be multiple calls to select() per call to mainloop(), and this timeout will be divided evenly between them.

实现了 vrpn_Connection.

◆ send_pending_reports()

virtual int send_pending_reports ( void )
inlineprotectedvirtual

send pending report, clear the buffer.

This function was protected, now is public, so we can use it to send out intermediate results without calling mainloop

实现了 vrpn_Connection.

友元及相关符号说明

◆ vrpn_create_server_connection

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


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