AnimatLab  2
Test
CsFiringRateStimulus.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 
10 namespace AnimatCarlSim
11 {
20  class ANIMAT_CARL_SIM_PORT CsFiringRateStimulus : public ExternalStimulus
21  {
22  protected:
24  std::string m_strTargetNodeID;
25 
28 
30  std::string m_strEquation;
31 
33  CStdPostFixEval *m_lpEval;
34 
37 
40 
43 
46 
48  CStdMap<int, int> m_aryCellsToStim;
49 
50  virtual float CalculateFiringRate();
51  virtual void LoadCellsToStim(CStdXml &oXml);
52  virtual void ApplyRateChange();
53 
54  public:
56  virtual ~CsFiringRateStimulus();
57 
58  static CsFiringRateStimulus *CastToDerived(AnimatBase *lpBase) {return static_cast<CsFiringRateStimulus*>(lpBase);}
59 
60  virtual std::string TargetNodeID();
61  virtual void TargetNodeID(std::string strID);
62 
63  virtual std::string Equation();
64  virtual void Equation(std::string strEquation);
65 
66  virtual float ConstantRate();
67  virtual void ConstantRate(float fltVal);
68 
69  virtual float ActiveRate();
70  virtual float PrevAppliedRate();
71 
72  virtual bool RateChanged();
73 
74  virtual void Coverage(std::string strType);
75 
76  virtual bool StimWholePopulation();
77  virtual void StimWholePopulation(bool bVal);
78 
79  virtual void CellsToStim(std::string strXml);
80 
81  virtual void Load(CStdXml &oXml);
82 
83  //ActiveItem overrides
84  virtual void Initialize();
85  virtual void ResetSimulation();
86  virtual void Activate();
87  virtual void StepSimulation();
88  virtual void Deactivate();
89 
90  virtual float *GetDataPointer(const std::string &strDataType);
91  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
92  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
93  };
94 
95 } //VortexAnimatSim
Contains the classes for a firing rate neural model.
Definition: CsAdapter.cpp:14
bool m_bStimWholePopulation
Tells whether this stimulus is applied to the entire population or just individual cells...
CStdPostFixEval * m_lpEval
Pointer to the post-fix equation evaluator.
std::string m_strTargetNodeID
GUID ID of the neuron we are stimulating.
float m_fltActiveRate
The currently active firing rate.
Current stimulus for neural items.
float m_fltConstantRate
The value to use for active rate if the type is constant.
float m_fltPrevAppliedRate
The previous active firing rate.
std::string m_strEquation
The post-fix string current equation.
CsSpikeGeneratorGroup * m_lpSpikeGen
The spike generator this object is stimulating.
CStdMap< int, int > m_aryCellsToStim
An array of neuron indices for individual neurons we want to stimulate.