AnimatLab  2
Test
RobotInterface.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Robotics
12  {
13 
24  class ANIMAT_PORT RobotInterface : public AnimatBase
25  {
26  protected:
29  CStdPtrArray<RobotIOControl> m_aryIOControls;
30 
35 
40 
41  virtual RobotIOControl *LoadIOControl(CStdXml &oXml);
42  virtual RobotIOControl *AddIOControl(std::string strXml);
43  virtual void RemoveIOControl(std::string strID, bool bThrowError = true);
44  virtual int FindChildListPos(std::string strID, bool bThrowError = true);
45 
46  public:
47  RobotInterface(void);
48  virtual ~RobotInterface(void);
49 
50  static RobotInterface *CastToDerived(AnimatBase *lpBase) {return static_cast<RobotInterface*>(lpBase);}
51 
52  virtual CStdPtrArray<RobotIOControl>* IOControls();
53 
54  virtual float PhysicsTimeStep();
55  virtual void PhysicsTimeStep(float fltStep);
56 
57  virtual bool SynchSim();
58  virtual void SynchSim(bool bVal);
59 
60  virtual float *GetDataPointer(const std::string &strDataType);
61  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
62  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
63  virtual bool AddItem(const std::string &strItemType, const std::string &strXml, bool bThrowError = true, bool bDoNotInit = false);
64  virtual bool RemoveItem(const std::string &strItemType, const std::string &strID, bool bThrowError = true);
65 
66  virtual void Initialize();
67  virtual void StepSimulation();
68  virtual void ResetSimulation();
69  virtual void AfterResetSimulation();
70  virtual void Load(CStdXml &oXml);
71  };
72 
73  }
74 }
CStdPtrArray< RobotIOControl > m_aryIOControls
Root namespace for the base simulation library for AnimatLab.
A Robot IO controller base class.
Animat base class.
Definition: AnimatBase.h:36
The Robotics interface configures a simulation to run on a microcontroller board. ...