AnimatLab  2
Test
RbFirmataPart.cpp
1 // RbFirmataAnalogInput.cpp: implementation of the RbFirmataAnalogInput class.
2 //
4 
5 #include "StdAfx.h"
6 #include <stdarg.h>
7 #include "RbMovableItem.h"
8 #include "RbBody.h"
9 #include "RbJoint.h"
10 #include "RbMotorizedJoint.h"
11 #include "RbHingeLimit.h"
12 #include "RbHinge.h"
13 #include "RbRigidBody.h"
14 #include "RbStructure.h"
15 #include "RbFirmataPart.h"
16 #include "RbFirmataController.h"
17 
18 namespace RoboticsAnimatSim
19 {
20  namespace Robotics
21  {
22  namespace RobotIOControls
23  {
24  namespace Firmata
25  {
26 
28 // Construction/Destruction
30 
31 RbFirmataPart::RbFirmataPart()
32 {
33  m_lpFirmata = NULL;
34 }
35 
36 RbFirmataPart::~RbFirmataPart()
37 {
38  m_lpFirmata = NULL;
39 }
40 
41 void RbFirmataPart::ParentIOControl(RobotIOControl *lpParent)
42 {
43  RobotPartInterface::ParentIOControl(lpParent);
44 
45  m_lpFirmata = dynamic_cast<RbFirmataController *>(lpParent);
46  if(!m_lpFirmata)
47  THROW_ERROR(Rb_Err_lUnableToObtainFirmataPointer, Rb_Err_strUnableToObtainFirmataPointer);
48 }
49 
50 void RbFirmataPart::SetFirmata(RbFirmataController *lpFirmata) {m_lpFirmata = lpFirmata;}
51 
52 RbFirmataController *RbFirmataPart::GetFirmata() {return m_lpFirmata;}
53 
54  } //Firmata
55  } //RobotIOControls
56  } // Robotics
57 } //RoboticsAnimatSim
58 
Declares the vortex structure class.
Declares the vortex hinge class.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.