- A Logic Circuit Simulation Library in C++





lcs::SystemTimer Class Reference

#include <systime.h>

List of all members.


Detailed Description

A class which manages the timing for the simulation of the digital system built using libLCS. This class is a time keeper which keeps the various other objects in the system updated of the system time.


Static Public Member Functions

static unsigned int getTime (void)
static void notifyTick (TickListener *tl)
static void notifyLine (List< Line * > *refList)
static void stopLineNotification (List< Line * > *refList)
static void notifyClock (Clock *clk)
static void stopClockNotification (void)
static void stopTickNotification (TickListener *tl)

Friends

class Simulation


Member Function Documentation

static unsigned int lcs::SystemTimer::getTime ( void   )  [static]

Returns the system time in system time units

static void lcs::SystemTimer::notifyClock ( Clock clk  )  [static]

The singleton lcs::Clock class object requests time tick notification through this function call.

static void lcs::SystemTimer::notifyLine ( List< Line * > *  refList  )  [static]

A lcs::Line object should request for time tick notification through this function.

Parameters:
l The pointer to a lcs::Line object which desires to be notified of time ticks.

static void lcs::SystemTimer::notifyTick ( TickListener tl  )  [static]

An object which is an instance of a derivative of the class lcs::TickListener can register with the SystemTimer to be notified of time ticks using this function.

Parameters:
tl Pointer to the object which is an instance of a derivative of the class lcs::TickListener

static void lcs::SystemTimer::stopClockNotification ( void   )  [static]

The signleton lcs::Clock class object de-registers from being notified of a time tick through this function call.

static void lcs::SystemTimer::stopLineNotification ( List< Line * > *  refList  )  [static]

A lcs::Line object which requested time tick notification should de-register through a call to this function when it does not need tick notification anymore.

Parameters:
ln The pointer to a lcs::Line object which wants to de-register.

static void lcs::SystemTimer::stopTickNotification ( TickListener tl  )  [static]

A lcs::TickListener derivative which registered to be notified of a time tick should de-register using this function when notification is no longer required. Hence, this function should be called before the object ceases to exist in the simulation system. Else, a segmentation fault is bound to occur.


Friends And Related Function Documentation

friend class Simulation [friend]

lcs::Simulation is friend of this class and manages the duties of starting and stopping the system time keeper.


Copyright © 2006, 2007 Siva Chandra