vrpn 07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_Mutex_Server Class Reference

#include <vrpn_Mutex.h>

Inheritance diagram for vrpn_Mutex_Server:
Collaboration diagram for vrpn_Mutex_Server:

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

Detailed Description

Definition at line 47 of file vrpn_Mutex.h.

Member Enumeration Documentation

◆ state

enum vrpn_Mutex_Server::state
protected
Enumerator
HELD 
FREE 

Definition at line 54 of file vrpn_Mutex.h.

Constructor & Destructor Documentation

◆ vrpn_Mutex_Server()

◆ ~vrpn_Mutex_Server()

Member Function Documentation

◆ handle_dropLastConnection()

int vrpn_Mutex_Server::handle_dropLastConnection ( void *  userdata,
vrpn_HANDLERPARAM   
)
staticprotected

Definition at line 356 of file vrpn_Mutex.C.

References d_state, FREE, and HELD.

Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

◆ handle_gotConnection()

int vrpn_Mutex_Server::handle_gotConnection ( void *  ,
vrpn_HANDLERPARAM   
)
staticprotected

Definition at line 349 of file vrpn_Mutex.C.

Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

◆ handle_release()

int vrpn_Mutex_Server::handle_release ( void *  userdata,
vrpn_HANDLERPARAM   
)
staticprotected

Definition at line 294 of file vrpn_Mutex.C.

References d_state, FREE, and vrpn_Mutex::sendReleaseNotification().

Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

Here is the call graph for this function:

◆ handle_requestIndex()

int vrpn_Mutex_Server::handle_requestIndex ( void *  userdata,
vrpn_HANDLERPARAM  p 
)
staticprotected

Definition at line 309 of file vrpn_Mutex.C.

References vrpn_HANDLERPARAM::payload_len.

Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

◆ handle_requestMutex()

int vrpn_Mutex_Server::handle_requestMutex ( void *  userdata,
vrpn_HANDLERPARAM  p 
)
staticprotected

Definition at line 265 of file vrpn_Mutex.C.

References vrpn_HANDLERPARAM::buffer, d_state, FREE, HELD, vrpn_Mutex::sendDenyRequest(), vrpn_Mutex::sendGrantRequest(), and vrpn_unbuffer().

Referenced by vrpn_Mutex_Server(), and ~vrpn_Mutex_Server().

Here is the call graph for this function:

Member Data Documentation

◆ d_remoteIndex

vrpn_int32 vrpn_Mutex_Server::d_remoteIndex
protected

Counts remotes who have had IDs issued to them.

Definition at line 58 of file vrpn_Mutex.h.

◆ d_state

state vrpn_Mutex_Server::d_state
protected

Definition at line 56 of file vrpn_Mutex.h.

Referenced by handle_dropLastConnection(), handle_release(), and handle_requestMutex().


The documentation for this class was generated from the following files: