AnimatLab  2
Test
ExternalInputStimulus.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace ExternalStimuli
12  {
13 
14  class ANIMAT_PORT ExternalInputStimulus : public ExternalStimulus
15  {
16  protected:
18  std::string m_strTargetNodeID;
19 
21  std::string m_strInputEquation;
22 
24  CStdPostFixEval *m_lpEval;
25 
27  float m_fltInput;
28 
29  public:
31  virtual ~ExternalInputStimulus();
32 
33  static ExternalInputStimulus *CastToDerived(AnimatBase *lpBase) {return static_cast<ExternalInputStimulus*>(lpBase);}
34 
35  virtual std::string Type();
36 
37  virtual std::string TargetNodeID();
38  virtual void TargetNodeID(std::string strID);
39 
40  virtual float Input();
41  virtual void Input(float fltVal);
42 
43  virtual std::string InputEquation();
44  virtual void InputEquation(std::string strVal);
45 
46  virtual void Load(CStdXml &oXml);
47 
48  virtual void Activate();
49  virtual void Initialize();
50  virtual void StepSimulation();
51  virtual void Deactivate();
52 
53  virtual float *GetDataPointer(const std::string &strDataType);
54  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
55  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
56  };
57 
58  } //ExternalStimuli
59 } //VortexAnimatSim
Root namespace for the base simulation library for AnimatLab.
std::string m_strInputEquation
The post-fix equation that controls the input values to the node.
float m_fltInput
The current input value that will be applied to the node.
CStdPostFixEval * m_lpEval
Pointer to the post-fix evaluator.
std::string m_strTargetNodeID
GUID ID of the target node to enable.
Animat base class.
Definition: AnimatBase.h:36