00001
00002 #ifndef INCLUDED_RobotInfo_h
00003 #define INCLUDED_RobotInfo_h
00004
00005 #include <map>
00006 #include <string>
00007
00008
00009
00010 #if TGT_ERS210
00011 # include "Shared/ERS210Info.h"
00012 namespace RobotInfo { using namespace ERS210Info; }
00013
00014 #elif TGT_ERS220
00015 # include "Shared/ERS220Info.h"
00016 namespace RobotInfo { using namespace ERS220Info; }
00017
00018 #elif TGT_ERS2xx
00019 # include "Shared/ERS2xxInfo.h"
00020 namespace RobotInfo { using namespace ERS2xxInfo; }
00021
00022 #elif TGT_ERS7
00023 # include "Shared/ERS7Info.h"
00024 namespace RobotInfo { using namespace ERS7Info; }
00025
00026 #elif TGT_LYNXARM6
00027 # include "Shared/LynxArm6Info.h"
00028 namespace RobotInfo { using namespace LynxArm6Info; }
00029
00030 #elif TGT_REGIS1
00031 # include "Shared/Regis1Info.h"
00032 namespace RobotInfo { using namespace Regis1Info; }
00033
00034 #elif TGT_QBOTPLUS
00035 # include "Shared/QBotPlusInfo.h"
00036 namespace RobotInfo { using namespace QBotPlusInfo; }
00037
00038 #elif TGT_QWERK
00039 # include "Shared/QwerkInfo.h"
00040 namespace RobotInfo { using namespace QwerkInfo; }
00041
00042 #elif TGT_CREATE
00043 # include "Shared/CreateInfo.h"
00044 namespace RobotInfo { using namespace CreateInfo; }
00045
00046 #else //default case, currently ERS-7
00047 # warning "TGT_<model> undefined or unknown model set - defaulting to ERS7"
00048 # include "Shared/ERS7Info.h"
00049 namespace RobotInfo { using namespace ERS7Info; }
00050 #endif //model selection
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 namespace RobotInfo {
00061
00062
00063
00064
00065
00066
00067
00068
00069 inline Capabilities* getCapabilities(const std::string& robName) {
00070 const std::map<std::string, class Capabilities*>& caps = Capabilities::getCaps();
00071 std::map<std::string, class Capabilities*>::const_iterator it = caps.find(robName);
00072 return it==caps.end() ? NULL : it->second;
00073 }
00074
00075 }
00076
00077 using namespace RobotInfo;
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 #endif