Main Page | Namespace List | Alphabetical List | Class List | Directories | File List | Class Members | File Members

PatternManager Class Reference

#include <PatternManager.h>

List of all members.

Public Member Functions

 PatternManager (DBInterface *netDBInterface, DBInterface *pattDBInterface, unsigned int neurGrpID, unsigned int patternGrpID)
 ~PatternManager ()
void fireNeurons ()
void loadPatternData ()
void setNeuronArray (Neuron **neurArr, int neurArrLen)

Private Member Functions

 PatternManager (const PatternManager &)
PatternManager operator= (const PatternManager &)
void fillPatternArray (string &patternString)
void loadPatternGroup (unsigned int pattGrpID)
void unloadPatternGroup ()

Private Attributes

DBInterface * networkDBInterface
DBInterface * patternDBInterface
mysqlpp::Query * patternQuery
mysqlpp::Connection * patternConnection
mysqlpp::ResUse * patternResults
unsigned int neuronGrpID
bool patternLoaded
unsigned int patternGrpID
unsigned int patternType
unsigned int neuronGrpWidth
unsigned int neuronGrpLength
int * patternArray
int patternArrayLength
Neuron ** neuronArray
int numberOfNeurons
bool rotatePattern
vector< unsigned int > patternBuffer [NUMBER_OF_DELAY_VALUES]
unsigned int bufferCounter


Detailed Description

Reads in patterns from the database and applies them to the neurons in this task. Works using its own set of buffers to manage the delays of temporally smeared patterns. These buffers can advance independently of the time step so that the same pattern can be applied for several steps.

Temporal patterns are applied once and then a new pattern is applied after a number of timesteps. Fixed patterns are applied every time step.

Definition at line 47 of file PatternManager.h.


Constructor & Destructor Documentation

PatternManager::PatternManager DBInterface *  netDBInter,
DBInterface *  pattDBInter,
unsigned int  neurGrpID,
unsigned int  pattGrpID
 

Constructor.

Definition at line 38 of file PatternManager.cpp.

References bufferCounter, loadPatternGroup(), networkDBInterface, neuronGrpID, patternConnection, patternDBInterface, patternGrpID, patternLoaded, patternQuery, rotatePattern, and SpikeStreamSimulation::systemError().

PatternManager::~PatternManager  ) 
 

Destructor.

Definition at line 74 of file PatternManager.cpp.

References patternConnection, patternLoaded, patternQuery, and unloadPatternGroup().

PatternManager::PatternManager const PatternManager  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void PatternManager::fillPatternArray string &  patternString  )  [private]
 

Loads the supplied patternArray with the values from the patternString. These are separated with commas.

Definition at line 208 of file PatternManager.cpp.

References patternArray, patternArrayLength, and SpikeStreamSimulation::systemError().

Referenced by loadPatternData().

void PatternManager::fireNeurons  ) 
 

Fires neurons in the neuron array according to the pattern.

Definition at line 96 of file PatternManager.cpp.

References bufferCounter, Neuron::fireNeuron(), neuronArray, patternBuffer, patternLoaded, and patternType.

Referenced by SpikeStreamSimulation::loadSimulationData(), and SpikeStreamSimulation::sendSpikeMessages().

void PatternManager::loadPatternData  ) 
 

Loads pattern data from the database into the pattern buffer. This data will change the firing pattern when fireNeurons() is called.

Definition at line 119 of file PatternManager.cpp.

References bufferCounter, fillPatternArray(), neuronGrpLength, neuronGrpWidth, patternArray, patternBuffer, patternLoaded, patternResults, patternType, rotatePattern, SpikeStreamSimulation::systemError(), and unloadPatternGroup().

Referenced by loadPatternGroup(), and SpikeStreamSimulation::sendSpikeMessages().

void PatternManager::loadPatternGroup unsigned int  pattGrpID  )  [private]
 

Loads up a set of patterns from the database ready to be played back as the simulation progresses.

Definition at line 264 of file PatternManager.cpp.

References loadPatternData(), networkDBInterface, neuronGrpID, neuronGrpLength, neuronGrpWidth, patternArray, patternArrayLength, patternDBInterface, patternGrpID, patternLoaded, patternQuery, patternResults, patternType, rotatePattern, SpikeStreamSimulation::systemError(), and unloadPatternGroup().

Referenced by PatternManager().

PatternManager PatternManager::operator= const PatternManager  )  [private]
 

Declare assignment private so it cannot be used.

void PatternManager::setNeuronArray Neuron **  neurArr,
int  neurArrLen
 

Passes a reference to the array of neurons held in SpikeStreamSimulation.

