0
|
1 |
|
54
|
2 |
/* File generated by gen_cfile.py. Should not be modified. */
|
|
3 |
|
0
|
4 |
#include "objdict.h"
|
|
5 |
|
|
6 |
/**************************************************************************/
|
|
7 |
/* Declaration of the mapped variables */
|
|
8 |
/**************************************************************************/
|
80
|
9 |
UNS16 acceptanceFilter1 = 0x0; /* Mapped at index 0x2015, subindex 0x00 */
|
|
10 |
UNS16 acceptanceFilter2 = 0x0; /* Mapped at index 0x2016, subindex 0x00 */
|
|
11 |
UNS16 acceptanceFilter3 = 0x0; /* Mapped at index 0x2017, subindex 0x00 */
|
|
12 |
UNS16 acceptanceFilter4 = 0x0; /* Mapped at index 0x2018, subindex 0x00 */
|
|
13 |
UNS16 mask1 = 0x0; /* Mapped at index 0x2019, subindex 0x00 */
|
|
14 |
UNS16 mask2 = 0x0; /* Mapped at index 0x2020, subindex 0x00 */
|
|
15 |
UNS16 mask3 = 0x0; /* Mapped at index 0x2021, subindex 0x00 */
|
|
16 |
UNS16 mask4 = 0x0; /* Mapped at index 0x2022, subindex 0x00 */
|
|
17 |
UNS8 applyDownloadedFilters = 0x0; /* Mapped at index 0x2023, subindex 0x00 */
|
0
|
18 |
|
|
19 |
/**************************************************************************/
|
|
20 |
/* Declaration of the value range types */
|
|
21 |
/**************************************************************************/
|
|
22 |
|
54
|
23 |
UNS32 gene_SYNC_valueRangeTest (UNS8 typeValue, void * value)
|
0
|
24 |
{
|
|
25 |
switch (typeValue) {
|
|
26 |
}
|
|
27 |
return 0;
|
|
28 |
}
|
|
29 |
|
|
30 |
/**************************************************************************/
|
|
31 |
/* The node id */
|
|
32 |
/**************************************************************************/
|
54
|
33 |
/* node_id default value.*/
|
|
34 |
UNS8 gene_SYNC_bDeviceNodeId = 0x03;
|
0
|
35 |
|
80
|
36 |
/**************************************************************************/
|
0
|
37 |
/* Array of message processing information */
|
|
38 |
|
|
39 |
const UNS8 gene_SYNC_iam_a_slave = 1;
|
|
40 |
|
80
|
41 |
TIMER_HANDLE gene_SYNC_heartBeatTimers[1];
|
|
42 |
|
|
43 |
/*
|
|
44 |
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
|
45 |
|
|
46 |
OBJECT DICTIONARY
|
|
47 |
|
|
48 |
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
|
|
49 |
*/
|
54
|
50 |
|
|
51 |
/* index 0x1000 : Device Type. */
|
80
|
52 |
UNS32 gene_SYNC_obj1000 = 0x0; /* 0 */
|
54
|
53 |
subindex gene_SYNC_Index1000[] =
|
|
54 |
{
|
|
55 |
{ RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1000 }
|
|
56 |
};
|
|
57 |
|
|
58 |
/* index 0x1001 : Error Register. */
|
80
|
59 |
UNS8 gene_SYNC_obj1001 = 0x0; /* 0 */
|
54
|
60 |
subindex gene_SYNC_Index1001[] =
|
|
61 |
{
|
|
62 |
{ RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_obj1001 }
|
|
63 |
};
|
|
64 |
|
|
65 |
/* index 0x1005 : SYNC COB ID. */
|
80
|
66 |
UNS32 gene_SYNC_obj1005 = 0x40000080; /* 1073741952 */
|
54
|
67 |
ODCallback_t gene_SYNC_Index1005_callbacks[] =
|
|
68 |
{
|
|
69 |
NULL,
|
|
70 |
};
|
|
71 |
subindex gene_SYNC_Index1005[] =
|
|
72 |
{
|
|
73 |
{ RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1005 }
|
|
74 |
};
|
|
75 |
|
|
76 |
/* index 0x1006 : Communication / Cycle Period. */
|
80
|
77 |
UNS32 gene_SYNC_obj1006 = 0x2710; /* 10000 */
|
54
|
78 |
ODCallback_t gene_SYNC_Index1006_callbacks[] =
|
|
79 |
{
|
|
80 |
NULL,
|
|
81 |
};
|
|
82 |
subindex gene_SYNC_Index1006[] =
|
|
83 |
{
|
|
84 |
{ RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1006 }
|
|
85 |
};
|
|
86 |
|
|
87 |
/* index 0x1008 : Manufacturer Device Name. */
|
|
88 |
UNS8 gene_SYNC_obj1008[10] = "GENE_SYNC";
|
|
89 |
subindex gene_SYNC_Index1008[] =
|
|
90 |
{
|
|
91 |
{ RO, visible_string, sizeof (gene_SYNC_obj1008), (void*)&gene_SYNC_obj1008 }
|
|
92 |
};
|
|
93 |
|
|
94 |
/* index 0x1016 : Consumer Heartbeat Time */
|
|
95 |
UNS8 gene_SYNC_highestSubIndex_obj1016 = 0;
|
80
|
96 |
UNS32 gene_SYNC_obj1016[];
|
|
97 |
subindex gene_SYNC_Index1016[];
|
0
|
98 |
|
54
|
99 |
/* index 0x1017 : Producer Heartbeat Time */
|
80
|
100 |
UNS16 gene_SYNC_obj1017 = 0x0; /* 0 */
|
54
|
101 |
|
|
102 |
/* index 0x1018 : Identity. */
|
80
|
103 |
UNS8 gene_SYNC_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/
|
|
104 |
UNS32 gene_SYNC_obj1018_Vendor_ID = 0x0; /* 0 */
|
|
105 |
UNS32 gene_SYNC_obj1018_Product_Code = 0x0; /* 0 */
|
|
106 |
UNS32 gene_SYNC_obj1018_Revision_Number = 0x0; /* 0 */
|
|
107 |
UNS32 gene_SYNC_obj1018_Serial_Number = 0x0; /* 0 */
|
54
|
108 |
subindex gene_SYNC_Index1018[] =
|
|
109 |
{
|
|
110 |
{ RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1018 },
|
|
111 |
{ RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Vendor_ID },
|
|
112 |
{ RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Product_Code },
|
|
113 |
{ RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Revision_Number },
|
|
114 |
{ RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Serial_Number }
|
|
115 |
};
|
|
116 |
|
|
117 |
/* index 0x1200 : Server SDO Parameter. */
|
80
|
118 |
UNS8 gene_SYNC_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/
|
|
119 |
UNS32 gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x0; /* 0 */
|
|
120 |
UNS32 gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x0; /* 0 */
|
54
|
121 |
subindex gene_SYNC_Index1200[] =
|
|
122 |
{
|
|
123 |
{ RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1200 },
|
|
124 |
{ RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO },
|
|
125 |
{ RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO }
|
|
126 |
};
|
|
127 |
|
|
128 |
/* index 0x2015 : Mapped variable acceptanceFilter1 */
|
|
129 |
subindex gene_SYNC_Index2015[] =
|
|
130 |
{
|
|
131 |
{ RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter1 }
|
|
132 |
};
|
|
133 |
|
|
134 |
/* index 0x2016 : Mapped variable acceptanceFilter2 */
|
|
135 |
subindex gene_SYNC_Index2016[] =
|
|
136 |
{
|
|
137 |
{ RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter2 }
|
|
138 |
};
|
|
139 |
|
|
140 |
/* index 0x2017 : Mapped variable acceptanceFilter3 */
|
|
141 |
subindex gene_SYNC_Index2017[] =
|
|
142 |
{
|
|
143 |
{ RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter3 }
|
|
144 |
};
|
|
145 |
|
|
146 |
/* index 0x2018 : Mapped variable acceptanceFilter4 */
|
|
147 |
subindex gene_SYNC_Index2018[] =
|
|
148 |
{
|
|
149 |
{ RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter4 }
|
|
150 |
};
|
|
151 |
|
|
152 |
/* index 0x2019 : Mapped variable mask1 */
|
|
153 |
subindex gene_SYNC_Index2019[] =
|
|
154 |
{
|
|
155 |
{ RW, uint16, sizeof (UNS16), (void*)&mask1 }
|
|
156 |
};
|
|
157 |
|
|
158 |
/* index 0x2020 : Mapped variable mask2 */
|
|
159 |
subindex gene_SYNC_Index2020[] =
|
|
160 |
{
|
|
161 |
{ RW, uint16, sizeof (UNS16), (void*)&mask2 }
|
|
162 |
};
|
|
163 |
|
|
164 |
/* index 0x2021 : Mapped variable mask3 */
|
|
165 |
subindex gene_SYNC_Index2021[] =
|
|
166 |
{
|
|
167 |
{ RW, uint16, sizeof (UNS16), (void*)&mask3 }
|
|
168 |
};
|
|
169 |
|
|
170 |
/* index 0x2022 : Mapped variable mask4 */
|
|
171 |
subindex gene_SYNC_Index2022[] =
|
|
172 |
{
|
|
173 |
{ RW, uint16, sizeof (UNS16), (void*)&mask4 }
|
|
174 |
};
|
|
175 |
|
|
176 |
/* index 0x2023 : Mapped variable applyDownloadedFilters */
|
|
177 |
subindex gene_SYNC_Index2023[] =
|
|
178 |
{
|
|
179 |
{ RW, uint8, sizeof (UNS8), (void*)&applyDownloadedFilters }
|
|
180 |
};
|
0
|
181 |
|
|
182 |
const indextable gene_SYNC_objdict[] =
|
|
183 |
{
|
54
|
184 |
{ (subindex*)gene_SYNC_Index1000,sizeof(gene_SYNC_Index1000)/sizeof(gene_SYNC_Index1000[0]), 0x1000},
|
|
185 |
{ (subindex*)gene_SYNC_Index1001,sizeof(gene_SYNC_Index1001)/sizeof(gene_SYNC_Index1001[0]), 0x1001},
|
|
186 |
{ (subindex*)gene_SYNC_Index1005,sizeof(gene_SYNC_Index1005)/sizeof(gene_SYNC_Index1005[0]), 0x1005},
|
|
187 |
{ (subindex*)gene_SYNC_Index1006,sizeof(gene_SYNC_Index1006)/sizeof(gene_SYNC_Index1006[0]), 0x1006},
|
|
188 |
{ (subindex*)gene_SYNC_Index1008,sizeof(gene_SYNC_Index1008)/sizeof(gene_SYNC_Index1008[0]), 0x1008},
|
|
189 |
{ (subindex*)gene_SYNC_Index1018,sizeof(gene_SYNC_Index1018)/sizeof(gene_SYNC_Index1018[0]), 0x1018},
|
|
190 |
{ (subindex*)gene_SYNC_Index1200,sizeof(gene_SYNC_Index1200)/sizeof(gene_SYNC_Index1200[0]), 0x1200},
|
|
191 |
{ (subindex*)gene_SYNC_Index2015,sizeof(gene_SYNC_Index2015)/sizeof(gene_SYNC_Index2015[0]), 0x2015},
|
|
192 |
{ (subindex*)gene_SYNC_Index2016,sizeof(gene_SYNC_Index2016)/sizeof(gene_SYNC_Index2016[0]), 0x2016},
|
|
193 |
{ (subindex*)gene_SYNC_Index2017,sizeof(gene_SYNC_Index2017)/sizeof(gene_SYNC_Index2017[0]), 0x2017},
|
|
194 |
{ (subindex*)gene_SYNC_Index2018,sizeof(gene_SYNC_Index2018)/sizeof(gene_SYNC_Index2018[0]), 0x2018},
|
|
195 |
{ (subindex*)gene_SYNC_Index2019,sizeof(gene_SYNC_Index2019)/sizeof(gene_SYNC_Index2019[0]), 0x2019},
|
|
196 |
{ (subindex*)gene_SYNC_Index2020,sizeof(gene_SYNC_Index2020)/sizeof(gene_SYNC_Index2020[0]), 0x2020},
|
|
197 |
{ (subindex*)gene_SYNC_Index2021,sizeof(gene_SYNC_Index2021)/sizeof(gene_SYNC_Index2021[0]), 0x2021},
|
|
198 |
{ (subindex*)gene_SYNC_Index2022,sizeof(gene_SYNC_Index2022)/sizeof(gene_SYNC_Index2022[0]), 0x2022},
|
|
199 |
{ (subindex*)gene_SYNC_Index2023,sizeof(gene_SYNC_Index2023)/sizeof(gene_SYNC_Index2023[0]), 0x2023},
|
0
|
200 |
};
|
|
201 |
|
54
|
202 |
const indextable * gene_SYNC_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks)
|
|
203 |
{
|
|
204 |
int i;
|
|
205 |
*callbacks = NULL;
|
|
206 |
switch(wIndex){
|
|
207 |
case 0x1000: i = 0;break;
|
|
208 |
case 0x1001: i = 1;break;
|
|
209 |
case 0x1005: i = 2;*callbacks = gene_SYNC_Index1005_callbacks; break;
|
|
210 |
case 0x1006: i = 3;*callbacks = gene_SYNC_Index1006_callbacks; break;
|
|
211 |
case 0x1008: i = 4;break;
|
|
212 |
case 0x1018: i = 5;break;
|
|
213 |
case 0x1200: i = 6;break;
|
|
214 |
case 0x2015: i = 7;break;
|
|
215 |
case 0x2016: i = 8;break;
|
|
216 |
case 0x2017: i = 9;break;
|
|
217 |
case 0x2018: i = 10;break;
|
|
218 |
case 0x2019: i = 11;break;
|
|
219 |
case 0x2020: i = 12;break;
|
|
220 |
case 0x2021: i = 13;break;
|
|
221 |
case 0x2022: i = 14;break;
|
|
222 |
case 0x2023: i = 15;break;
|
|
223 |
default:
|
|
224 |
*errorCode = OD_NO_SUCH_OBJECT;
|
|
225 |
return NULL;
|
|
226 |
}
|
|
227 |
*errorCode = OD_SUCCESSFUL;
|
|
228 |
return &gene_SYNC_objdict[i];
|
|
229 |
}
|
|
230 |
|
80
|
231 |
/* To count at which received SYNC a PDO must be sent.
|
|
232 |
* Even if no pdoTransmit are defined, at least one entry is computed
|
|
233 |
* for compilations issues.
|
|
234 |
*/
|
54
|
235 |
UNS8 gene_SYNC_count_sync[1] = {0,};
|
0
|
236 |
|
|
237 |
quick_index gene_SYNC_firstIndex = {
|
80
|
238 |
6, /* SDO_SVR */
|
|
239 |
0, /* SDO_CLT */
|
|
240 |
0, /* PDO_RCV */
|
|
241 |
0, /* PDO_RCV_MAP */
|
|
242 |
0, /* PDO_TRS */
|
|
243 |
0 /* PDO_TRS_MAP */
|
0
|
244 |
};
|
|
245 |
|
|
246 |
quick_index gene_SYNC_lastIndex = {
|
80
|
247 |
6, /* SDO_SVR */
|
|
248 |
0, /* SDO_CLT */
|
|
249 |
0, /* PDO_RCV */
|
|
250 |
0, /* PDO_RCV_MAP */
|
|
251 |
0, /* PDO_TRS */
|
|
252 |
0 /* PDO_TRS_MAP */
|
0
|
253 |
};
|
|
254 |
|
|
255 |
UNS16 gene_SYNC_ObjdictSize = sizeof(gene_SYNC_objdict)/sizeof(gene_SYNC_objdict[0]);
|
|
256 |
|
|
257 |
CO_Data gene_SYNC_Data = CANOPEN_NODE_DATA_INITIALIZER(gene_SYNC);
|
|
258 |
|