SimEngine Class Reference

Abstract class on which all simulation engines are built. More...

#include <SimEngine.h>

Inheritance diagram for SimEngine:

Inheritance graph
[legend]
Collaboration diagram for SimEngine:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimEngine (int id, SpikeScheduler &ss, SimNetwork &net)
 Set up new simulation engine.
virtual ~SimEngine ()
 Destructor.
virtual void reset ()=0
 Reset all sim elements; i.e. set the simulation time back to zero.
virtual void initialize ()=0
 Initializes the engine and all the objects it contains, so that they are ready for simulation.
virtual void advance (int nSteps=1)=0
 Advance all elements by a certain number of time steps.
virtual void advanceSeveralStepsWithinACycle (int nsteps)=0
virtual void finalizeCycle ()=0
virtual void advanceOneFullCycle ()=0
 Advance all elements for one cycle (equal to minDelay time steps).
virtual void addObject (SimObjectFactory const &objFactory, SimObject::ID &id)=0
 Add a new object to the simulation engine.
virtual void mount (const SimObjectFactory &objFactory, const SimObject::ID &mountpoint, SimObject::ID &gid)=0
virtual void insert (const SimObjectFactory &objFactory, const SimObject::ID &container, SimObject::ID &gid)=0
virtual SimObjectgetObject (const SimObject::ID &id)=0
 Get a pointer of a object identified by the id and type.
engineid_t getLocalEid () const
SpikeSchedulergetSpikeScheduler () const
virtual void seed (vector< uint32 > const &noiseSeed)=0
virtual void seed (uint32 noiseSeed)=0
virtual void noiseRandEngineOutput (vector< uint32 > &r)

Protected Attributes

int default_steps_per_cycle
engineid_t eid
 The ID of the simulation engine.
SpikeSchedulerspikeScheduler
 The spike scheduler to use.
SimNetworknetwork

Friends

class SimObject

Classes

class  ID


Detailed Description

Abstract class on which all simulation engines are built.

Definition at line 23 of file SimEngine.h.


Constructor & Destructor Documentation

SimEngine::SimEngine ( int  id,
SpikeScheduler ss,
SimNetwork net 
)

Set up new simulation engine.

Definition at line 8 of file SimEngine.cpp.

virtual SimEngine::~SimEngine (  )  [inline, virtual]

Destructor.

Definition at line 70 of file SimEngine.h.


Member Function Documentation

virtual void SimEngine::reset (  )  [pure virtual]

Reset all sim elements; i.e. set the simulation time back to zero.

Implemented in DistributedSimEngine, MultiThreadSimEngine, and SingleThreadSimEngine.

Referenced by DistributedSimEngine::reset().

virtual void SimEngine::initialize (  )  [pure virtual]

Initializes the engine and all the objects it contains, so that they are ready for simulation.

Includes reset() operation inside.

Implemented in DistributedSimEngine, MultiThreadSimEngine, and SingleThreadSimEngine.

Referenced by DistributedSingleThreadNetwork::_initialize_(), DistributedMultiThreadNetwork::_initialize_(), and DistributedSimEngine::initialize().

virtual void SimEngine::advance ( int  nSteps = 1  )  [pure virtual]

Advance all elements by a certain number of time steps.

Parameters:
nSteps number of time steps to advance

Implemented in DistributedSimEngine, MultiThreadSimEngine, and SingleThreadSimEngine.

virtual void SimEngine::advanceSeveralStepsWithinACycle ( int  nsteps  )  [pure virtual]

virtual void SimEngine::finalizeCycle (  )  [pure virtual]

virtual void SimEngine::advanceOneFullCycle (  )  [pure virtual]

Advance all elements for one cycle (equal to minDelay time steps).

Implemented in DistributedSimEngine, MultiThreadSimEngine, and SingleThreadSimEngine.

Referenced by DistributedSimEngine::advance(), and DistributedSimEngine::advanceOneFullCycle().

virtual void SimEngine::addObject ( SimObjectFactory const &  objFactory,
SimObject::ID id 
) [pure virtual]

Add a new object to the simulation engine.

Parameters:
obj Pointer to the object to add
id Resulting identifier of the object. id.type and id.localid are set.

Implemented in DistributedSimEngine, MultiThreadSimEngine, and SingleThreadSimEngine.

Referenced by DistributedNetwork::_addObject_(), and DistributedSimEngine::addObject().

virtual void SimEngine::mount ( const SimObjectFactory objFactory,
const SimObject::ID mountpoint,
SimObject::ID gid 
) [pure virtual]

virtual void SimEngine::insert ( const SimObjectFactory objFactory,
const SimObject::ID container,
SimObject::ID gid 
) [pure virtual]

virtual SimObject* SimEngine::getObject ( const SimObject::ID id  )  [pure virtual]

engineid_t SimEngine::getLocalEid (  )  const [inline]

Definition at line 112 of file SimEngine.h.

References eid.

Referenced by SpikeOutputPort::setSpikeByOffsetFraction().

SpikeScheduler* SimEngine::getSpikeScheduler (  )  const [inline]

Definition at line 114 of file SimEngine.h.

References spikeScheduler.

Referenced by SpikeOutputPort::setSpikeByOffsetFraction().

virtual void SimEngine::seed ( vector< uint32 > const &  noiseSeed  )  [pure virtual]

virtual void SimEngine::seed ( uint32  noiseSeed  )  [pure virtual]

virtual void SimEngine::noiseRandEngineOutput ( vector< uint32 > &  r  )  [inline, virtual]

Reimplemented in MultiThreadSimEngine.

Definition at line 118 of file SimEngine.h.


Friends And Related Function Documentation

friend class SimObject [friend]

Definition at line 130 of file SimEngine.h.


Member Data Documentation

The ID of the simulation engine.

Definition at line 125 of file SimEngine.h.

Referenced by SingleThreadSimEngine::advance(), and getLocalEid().


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

Generated on Wed Jul 9 16:34:52 2008 for PCSIM by  doxygen 1.5.5