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_driver/youbot/YouBotBase.hpp> 00011 #include <youbot_driver/youbot/YouBotManipulator.hpp> 00012 #include <youbot_driver/youbot/DataTrace.hpp> 00013 00014 using namespace youbot; 00015 00019 class YouBotBaseTestWithoutThread : public CppUnit::TestFixture 00020 { 00021 CPPUNIT_TEST_SUITE(YouBotBaseTestWithoutThread); 00022 CPPUNIT_TEST(YouBotBaseTestWithoutThread_PositionMode); 00023 CPPUNIT_TEST(YouBotBaseTestWithoutThread_VelocityMode); 00024 CPPUNIT_TEST(YouBotBaseTestWithoutThread_CurrentMode);CPPUNIT_TEST_SUITE_END() 00025 ; 00026 00027 public: 00028 YouBotBaseTestWithoutThread(); 00029 virtual ~YouBotBaseTestWithoutThread(); 00030 00031 void setUp(); 00032 void tearDown(); 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