#include <vrpn_Mutex.h>


Public Member Functions | |
| vrpn_Mutex_Server (const char *name, vrpn_Connection *=NULL) | |
| virtual | ~vrpn_Mutex_Server (void) |
Public Member Functions inherited from vrpn_Mutex | |
| vrpn_Mutex (const char *name, vrpn_Connection *=NULL) | |
| virtual | ~vrpn_Mutex (void)=0 |
| void | mainloop (void) |
Protected Types | |
| enum | state { HELD , FREE } |
Static Protected Member Functions | |
| static int VRPN_CALLBACK | handle_requestIndex (void *, vrpn_HANDLERPARAM) |
| static int VRPN_CALLBACK | handle_requestMutex (void *, vrpn_HANDLERPARAM) |
| static int VRPN_CALLBACK | handle_release (void *, vrpn_HANDLERPARAM) |
| static int VRPN_CALLBACK | handle_gotConnection (void *, vrpn_HANDLERPARAM) |
| static int VRPN_CALLBACK | handle_dropLastConnection (void *, vrpn_HANDLERPARAM) |
Protected Attributes | |
| state | d_state |
| vrpn_int32 | d_remoteIndex |
| Counts remotes who have had IDs issued to them. | |
Protected Attributes inherited from vrpn_Mutex | |
| vrpn_Connection * | d_connection |
| vrpn_int32 | d_myId |
| vrpn_int32 | d_requestIndex_type |
| vrpn_int32 | d_requestMutex_type |
| vrpn_int32 | d_release_type |
| vrpn_int32 | d_releaseNotification_type |
| vrpn_int32 | d_grantRequest_type |
| vrpn_int32 | d_denyRequest_type |
| vrpn_int32 | d_initialize_type |
Additional Inherited Members | |
Protected Member Functions inherited from vrpn_Mutex | |
| void | sendRequest (vrpn_int32 index) |
| void | sendRelease (void) |
| void | sendReleaseNotification (void) |
| void | sendGrantRequest (vrpn_int32 index) |
| void | sendDenyRequest (vrpn_int32 index) |
Definition at line 47 of file vrpn_Mutex.h.
|
protected |
| Enumerator | |
|---|---|
| HELD | |
| FREE | |
Definition at line 54 of file vrpn_Mutex.h.
| vrpn_Mutex_Server::vrpn_Mutex_Server | ( | const char * | name, |
| vrpn_Connection * | c = NULL ) |
Definition at line 225 of file vrpn_Mutex.C.
References vrpn_Mutex::d_release_type, d_remoteIndex, vrpn_Mutex::d_requestIndex_type, vrpn_Mutex::d_requestMutex_type, d_state, FREE, handle_dropLastConnection(), handle_gotConnection(), handle_release(), handle_requestIndex(), handle_requestMutex(), vrpn_Connection::register_handler(), vrpn_Connection::register_message_type(), vrpn_Connection, vrpn_dropped_last_connection, vrpn_got_connection, and vrpn_Mutex::vrpn_Mutex().
Referenced by handle_dropLastConnection(), handle_release(), handle_requestIndex(), and handle_requestMutex().

|
virtual |
Definition at line 246 of file vrpn_Mutex.C.
References vrpn_Mutex::d_connection, vrpn_Mutex::d_release_type, vrpn_Mutex::d_requestIndex_type, vrpn_Mutex::d_requestMutex_type, handle_dropLastConnection(), handle_gotConnection(), handle_release(), handle_requestIndex(), handle_requestMutex(), vrpn_dropped_last_connection, and vrpn_got_connection.

|
staticprotected |
Definition at line 356 of file vrpn_Mutex.C.
References d_state, FREE, HELD, and vrpn_Mutex_Server().
Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

|
staticprotected |
Definition at line 349 of file vrpn_Mutex.C.
Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().
|
staticprotected |
Definition at line 294 of file vrpn_Mutex.C.
References d_state, FREE, vrpn_Mutex::sendReleaseNotification(), and vrpn_Mutex_Server().
Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

|
staticprotected |
Definition at line 309 of file vrpn_Mutex.C.
References vrpn_HANDLERPARAM::buffer, vrpn_Mutex::d_connection, vrpn_Mutex::d_initialize_type, vrpn_Mutex::d_myId, d_remoteIndex, vrpn_Connection::pack_message(), vrpn_HANDLERPARAM::payload_len, vrpn_buffer(), vrpn_CONNECTION_RELIABLE, vrpn_gettimeofday, and vrpn_Mutex_Server().
Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

|
staticprotected |
Definition at line 265 of file vrpn_Mutex.C.
References vrpn_HANDLERPARAM::buffer, d_state, FREE, HELD, vrpn_Mutex::sendDenyRequest(), vrpn_Mutex::sendGrantRequest(), vrpn_Mutex_Server(), and vrpn_unbuffer().
Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

|
protected |
Counts remotes who have had IDs issued to them.
Definition at line 58 of file vrpn_Mutex.h.
Referenced by handle_requestIndex(), and vrpn_Mutex_Server().
|
protected |
Definition at line 56 of file vrpn_Mutex.h.
Referenced by handle_dropLastConnection(), handle_release(), handle_requestMutex(), and vrpn_Mutex_Server().