00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00042
00043
00044 #ifndef TACTILE_EDC_ETHERCAT_PROTOCOL_H_INCLUDED
00045 #define TACTILE_EDC_ETHERCAT_PROTOCOL_H_INCLUDED
00046
00047
00048
00049
00050
00051
00052
00053 #define TACTILE_DATA_LENGTH_BYTES_v1 16
00054 #define TACTILE_DATA_LENGTH_WORDS_v1 (TACTILE_DATA_LENGTH_BYTES_v1/2)
00055
00056 typedef union
00057 {
00058 int16u word[TACTILE_DATA_LENGTH_WORDS_v1];
00059 char string[TACTILE_DATA_LENGTH_BYTES_v1];
00060 }TACTILE_SENSOR_STATUS_v1;
00061
00062 typedef enum
00063 {
00064 TACTILE_SENSOR_TYPE_WHICH_SENSORS = 0xFFF9,
00065 TACTILE_SENSOR_TYPE_SAMPLE_FREQUENCY_HZ = 0xFFFA,
00066 TACTILE_SENSOR_TYPE_MANUFACTURER = 0xFFFB,
00067 TACTILE_SENSOR_TYPE_SERIAL_NUMBER = 0xFFFC,
00068 TACTILE_SENSOR_TYPE_SOFTWARE_VERSION = 0xFFFD,
00069 TACTILE_SENSOR_TYPE_PCB_VERSION = 0xFFFE,
00070 TACTILE_SENSOR_TYPE_RESET_COMMAND = 0xFFFF
00071 }FROM_TACTILE_SENSOR_TYPE;
00072
00073
00074 typedef enum
00075 {
00076 TACTILE_SENSOR_PROTOCOL_TYPE_INVALID = 0x0000,
00077 TACTILE_SENSOR_PROTOCOL_TYPE_PST3 = 0x0001,
00078 TACTILE_SENSOR_PROTOCOL_TYPE_BIOTAC_2_3 = 0x0002,
00079 TACTILE_SENSOR_PROTOCOL_TYPE_UBI0 = 0x0003,
00080 TACTILE_SENSOR_PROTOCOL_TYPE_CONFLICTING = 0xFFFF
00081 }TACTILE_SENSOR_PROTOCOL_TYPE;
00082
00083
00084 typedef enum
00085 {
00086 AUX_SENSOR_PROTOCOL_TYPE_INVALID = 0x0000,
00087 AUX_SENSOR_PROTOCOL_TYPE_MCP3202 = 0x0001,
00088 AUX_SENSOR_PROTOCOL_TYPE_MCP3204 = 0x0002,
00089 AUX_SENSOR_PROTOCOL_TYPE_MCP3208 = 0x0003
00090
00091 }AUX_SENSOR_PROTOCOL_TYPE;
00092
00093 typedef enum
00094 {
00095 TACTILE_SENSOR_TYPE_PST3_PRESSURE_TEMPERATURE = 0x0000,
00096 TACTILE_SENSOR_TYPE_PST3_PRESSURE_RAW_ZERO_TRACKING = 0x0002,
00097 TACTILE_SENSOR_TYPE_PST3_DAC_VALUE = 0x0004
00098 }FROM_TACTILE_SENSOR_TYPE_PST3;
00099
00100 typedef enum
00101 {
00102 TACTILE_SENSOR_TYPE_UBI0_INVALID = 0x0000,
00103 TACTILE_SENSOR_TYPE_UBI0_TACTILE = 0x0001
00104 }FROM_TACTILE_SENSOR_TYPE_UBI0;
00105
00106 typedef enum
00107 {
00108 TACTILE_SENSOR_TYPE_BIOTAC_INVALID = 0x0000,
00109 TACTILE_SENSOR_TYPE_BIOTAC_PDC = 0x0001,
00110 TACTILE_SENSOR_TYPE_BIOTAC_TAC = 0x0002,
00111 TACTILE_SENSOR_TYPE_BIOTAC_TDC = 0x0003,
00112 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_1 = 0x0004,
00113 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_2 = 0x0005,
00114 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_3 = 0x0006,
00115 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_4 = 0x0007,
00116 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_5 = 0x0008,
00117 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_6 = 0x0009,
00118 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_7 = 0x000A,
00119 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_8 = 0x000B,
00120 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_9 = 0x000C,
00121 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_10 = 0x000D,
00122 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_11 = 0x000E,
00123 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_12 = 0x000F,
00124 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_13 = 0x0010,
00125 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_14 = 0x0011,
00126 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_15 = 0x0012,
00127 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_16 = 0x0013,
00128 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_17 = 0x0014,
00129 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_18 = 0x0015,
00130 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_19 = 0x0016,
00131 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_20 = 0x0017,
00132 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_21 = 0x0018,
00133 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_22 = 0x0019,
00134 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_23 = 0x001A,
00135 TACTILE_SENSOR_TYPE_BIOTAC_ELECTRODE_24 = 0x001B,
00136
00137 FROM_TACTILE_SENSOR_TYPE_BIOTAC_NUM_VALUES = 0x001C
00138 }FROM_TACTILE_SENSOR_TYPE_BIOTAC;
00139
00140
00141 typedef enum
00142 {
00143 TACTILE_SENSOR_TYPE_MCP320x_INVALID = 0x0000,
00144 TACTILE_SENSOR_TYPE_MCP320x_TACTILE = 0x0001
00145 } FROM_TACTILE_SENSOR_TYPE_MCP320x;
00146
00147
00148 typedef struct
00149 {
00150 int16u Pac[2];
00151 int16u other_sensor_0;
00152
00153
00154 struct
00155 {
00156 int8u Pac0 : 1;
00157 int8u Pac1 : 1;
00158 int8u other_sensor_0 : 1;
00159 int8u other_sensor_1 : 1;
00160 }data_valid;
00161
00162 int16u other_sensor_1;
00163
00164
00165 int16u nothing[TACTILE_DATA_LENGTH_WORDS_v1 - 5];
00166 }TACTILE_SENSOR_BIOTAC_DATA_CONTENTS;
00167
00168
00169
00170
00171 #define TACTILE_DATA_LENGTH_BYTES_v2 32
00172 #define TACTILE_DATA_LENGTH_WORDS_v2 (TACTILE_DATA_LENGTH_BYTES_v2/2)
00173
00174
00175 typedef union
00176 {
00177 int16u word[TACTILE_DATA_LENGTH_WORDS_v2];
00178 char string[TACTILE_DATA_LENGTH_BYTES_v2];
00179 }TACTILE_SENSOR_STATUS_v2;
00180
00181 typedef struct
00182 {
00183 int16u distal[TACTILE_DATA_LENGTH_WORDS_v2];
00184 int16u misc;
00185 }TACTILE_SENSOR_UNIBI_DATA_CONTENTS;
00186
00187 typedef union
00188 {
00189 struct
00190 {
00191 int16u middle[4];
00192 int16u proximal[4];
00193 }named;
00194
00195 int16u integers[8];
00196 }TACTILE_SENSOR_MID_PROX;
00197
00198 typedef enum
00199 {
00200 MID_0 = 0,
00201 MID_1 = 1,
00202 MID_2 = 2,
00203 MID_3 = 3,
00204
00205 PROX_0 = 4,
00206 PROX_1 = 5,
00207 PROX_2 = 6,
00208 PROX_3 = 7
00209 }TACTILE_MID_PROX_SENSOR_NUMBERS;
00210
00211
00212 typedef struct
00213 {
00214 int16u sensor[16];
00215 }TACTILE_SENSOR_PALM;
00216
00217
00218 typedef struct
00219 {
00220 int16u sensor[16];
00221 }AUX_SPI_SENSOR;
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253
00254
00255 #endif