vrpn
07.35
Virtual Reality Peripheral Network
Loading...
Searching...
No Matches
vrpn_LamportClock.h
Go to the documentation of this file.
1
#ifndef VRPN_LAMPORT_CLOCK_H
2
#define VRPN_LAMPORT_CLOCK_H
3
4
#include "
vrpn_Configure.h
"
// for VRPN_API
5
#include "
vrpn_Types.h
"
// for vrpn_uint32, vrpn_bool
6
10
15
16
class
VRPN_API
vrpn_LamportTimestamp
{
17
18
public
:
19
20
vrpn_LamportTimestamp
(
int
vectorLength, vrpn_uint32 * vector);
21
vrpn_LamportTimestamp
(
const
vrpn_LamportTimestamp
&);
22
~vrpn_LamportTimestamp
(
void
);
23
24
vrpn_LamportTimestamp
& operator = (
const
vrpn_LamportTimestamp
&);
25
26
27
// ACCESSORS
28
29
30
vrpn_bool
operator <
(
const
vrpn_LamportTimestamp
& r)
const
;
34
35
36
// Utility functions.
37
38
vrpn_uint32 operator [] (
int
i)
const
;
40
41
int
size (
void
)
const
;
43
44
45
private
:
46
47
void
copy (
const
vrpn_uint32 *);
50
51
int
d_timestampSize;
52
vrpn_uint32 * d_timestamp;
53
54
vrpn_LamportTimestamp
(
void
);
56
57
};
58
59
60
class
VRPN_API
vrpn_LamportClock
{
61
62
public
:
63
64
vrpn_LamportClock
(
int
numHosts,
int
ourIndex);
65
~vrpn_LamportClock
(
void
);
66
67
68
// MANIPULATORS
69
70
71
void
receive (
const
vrpn_LamportTimestamp
&);
74
75
vrpn_LamportTimestamp
* getTimestampAndAdvance (
void
);
77
78
79
private
:
80
81
int
d_numHosts;
82
int
d_ourIndex;
83
vrpn_uint32 * d_currentTimestamp;
84
85
};
86
87
88
89
#endif
// VRPN_LAMPORT_CLOCK_H
90
91
vrpn_LamportClock
Implements a distributed event clock as defined by Leslie Lamport in some seminal papers I can't find...
Definition
vrpn_LamportClock.h:60
vrpn_LamportTimestamp
Timestamp for a single event, produced by a vrpn_LamportClock and hopefully generally usable in place...
Definition
vrpn_LamportClock.h:16
vrpn_Configure.h
VRPN_API
#define VRPN_API
Definition
vrpn_Configure.h:648
operator<
bool operator<(const SensorInfo &a, const SensorInfo &b)
Definition
vrpn_Tracker_PhaseSpace.C:76
vrpn_Types.h
vrpn_LamportClock.h
Generated by
1.9.8