vrpn
07.33
Virtual Reality Peripheral Network
|
Go to the documentation of this file. 1 #ifndef VRPN_SHARED_OBJECT
2 #define VRPN_SHARED_OBJECT
39 vrpn_float64 newValue,
50 vrpn_float64 newValue,
63 void *userdata, vrpn_int32 newValue, timeval when,
66 void *userdata, vrpn_float64 newValue, timeval when,
69 void *userdata,
const char *newValue, timeval when,
75 #define VRPN_SO_DEFAULT 0x00
76 #define VRPN_SO_IGNORE_IDEMPOTENT 0x01
77 #define VRPN_SO_DEFER_UPDATES 0x10
78 #define VRPN_SO_IGNORE_OLD 0x100
131 const char *name(
void)
const;
132 vrpn_bool isSerializer(
void)
const;
147 void becomeSerializer(
void);
199 virtual vrpn_bool shouldSendUpdate(vrpn_bool isLocalSet,
200 vrpn_bool acceptedUpdate);
225 int yankDeferredUpdateCallbacks(
void);
228 void serverPostBindCleanup(
void);
229 void remotePostBindCleanup(
void);
244 void postBindCleanup(
void);
256 vrpn_int32 value(
void)
const;
257 operator vrpn_int32()
const;
277 void *userdata = NULL);
303 virtual vrpn_bool shouldAcceptUpdate(vrpn_int32 newValue, timeval when,
304 vrpn_bool isLocalSet,
308 void sendUpdate(vrpn_int32 newValue, timeval when);
310 void encode(
char **buffer, vrpn_int32 *len, vrpn_int32 newValue,
312 void encodeLamport(
char **buffer, vrpn_int32 *len, vrpn_int32 newValue,
319 void decode(
const char **buffer, vrpn_int32 *len, vrpn_int32 *newValue,
320 timeval *when)
const;
321 void decodeLamport(
const char **buffer, vrpn_int32 *len,
322 vrpn_int32 *newValue, timeval *when,
377 vrpn_float64 value(
void)
const;
378 operator vrpn_float64()
const;
398 void *userdata = NULL);
427 virtual vrpn_bool shouldAcceptUpdate(vrpn_float64 newValue, timeval when,
428 vrpn_bool isLocalSet);
431 void sendUpdate(vrpn_float64 newValue, timeval when);
432 void encode(
char **buffer, vrpn_int32 *len, vrpn_float64 newValue,
434 void decode(
const char **buffer, vrpn_int32 *len, vrpn_float64 *newValue,
435 timeval *when)
const;
479 const char *value(
void)
const;
480 operator const char *()
const;
500 void *userdata = NULL);
529 virtual vrpn_bool shouldAcceptUpdate(
const char *newValue, timeval when,
530 vrpn_bool isLocalSet);
533 void sendUpdate(
const char *newValue, timeval when);
534 void encode(
char **buffer, vrpn_int32 *len,
const char *newValue,
536 void decode(
const char **buffer, vrpn_int32 *len,
char *newValue,
537 timeval *when)
const;
572 #endif // VRPN_SHARED_OBJECT
vrpnSharedIntSerializerPolicy d_policyCallback
vrpn_Connection * d_connection
virtual int handleUpdate(vrpn_HANDLERPARAM)=0
vrpn_int32 d_lamportUpdate_type
vrpnSharedStringCallback handler
vrpnTimedSharedStringCallback handler
class VRPN_API vrpn_Shared_float64
timedCallbackEntry * next
callbackEntry * d_callbacks
vrpn_Shared_String & operator=(const char *newValue)
vrpn_bool d_isNegotiatingSerializer
As long as we have inorder delivery, this should be sufficient to keep us from getting many at once.
int(VRPN_CALLBACK * vrpnTimedSharedIntCallback)(void *userdata, vrpn_int32 newValue, timeval when, vrpn_bool isLocal)
vrpn_bool d_queueSets
If this is true, no set()s are processed; instead, they are queued for later execution....
vrpn_int32 d_requestSerializer_type
Sent to the serializer to assume its duties.
timedCallbackEntry * d_timedCallbacks
callbackEntry * d_callbacks
virtual void bindConnection(vrpn_Connection *)
Every derived class should call this, do what it needs to, and ALSO call {server,remote}PostBindClean...
timedCallbackEntry * next
vrpn_SerializerPolicy d_policy
static int VRPN_CALLBACK handle_lamportUpdate(void *, vrpn_HANDLERPARAM)
int(VRPN_CALLBACK * vrpnTimedSharedStringCallback)(void *userdata, const char *newValue, timeval when, vrpn_bool isLocal)
callbackEntry * d_callbacks
deferredUpdateCallbackEntry * d_deferredUpdateCallbacks
class VRPN_API vrpn_Shared_String
vrpnSharedFloatSerializerPolicy d_policyCallback
vrpn_int32 d_assumeSerializer_type
Sent by a new serializer once it has been notified that its request has been granted.
class VRPN_API vrpn_Shared_int32
int(VRPN_CALLBACK * vrpnSharedIntCallback)(void *userdata, vrpn_int32 newValue, vrpn_bool isLocal)
This structure is what is passed to a vrpn_Connection message callback.
vrpnTimedSharedIntCallback handler
int(VRPN_CALLBACK * vrpnDeferredUpdateCallback)(void *userdata)
vrpn_Shared_int32 & operator=(vrpn_int32 newValue)
int(VRPN_CALLBACK * vrpnSharedFloatSerializerPolicy)(void *userdata, vrpn_float64 newValue, timeval when, vrpn_Shared_float64 *object)
vrpnSharedStringSerializerPolicy d_policyCallback
virtual void sendUpdate(void)=0
Should invoke default sendUpdate() for this derived type.
int(VRPN_CALLBACK * vrpnSharedStringCallback)(void *userdata, const char *newValue, vrpn_bool isLocal)
Generic connection class not specific to the transport mechanism.
int(VRPN_CALLBACK * vrpnSharedFloatCallback)(void *userdata, vrpn_float64 newValue, vrpn_bool isLocal)
timedCallbackEntry * d_timedCallbacks
vrpn_SerializerPolicy d_policy
vrpn_bool d_isSerializer
default to vrpn_TRUE for servers, FALSE for remotes
vrpnTimedSharedFloatCallback handler
vrpn_LamportClock * d_lClock
vrpnDeferredUpdateCallback handler
vrpn_SerializerPolicy d_policy
int(VRPN_CALLBACK * vrpnSharedIntSerializerPolicy)(void *userdata, vrpn_int32 newValue, timeval when, vrpn_Shared_int32 *object)
timedCallbackEntry * d_timedCallbacks
deferredUpdateCallbackEntry * next
vrpn_LamportTimestamp * d_lastLamportUpdate
timedCallbackEntry * next
vrpnSharedFloatCallback handler
int(VRPN_CALLBACK * vrpnTimedSharedFloatCallback)(void *userdata, vrpn_float64 newValue, timeval when, vrpn_bool isLocal)
vrpn_int32 d_grantSerializer_type
Sent by the serializer to grant a request.
vrpn_Shared_float64 & operator=(vrpn_float64 newValue)
static int VRPN_CALLBACK handle_lamportUpdate(void *, vrpn_HANDLERPARAM)
int(VRPN_CALLBACK * vrpnSharedStringSerializerPolicy)(void *userdata, const char *newValue, timeval when, vrpn_Shared_String *object)
int yankCallbacks(vrpn_bool isLocal)
must set d_lastUpdate BEFORE calling yankCallbacks()
vrpnSharedIntCallback handler