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

Implements a distributed event clock as defined by Leslie Lamport in some seminal papers I can't find my copies of, for use by people who want to sequence events without relying on synchronization of wallclocks. More...

#include <vrpn_LamportClock.h>

Public Member Functions

 vrpn_LamportClock (int numHosts, int ourIndex)
 
 ~vrpn_LamportClock (void)
 
void receive (const vrpn_LamportTimestamp &)
 Updates this clock to reflect a timestamp received from another clock/host.
 
vrpn_LamportTimestampgetTimestampAndAdvance (void)
 Increments the current timestamp and returns it.
 

Detailed Description

Implements a distributed event clock as defined by Leslie Lamport in some seminal papers I can't find my copies of, for use by people who want to sequence events without relying on synchronization of wallclocks.

Definition at line 60 of file vrpn_LamportClock.h.

Constructor & Destructor Documentation

◆ vrpn_LamportClock()

vrpn_LamportClock::vrpn_LamportClock ( int  numHosts,
int  ourIndex 
)

Definition at line 115 of file vrpn_LamportClock.C.

◆ ~vrpn_LamportClock()

vrpn_LamportClock::~vrpn_LamportClock ( void  )

Definition at line 131 of file vrpn_LamportClock.C.

Member Function Documentation

◆ getTimestampAndAdvance()

vrpn_LamportTimestamp * vrpn_LamportClock::getTimestampAndAdvance ( void  )

Increments the current timestamp and returns it.

Definition at line 158 of file vrpn_LamportClock.C.

Referenced by vrpn_Shared_int32::sendUpdate().

◆ receive()

void vrpn_LamportClock::receive ( const vrpn_LamportTimestamp r)

Updates this clock to reflect a timestamp received from another clock/host.

Definition at line 142 of file vrpn_LamportClock.C.

References vrpn_LamportTimestamp::size().

Referenced by vrpn_Shared_int32::handle_lamportUpdate().

Here is the call graph for this function:

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