AnimatLab  2
Test
RbFirmataController.h
1 // RbFirmataController.h: interface for the RbFirmataController class.
2 //
4 
5 #pragma once
6 
7 namespace RoboticsAnimatSim
8 {
9  namespace Robotics
10  {
11  namespace RobotIOControls
12  {
13  namespace Firmata
14  {
15 
17 {
18 protected:
20  std::string m_strComPort;
21 
22  //Baud rate for the connection to the Arduino
23  int m_iBaudRate;
24 
27 
29  unsigned long long m_lMotorSendStart;
30 
31  boost::signals2::connection m_EInitializedConnection;
32  boost::signals2::connection m_EDigitalPinChanged;
33  boost::signals2::connection m_EAnalogPinChanged;
34 
35  virtual void digitalPinChanged(const int & pinNum);
36  virtual void analogPinChanged(const int & pinNum);
37  virtual void setupArduino(const int & version);
38  virtual void ProcessIO();
39  virtual bool OpenIO();
40  virtual void CloseIO();
41 
42 public:
44  virtual ~RbFirmataController();
45 
46  virtual void ComPort(std::string strPort);
47  virtual std::string ComPort();
48 
49  virtual void BaudRate(int iRate);
50  virtual int BaudRate();
51 
52 #pragma region DataAccesMethods
53 
54  virtual float *GetDataPointer(const std::string &strDataType);
55  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
56  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
57 
58 #pragma endregion
59 
60  virtual void ResetSimulation();
61  virtual void Load(StdUtils::CStdXml &oXml);
62 };
63 
64  } //Firmata
65  } //RobotIOControls
66  } // Robotics
67 } //RoboticsAnimatSim
68 
A Robot IO controller base class.
A standard xml manipulation class.
Definition: StdXml.h:19
unsigned long long m_lMotorSendStart
Tick to measure the the timing for sending motor commands.
float m_fltMotorSendTime
The time between when synchronous motor commands are sent.
std::string m_strComPort
Com port for the connection to the Arduino.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.