00001 #ifdef KINOVAAPIUSBCOMMANDLAYER_EXPORTS 00002 #define KINOVAAPIUSBCOMMANDLAYER_API __declspec(dllexport) 00003 #else 00004 #define KINOVAAPIUSBCOMMANDLAYER_API __declspec(dllimport) 00005 #endif 00006 00007 #include <vector> 00008 #include "KinovaTypes.h" 00009 #include <windows.h> 00010 00011 #define WIN32_LEAN_AND_MEAN 00012 00013 #define ERROR_INIT_API 2001 00014 #define ERROR_LOAD_COMM_DLL 2002 00015 #define JACO_NACK_FIRST 2003 00016 #define JACO_COMM_FAILED 2004 00017 #define JACO_NACK_NORMAL 2005 00018 00019 #define COMMAND_LAYER_VERSION 10001 00020 00026 extern "C" 00027 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetJacoCount(DWORD &); 00028 00033 extern "C" 00034 KINOVAAPIUSBCOMMANDLAYER_API DWORD InitAPI(void); 00035 00040 extern "C" 00041 KINOVAAPIUSBCOMMANDLAYER_API DWORD CloseAPI(void); 00042 00048 extern "C" 00049 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetCodeVersion(std::vector<int> &Response); 00050 00056 extern "C" 00057 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetCartesianPosition(CartesianPosition &Response); 00058 00064 extern "C" 00065 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetAngularPosition(AngularPosition &Response); 00066 00072 extern "C" 00073 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetCartesianForce(CartesianPosition &Response); 00074 00075 00081 extern "C" 00082 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetAngularForce(AngularPosition &Response); 00083 00089 extern "C" 00090 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetAngularCurrent(AngularPosition &Response); 00091 00097 extern "C" 00098 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetActualTrajectoryInfo(TrajectoryPoint &Response); 00099 00105 extern "C" 00106 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetGlobalTrajectoryInfo(TrajectoryFIFO &Response); 00107 00113 extern "C" 00114 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetSensorsInfo(SensorsInfo &Response); 00115 00122 extern "C" 00123 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetSingularityVector(SingularityVector &Response); 00124 00129 extern "C" 00130 KINOVAAPIUSBCOMMANDLAYER_API DWORD SetAngularControl(); 00131 00136 extern "C" 00137 KINOVAAPIUSBCOMMANDLAYER_API DWORD SetCartesianControl(); 00138 00145 extern "C" 00146 KINOVAAPIUSBCOMMANDLAYER_API DWORD StartControlAPI(); 00147 00153 extern "C" 00154 KINOVAAPIUSBCOMMANDLAYER_API DWORD StopControlAPI(); 00155 00160 extern "C" 00161 KINOVAAPIUSBCOMMANDLAYER_API DWORD RestoreFactoryDefault(); 00162 00169 extern "C" 00170 KINOVAAPIUSBCOMMANDLAYER_API DWORD SendJoystickCommand(JoystickCommand joystickCommand); 00171 00179 extern "C" 00180 KINOVAAPIUSBCOMMANDLAYER_API DWORD SendAdvanceTrajectory(TrajectoryPoint trajectory); 00181 00189 extern "C" 00190 KINOVAAPIUSBCOMMANDLAYER_API DWORD SendBasicTrajectory(TrajectoryPoint trajectory); 00191 00197 extern "C" 00198 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetClientConfigurations(ClientConfigurations &config); 00199 00205 extern "C" 00206 KINOVAAPIUSBCOMMANDLAYER_API DWORD SetClientConfigurations(ClientConfigurations config); 00207 00212 extern "C" 00213 KINOVAAPIUSBCOMMANDLAYER_API DWORD EraseAllTrajectories(); 00214 00220 extern "C" 00221 KINOVAAPIUSBCOMMANDLAYER_API DWORD GetPositionCurrentActuators(std::vector<float> &Response); 00222 00231 extern "C" 00232 KINOVAAPIUSBCOMMANDLAYER_API DWORD SetActuatorPID(unsigned int address, float P, float I, float D);