00001 #ifndef YouBotBaseTestWithoutThread_HPP 00002 #define YouBotBaseTestWithoutThread_HPP 00003 00004 #include <cppunit/TestCase.h> 00005 #include <cppunit/extensions/HelperMacros.h> 00006 00007 #include <iostream> 00008 #include <vector> 00009 #include <signal.h> 00010 #include "youbot/YouBotBase.hpp" 00011 #include "youbot/YouBotManipulator.hpp" 00012 #include "youbot/DataTrace.hpp" 00013 00014 using namespace youbot; 00015 00016 /////////////////////////////////////////////////////////////////////////////// 00017 /// A unit test for one youbot joint communicating without a thread 00018 /////////////////////////////////////////////////////////////////////////////// 00019 class YouBotBaseTestWithoutThread : public CppUnit::TestFixture { 00020 CPPUNIT_TEST_SUITE(YouBotBaseTestWithoutThread); 00021 CPPUNIT_TEST(YouBotBaseTestWithoutThread_PositionMode); 00022 CPPUNIT_TEST(YouBotBaseTestWithoutThread_VelocityMode); 00023 CPPUNIT_TEST(YouBotBaseTestWithoutThread_CurrentMode); 00024 CPPUNIT_TEST_SUITE_END(); 00025 00026 public: 00027 YouBotBaseTestWithoutThread(); 00028 virtual ~YouBotBaseTestWithoutThread(); 00029 00030 void setUp(); 00031 void tearDown(); 00032 00033 00034 void YouBotBaseTestWithoutThread_PositionMode(); 00035 void YouBotBaseTestWithoutThread_VelocityMode(); 00036 void YouBotBaseTestWithoutThread_CurrentMode(); 00037 00038 private: 00039 unsigned int jointNO; 00040 unsigned int stepStartTime; 00041 unsigned int durationNull; 00042 unsigned int overallTime; 00043 unsigned int startTime; 00044 unsigned int updateCycle; 00045 JointAngleSetpoint setAngle; 00046 JointVelocitySetpoint setVel; 00047 JointCurrentSetpoint currentSetpoint; 00048 EthercatMasterInterface* ethercatMaster; 00049 00050 }; 00051 00052 #endif //YouBotBaseTestWithoutThread_HPP