Definition at line 196 of file PatternManager.cpp.

References neuronArray, and numberOfNeurons.

Referenced by SpikeStreamSimulation::loadSimulationData().

void PatternManager::unloadPatternGroup  )  [private]
 

Unloads the pattern.

Definition at line 360 of file PatternManager.cpp.

References patternArray, patternBuffer, patternGrpID, patternLoaded, and patternResults.

Referenced by loadPatternData(), loadPatternGroup(), and ~PatternManager().


Member Data Documentation

unsigned int PatternManager::bufferCounter [private]
 

The current position in the pattern buffer.

Definition at line 114 of file PatternManager.h.

Referenced by fireNeurons(), loadPatternData(), and PatternManager().

DBInterface* PatternManager::networkDBInterface [private]
 

Definition at line 60 of file PatternManager.h.

Referenced by loadPatternGroup(), and PatternManager().

Neuron** PatternManager::neuronArray [private]
 

Reference to the neuron array in SpikeStreamSimulation.

Definition at line 101 of file PatternManager.h.

Referenced by fireNeurons(), and setNeuronArray().

unsigned int PatternManager::neuronGrpID [private]
 

The id of the neuron group that is being simulated by this task.

Definition at line 76 of file PatternManager.h.

Referenced by loadPatternGroup(), and PatternManager().

unsigned int PatternManager::neuronGrpLength [private]
 

Length of the neuron group.

Definition at line 91 of file PatternManager.h.

Referenced by loadPatternData(), and loadPatternGroup().

unsigned int PatternManager::neuronGrpWidth [private]
 

Width of the neuron group.

Definition at line 88 of file PatternManager.h.

Referenced by loadPatternData(), and loadPatternGroup().

int PatternManager::numberOfNeurons [private]
 

Length of the neuron array in SpikeStreamSimulation.

Definition at line 104 of file PatternManager.h.

Referenced by setNeuronArray().

int* PatternManager::patternArray [private]
 

Array into which the pattern data is loaded from the database by extracting it from a string.

Definition at line 95 of file PatternManager.h.

Referenced by fillPatternArray(), loadPatternData(), loadPatternGroup(), and unloadPatternGroup().

int PatternManager::patternArrayLength [private]
 

The length of the pattern array.

Definition at line 98 of file PatternManager.h.

Referenced by fillPatternArray(), and loadPatternGroup().

vector<unsigned int> PatternManager::patternBuffer[NUMBER_OF_DELAY_VALUES] [private]
 

Holds the neurons that need to be fired at each time point.

Definition at line 111 of file PatternManager.h.

Referenced by fireNeurons(), loadPatternData(), and unloadPatternGroup().

mysqlpp::Connection* PatternManager::patternConnection [private]
 

Need a new connection to the database to be able to use ResUse for the pattern query.

Definition at line 69 of file PatternManager.h.

Referenced by PatternManager(), and ~PatternManager().

DBInterface* PatternManager::patternDBInterface [private]
 

Definition at line 61 of file PatternManager.h.

Referenced by loadPatternGroup(), and PatternManager().

unsigned int PatternManager::patternGrpID [private]
 

Current pattern type.

Definition at line 82 of file PatternManager.h.

Referenced by loadPatternGroup(), PatternManager(), and unloadPatternGroup().

bool PatternManager::patternLoaded [private]
 

Records when a pattern has been loaded.

Definition at line 79 of file PatternManager.h.

Referenced by fireNeurons(), loadPatternData(), loadPatternGroup(), PatternManager(), unloadPatternGroup(), and ~PatternManager().

mysqlpp::Query* PatternManager::patternQuery [private]
 

Store references to query class to enable us to move progressively through the pattern in the database.

Definition at line 65 of file PatternManager.h.

Referenced by loadPatternGroup(), PatternManager(), and ~PatternManager().

mysqlpp::ResUse* PatternManager::patternResults [private]
 

Store references to result class to enable us to move progressively through the pattern in the database.

Definition at line 73 of file PatternManager.h.

Referenced by loadPatternData(), loadPatternGroup(), and unloadPatternGroup().

unsigned int PatternManager::patternType [private]
 

Current pattern type.

Definition at line 85 of file PatternManager.h.

Referenced by fireNeurons(), loadPatternData(), and loadPatternGroup().

bool PatternManager::rotatePattern [private]
 

Is the pattern rotated wrt the neuron group or not?.

Definition at line 108 of file PatternManager.h.

Referenced by loadPatternData(), loadPatternGroup(), and PatternManager().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:24:34 2007 for SpikeStream Simulation by  doxygen 1.4.4