tactile_edc_ethercat_protocol.h
Go to the documentation of this file.
1 //
2 // © 2010 Shadow Robot Company Limited.
3 //
4 // FileName: tactile_edc_ethercat_protocol.h
5 // Dependencies:
6 // Processor: PIC32
7 // Compiler: MPLAB® C32
8 //
9 // +------------------------------------------------------------------------+
10 // | This file is part of The Shadow Robot PIC32 firmware code base. |
11 // | |
12 // | It is free software: you can redistribute it and/or modify |
13 // | it under the terms of the GNU General Public License as published by |
14 // | the Free Software Foundation, either version 3 of the License, or |
15 // | (at your option) any later version. |
16 // | |
17 // | It is distributed in the hope that it will be useful, |
18 // | but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 // | GNU General Public License for more details. |
21 // | |
22 // | You should have received a copy of the GNU General Public License |
23 // | along with this code repository. The text of the license can be found |
24 // | in Pic32/License/gpl.txt. If not, see <http://www.gnu.org/licenses/>. |
25 // +------------------------------------------------------------------------+
26 //
27 //
28 //
29 // Doxygen
30 // -------
31 //
42 //
43 
44 #ifndef TACTILE_EDC_ETHERCAT_PROTOCOL_H_INCLUDED
45 #define TACTILE_EDC_ETHERCAT_PROTOCOL_H_INCLUDED
46 
47 
48 
49 // ---------------
50 // TACTILE SENSORS
51 // ---------------
52 
53 #define TACTILE_DATA_LENGTH_BYTES_v1 16
54 #define TACTILE_DATA_LENGTH_WORDS_v1 (TACTILE_DATA_LENGTH_BYTES_v1/2)
55 
56 typedef union
57 {
61 
62 typedef enum
63 {
72 
73 
74 typedef enum
75 {
82 
83 
84 typedef enum
85 {
90 
92 
93 typedef enum // Data you can request from PST3s
94 {
99 
100 typedef enum // Data you can request from UBI0 tactiles
101 {
105 
106 typedef enum // Data you can request from BioTacs
107 {
136 
139 
140 
141 typedef enum // Data you can request from MCP320x ADC
142 {
146 
147 
148 typedef struct
149 {
150  int16u Pac[2];
152  //int16u other_sensor_1; #ERROR NO! Do not place this here
153 
154  struct
155  {
156  int8u Pac0 : 1;
157  int8u Pac1 : 1;
160  }data_valid;
161 
162  int16u other_sensor_1; // This is placed here to make this struct backwards compatible
163  // with older versions of the host side driver.
164 
167 
168 
169 // Length for Univ. Bielefeld tactile sensors
170 
171 #define TACTILE_DATA_LENGTH_BYTES_v2 32
172 #define TACTILE_DATA_LENGTH_WORDS_v2 (TACTILE_DATA_LENGTH_BYTES_v2/2)
173 
174 
175 typedef union
176 {
180 
181 typedef struct
182 {
186 
187 typedef union
188 {
189  struct
190  {
191  int16u middle[4];
192  int16u proximal[4];
193  }named;
194 
195  int16u integers[8];
197 
198 typedef enum
199 {
200  MID_0 = 0,
201  MID_1 = 1,
202  MID_2 = 2,
203  MID_3 = 3,
204 
205  PROX_0 = 4,
206  PROX_1 = 5,
207  PROX_2 = 6,
208  PROX_3 = 7
210 
211 
212 typedef struct
213 {
214  int16u sensor[16];
216 
217 
218 typedef struct
219 {
220  int16u sensor[16];
222 
223 
224 
225 /*
226 #ifndef NO_STRINGS
227 
228  static const char* tactile_sensor_shadow_type_strings[4] = { "None",
229  "Pressure Sensor Tactile",
230  "6 Axis"};
231 
232  static const char* tactile_sensor_syntouch_type_strings[4] = { "None",
233  "BioTac 2.3"};
234 
235 
236 
237  static const char* tactile_sensor_manufacturer_strings[4] = { "None",
238  "Shadow Robot Company Ltd.",
239  "Syntouch",
240  "Bielefeld University"};
241 
242  static const char* tactile_sensor_generic_info_strings[7] = { "Invalid",
243  "SVN revision",
244  "Revision is modified",
245  "SVN revision on server at build time",
246  "PCB version",
247  "Part serial number low",
248  "Part serial number high"};
249 
250 #endif
251 */
252 
253 
254 
255 #endif
More than 1 type of sensor is connected to the hand! (Very unlikely to happen)
unsigned short int16u
Syntouch&#39;s BioTac sensor, version 2.3.
#define TACTILE_DATA_LENGTH_BYTES_v1
Requesting this causes the tactile sensors to reset if they support it.
#define TACTILE_DATA_LENGTH_WORDS_v2
unsigned char int8u
e.g. "FB". Currently only used by BioTacs
Shadow&#39;s Pressure Tactile sensor, Hugo&#39;s firmware.
Is this a PST, a BioTac, or what? Returns a TACTILE_SENSOR_PROTOCOL_TYPE.
word[0] = frequency in Hz. currently only used by BioTacs
No supported sensors were found.
#define TACTILE_DATA_LENGTH_WORDS_v1
#define TACTILE_DATA_LENGTH_BYTES_v2


sr_external_dependencies
Author(s): Ugo Cupcic
autogenerated on Mon Feb 28 2022 23:50:40