RflySimSDK v4.01
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_Mutex_Remote类 参考
类 vrpn_Mutex_Remote 继承关系图:
vrpn_Mutex_Remote 的协作图:

struct  mutexCallback

Public 成员函数

 vrpn_Mutex_Remote (const char *name, vrpn_Connection *=NULL)
vrpn_bool isAvailable (void) const
vrpn_bool isHeldLocally (void) const
vrpn_bool isHeldRemotely (void) const
void request (void)
void release (void)
vrpn_bool addRequestGrantedCallback (void *userdata, int(*)(void *))
 These callbacks are triggered when OUR request is granted.
vrpn_bool addRequestDeniedCallback (void *userdata, int(*)(void *))
 These callbacks are triggered when OUR request is denied.
vrpn_bool addTakeCallback (void *userdata, int(*)(void *))
 These callbacks are triggered when ANY peer gets the mutex.
vrpn_bool addReleaseCallback (void *userdata, int(*)(void *))
Public 成员函数 继承自 vrpn_Mutex
 vrpn_Mutex (const char *name, vrpn_Connection *=NULL)
void mainloop (void)

Protected 类型

enum  state { OURS , REQUESTING , AVAILABLE , HELD_REMOTELY }

Protected 成员函数

void requestIndex (void)
void triggerGrantCallbacks (void)
void triggerDenyCallbacks (void)
void triggerTakeCallbacks (void)
void triggerReleaseCallbacks (void)
Protected 成员函数 继承自 vrpn_Mutex
void sendRequest (vrpn_int32 index)
void sendRelease (void)
void sendReleaseNotification (void)
void sendGrantRequest (vrpn_int32 index)
void sendDenyRequest (vrpn_int32 index)

静态 Protected 成员函数

static int VRPN_CALLBACK handle_grantRequest (void *, vrpn_HANDLERPARAM)
static int VRPN_CALLBACK handle_denyRequest (void *, vrpn_HANDLERPARAM)
static int VRPN_CALLBACK handle_releaseNotification (void *, vrpn_HANDLERPARAM)
static int VRPN_CALLBACK handle_initialize (void *, vrpn_HANDLERPARAM)
static int VRPN_CALLBACK handle_gotConnection (void *, vrpn_HANDLERPARAM)

Protected 属性

state d_state
vrpn_int32 d_myIndex
vrpn_bool d_requestBeforeInit
mutexCallbackd_reqGrantedCB
mutexCallbackd_reqDeniedCB
mutexCallbackd_takeCB
mutexCallbackd_releaseCB
Protected 属性 继承自 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

成员函数说明

◆ addReleaseCallback()

vrpn_bool addReleaseCallback ( void * userdata,
int(*  )(void *) )

These callbacks are triggered when ANY peer releases the mutex.

◆ addRequestDeniedCallback()

vrpn_bool addRequestDeniedCallback ( void * userdata,
int(*  )(void *) )

These callbacks are triggered when OUR request is denied.

◆ addRequestGrantedCallback()

vrpn_bool addRequestGrantedCallback ( void * userdata,
int(*  )(void *) )

These callbacks are triggered when OUR request is granted.

◆ addTakeCallback()

vrpn_bool addTakeCallback ( void * userdata,
int(*  )(void *) )

These callbacks are triggered when ANY peer gets the mutex.

◆ isAvailable()

vrpn_bool isAvailable ( void ) const

True from when release() is called or we receive a release message from another process until request() is called or we grant the lock to another process in response to its request message.

◆ isHeldLocally()

vrpn_bool isHeldLocally ( void ) const

True from when RequestGranted callbacks are triggered until release() is called.

◆ isHeldRemotely()

vrpn_bool isHeldRemotely ( void ) const

True from when we grant the lock to another process in response to its request message until we receive a release message from another process.

◆ release()

void release ( void )

Release the distributed lock. Does nothing if !isHeldLocally() and there isn't a request pending.

◆ request()

void request ( void )

Request the distributed lock. Does not request the lock if !isAvailable(), instead automatically triggering DeniedCallbacks.


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