00001 /* 00002 * Copyright (c) 2003 IPR, University of Karlsruhe (TH), all rights reserved 00003 * Copyright (c) 2008 SCHUNK GmbH & Co. KG 00004 * Copyright (c) 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA) 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 //====================================================================== 00050 //====================================================================== 00051 00052 00053 #ifndef _SDH_COMMAND_CODES 00054 #define _SDH_COMMAND_CODES 00055 00056 //---------------------------------------------------------------------- 00057 // System Includes - include with <> 00058 //---------------------------------------------------------------------- 00059 00060 00061 //---------------------------------------------------------------------- 00062 // Project Includes - include with "" 00063 //---------------------------------------------------------------------- 00064 00065 //---------------------------------------------------------------------- 00066 // Defines, enums, unions, structs 00067 //---------------------------------------------------------------------- 00068 00069 #define USE_CMD_TEST 0 00070 00071 00072 // since this file is included by other compilers which dont understand 00073 // attributes we can only use it if SDH__attribute__ is not yet defined 00074 #ifndef SDH__attribute__ 00075 # define SDH__attribute__( ... ) __attribute__(__VA_ARGS__) 00076 #endif 00077 00078 #ifndef SDH_USE_VCC 00079 # define SDH_USE_VCC 0 00080 #endif 00081 00082 00083 #if SDH_USE_VCC 00084 #pragma pack(push,1) // for VCC (MS Visual Studio) we have to set the necessary 1 byte packing with this pragma 00085 #endif 00086 00097 enum eCommandCodeEnum 00098 { 00099 // Movement commands: 00100 CMDC_V = 128, // assign a value so that non ASCII codes are used 00101 00102 CMDC_VEL, 00103 //130: 00104 CMDC_RVEL, 00105 CMDC_POS, 00106 CMDC_STATE, 00107 CMDC_P, 00108 CMDC_A, 00109 CMDC_M, 00110 CMDC_STOP, 00111 CMDC_VP, 00112 CMDC_CON, 00113 CMDC_TPAP, 00114 //140: 00115 CMDC_TVAV, 00116 00117 // Diagnostic and identification commands: 00118 CMDC_VLIM, 00119 CMDC_ALIM, 00120 CMDC_POS_SAVE, 00121 CMDC_REF, 00122 CMDC_TEMP, 00123 CMDC_ID, 00124 CMDC_SN, 00125 CMDC_VER, 00126 CMDC_VER_DATE, 00127 //150: 00128 CMDC_SOC, 00129 CMDC_SOC_DATE, 00130 CMDC_NUMAXIS, 00131 CMDC_P_MIN, 00132 CMDC_P_MAX, 00133 CMDC_P_OFFSET, 00134 CMDC_GET_DURATION, 00135 00136 // Grip commands: 00137 CMDC_IGRIP, 00138 CMDC_IHOLD, 00139 CMDC_SELGRIP, 00140 //160: 00141 CMDC_GRIP, 00142 00143 // Setup and configuration commands: 00144 CMDC_PID, 00145 CMDC_KV, 00146 CMDC_ILIM, 00147 CMDC_POWER, 00148 00149 // Misc. commands: 00150 CMDC_DEMO, 00151 CMDC_USER_ERRORS, 00152 CMDC_TERMINAL, 00153 CMDC_DEBUG, 00154 CMDC_USE_FIXED_LENGTH, 00155 //170: 00156 CMDC_CHANGE_RS232, 00157 CMDC_CHANGE_CHANNEL, 00158 00159 #if USE_CMD_TEST 00160 00161 CMDC_TEST, 00162 #endif 00163 } SDH__attribute__((packed)); 00164 00166 typedef enum eCommandCodeEnum eCommandCode; 00167 00168 #if SDH_USE_VCC 00169 #pragma pack(pop) // for VCC (MS Visual Studio) restore normal packing 00170 #endif 00171 00172 //---------------------------------------------------------------------- 00173 // Global variables (declarations) 00174 //---------------------------------------------------------------------- 00175 00176 //---------------------------------------------------------------------- 00177 // External functions (function declarations) 00178 //---------------------------------------------------------------------- 00179 00180 //---------------------------------------------------------------------- 00181 // Function prototypes (function declarations) 00182 //---------------------------------------------------------------------- 00183 00184 00185 #endif 00186 00187 00188 //====================================================================== 00189 /* 00190 Here are some settings for the emacs/xemacs editor (and can be safely ignored): 00191 (e.g. to explicitely set C++ mode for *.h header files) 00192 00193 Local Variables: 00194 mode:C 00195 mode:ELSE 00196 End: 00197 */ 00198 //======================================================================