AnimatLab  2
Test
CurrentStimulus.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 
10 namespace AnimatSim
11 {
12  namespace ExternalStimuli
13  {
29  class ANIMAT_PORT CurrentStimulus : public ExternalStimulus
30  {
31  protected:
33  std::string m_strTargetNodeID;
34 
38 
40  std::string m_strCurrentEquation;
41 
43  CStdPostFixEval *m_lpCurrentOnEval;
44 
46  int m_iType;
47 
50 
53 
56 
59 
62 
63  //There are the durations in time.
66 
69 
72 
75 
76  //The durations are converted to time slice values for easier comparisons.
79 
82 
85 
88 
91 
94 
96  bool m_bCycleOn;
97 
99  bool m_bBurstOn;
100 
101  virtual float GetCurrentOn();
102  virtual void SetSliceData();
103 
104  public:
105  CurrentStimulus();
106  virtual ~CurrentStimulus();
107 
108  static CurrentStimulus *CastToDerived(AnimatBase *lpBase) {return static_cast<CurrentStimulus*>(lpBase);}
109 
110  //virtual int Type();
111  virtual std::string Type();
112  virtual void Type(std::string strValue);
113 
114  virtual void AlwaysActive(bool bVal);
115 
116  virtual std::string TargetNodeID();
117  virtual void TargetNodeID(std::string strID);
118 
119  virtual float CurrentOn();
120  virtual void CurrentOn(float fltVal);
121 
122  virtual float CurrentOff();
123  virtual void CurrentOff(float fltVal);
124 
125  virtual float CurrentBurstOff();
126  virtual void CurrentBurstOff(float fltVal);
127 
128  virtual float CycleOnDuration();
129  virtual void CycleOnDuration(float fltVal);
130 
131  virtual float CycleOffDuration();
132  virtual void CycleOffDuration(float fltVal);
133 
134  virtual float BurstOnDuration();
135  virtual void BurstOnDuration(float fltVal);
136 
137  virtual float BurstOffDuration();
138  virtual void BurstOffDuration(float fltVal);
139 
140  virtual std::string CurrentEquation();
141  virtual void CurrentEquation(std::string strEquation);
142 
143  virtual void Load(CStdXml &oXml);
144 
145  //ActiveItem overrides
146  virtual void Initialize();
147  virtual void ResetSimulation();
148  virtual void Activate();
149  virtual void StepSimulation();
150  virtual void Deactivate();
151 
152  virtual float *GetDataPointer(const std::string &strDataType);
153  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
154  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
155  };
156 
157  } //ExternalStimuli
158 } //VortexAnimatSim
float m_fltCurrentBurstOff
The current to apply when the burst is off.
long m_lCycleOffDuration
Duration of the cycle off period in time slices.
Root namespace for the base simulation library for AnimatLab.
float m_fltBurstOnDuration
Duration of the burst on period in time.
std::string m_strTargetNodeID
GUID ID of the neuron we are stimulating.
long m_lCycleOnDuration
Duration of the cycle on period in time slices.
bool m_bBurstOn
Tells whether a burst is on or not.
float m_fltCycleOnDuration
Duration of the cycle on period in time.
std::string m_strCurrentEquation
The post-fix string current equation.
bool m_bCycleOn
Tells whether a cycle is on or not.
long m_lBurstStart
The time slice where the burst starts.
float m_fltCurrentOff
The current to apply when the cycle is off.
float m_fltBurstOffDuration
Duration of the burst off period in time.
float m_fltInitialActiveCurrent
The initial active current that is used when reseting the simulation.
Current stimulus for neural items.
Animat base class.
Definition: AnimatBase.h:36
long m_lBurstOffDuration
Duration of the burst off period in time slices.
float m_fltCycleOffDuration
Duration of the cycle off period in time.
int m_iType
Tells the type of current to apply. (Constant, Repetitive, Bursting)
CStdPostFixEval * m_lpCurrentOnEval
Pointer to the post-fix equation evaluator.
long m_lBurstOnDuration
Duration of the burst on period in time slices.
float m_fltActiveCurrent
The active current at that time step.
float m_fltCurrentOn
The current to apply when the cycle is on.
long m_lCycleStart
The time slice where the cycle starts.