AnimatLab  2
Test
CsSpikingCurrentSynapse.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatCarlSim
10 {
11 
22  class ANIMAT_CARL_SIM_PORT CsSpikingCurrentSynapse : public AnimatSim::Link
23  {
24  protected:
26  std::string m_strFromID;
27 
29  std::string m_strToID;
30 
33 
36 
39 
42 
45 
47  float m_fltPulseTC;
48 
51 
53  CStdMap<int, int> m_aryCells;
54 
57 
60 
61  //Keeps track of the current Test time to check for spikes
62  unsigned long m_ulSpikeTestTime;
63 
66 
69 
72 
73  long m_lTotalSpikesAdded;
74 
75  CStdArray<long> m_arySpikeTimes;
76 
77  virtual void LoadCells(CStdXml &oXml);
78 
79  virtual void ProcessSpikes();
80  virtual void CalculateStepsPerTest();
81 
82  virtual void MonitorSpikeEventFired(int iGroupID, int iNeuronID, long lTimeIdx);
83 
84 #ifndef STD_DO_NOT_ADD_BOOST
85  //Signal for when a spike occurs
86  boost::signals2::connection m_MonitoredSpikeEvent;
87 
89  boost::interprocess::interprocess_mutex m_AccessSpikes;
90 #endif
91 
92  public:
94  virtual ~CsSpikingCurrentSynapse();
95 
96  static CsSpikingCurrentSynapse *CastToDerived(AnimatBase *lpBase) {return static_cast<CsSpikingCurrentSynapse*>(lpBase);}
97 
98  virtual void PulseDecay(float fltVal);
99  virtual float PulseDecay();
100 
101  virtual void PulseCurrent(float fltVal);
102  virtual float PulseCurrent();
103 
104  virtual void Coverage(std::string strType);
105 
106  virtual bool WholePopulation();
107  virtual void WholePopulation(bool bVal);
108 
109  virtual void Cells(std::string strXml);
110 
119  CsNeuronGroup *FromNeuron() {return m_lpFromNeuron;};
120 
121 #pragma region DataAccesMethods
122  virtual float *GetDataPointer(const std::string &strDataType);
123  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
124  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
125 #pragma endregion
126 
127  virtual void TimeStepModified();
128  virtual void VerifySystemPointers();
129  virtual void Initialize();
130  virtual void ResetSimulation();
131  virtual void StepSimulation();
132  virtual void Load(CStdXml &oXml);
133  };
134 
135 } //AnimatCarlSim
Contains the classes for a firing rate neural model.
Definition: CsAdapter.cpp:14
float m_fltDecrementCurrent
The amount by which the current is decremented each step.
float m_fltPulseDecay
The decay rate for which a current pulse.
CStdMap< int, int > m_aryCells
An array of neuron indices for individual neurons we want to stimulate.
float m_fltPulseSign
The sign of the current to apply for a single pulse.
int m_iStepsPerTestCount
Keeps track of how my steps we have take tiil we are ready to test again.
float m_fltAppliedCurrent
The actual applied current with sign.
boost::interprocess::interprocess_mutex m_AccessSpikes
mutex used to try and access matches variable.
float m_fltPulseTC
The exponential decay constant calculated from the time step and decay rate.
AnimatSim::Node * m_lpToNeuron
The pointer to post-synaptic neuron.
CsNeuronGroup * m_lpFromNeuron
The pointer to pre-synaptic neuron.
std::string m_strToID
GUID ID of the pre-synaptic neruon.
Firing Rate Neuron model.
Definition: CsNeuronGroup.h:28
int m_iStepsPerTest
Keeps track of the number of steps till we need to test for spikes to process.
bool m_bWholePopulation
Tells whether this entire population is monitored or just individual cells.
Base class for body parts and neural network nodes.
Definition: Node.h:25
float m_fltCurrentMagnitude
The magnitude of the current applied to the target neuron.
std::string m_strFromID
GUID ID of the pre-synaptic neruon.
CsNeuronGroup * FromNeuron()
Gets the pre-synaptic neuron.
float m_fltPulseMagnitude
The magnitude amount of the current to apply for a single pulse.