00001
00002
00003
00004 #include "TestMaster.h"
00005
00006
00007
00008
00009 UNS8 MasterMap1 = 0x0;
00010 UNS8 MasterMap2 = 0x0;
00011 UNS8 MasterMap3 = 0x0;
00012 UNS8 MasterMap4 = 0x0;
00013 UNS8 MasterMap5 = 0x0;
00014 UNS8 MasterMap6 = 0x0;
00015 UNS8 MasterMap7 = 0x0;
00016 UNS8 MasterMap8 = 0x0;
00017 UNS8 MasterMap9 = 0x0;
00018 UNS32 MasterMap10 = 0x0;
00019 UNS16 MasterMap11 = 0x0;
00020
00021
00022
00023
00024
00025 UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value)
00026 {
00027 switch (typeValue) {
00028 }
00029 return 0;
00030 }
00031
00032
00033
00034
00035
00036 UNS8 TestMaster_bDeviceNodeId = 0x01;
00037
00038
00039
00040
00041 const UNS8 TestMaster_iam_a_slave = 0;
00042
00043 TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE,};
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 UNS32 TestMaster_obj1000 = 0x12D;
00055 subindex TestMaster_Index1000[] =
00056 {
00057 { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1000 }
00058 };
00059
00060
00061 UNS8 TestMaster_obj1001 = 0x0;
00062 subindex TestMaster_Index1001[] =
00063 {
00064 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_obj1001 }
00065 };
00066
00067
00068 UNS32 TestMaster_obj1005 = 0x40000080;
00069 ODCallback_t TestMaster_Index1005_callbacks[] =
00070 {
00071 NULL,
00072 };
00073 subindex TestMaster_Index1005[] =
00074 {
00075 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1005 }
00076 };
00077
00078
00079 UNS32 TestMaster_obj1006 = 0xC350;
00080 ODCallback_t TestMaster_Index1006_callbacks[] =
00081 {
00082 NULL,
00083 };
00084 subindex TestMaster_Index1006[] =
00085 {
00086 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1006 }
00087 };
00088
00089
00090 UNS8 TestMaster_highestSubIndex_obj1010 = 4;
00091 UNS32 TestMaster_obj1010_Save_All_Parameters = 0x0;
00092 UNS32 TestMaster_obj1010_Save_Communication_Parameters = 0x0;
00093 UNS32 TestMaster_obj1010_Save_Application_Parameters = 0x0;
00094 UNS32 TestMaster_obj1010_Save_Manufacturer_Parameters = 0x0;
00095 subindex TestMaster_Index1010[] =
00096 {
00097 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1010 },
00098 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_All_Parameters },
00099 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_Communication_Parameters },
00100 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_Application_Parameters },
00101 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_Manufacturer_Parameters }
00102 };
00103
00104
00105 UNS8 TestMaster_highestSubIndex_obj1011 = 4;
00106 UNS32 TestMaster_obj1011_Restore_All_Default_Parameters = 0x0;
00107 UNS32 TestMaster_obj1011_Restore_Communication_Default_Parameters = 0x0;
00108 UNS32 TestMaster_obj1011_Restore_Application_Default_Parameters = 0x0;
00109 UNS32 TestMaster_obj1011_Restore_Manufacturer_Default_Parameters = 0x0;
00110 subindex TestMaster_Index1011[] =
00111 {
00112 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1011 },
00113 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_All_Default_Parameters },
00114 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_Communication_Default_Parameters },
00115 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_Application_Default_Parameters },
00116 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_Manufacturer_Default_Parameters }
00117 };
00118
00119
00120 UNS8 TestMaster_highestSubIndex_obj1016 = 1;
00121 UNS32 TestMaster_obj1016[] =
00122 {
00123 0x205DC
00124 };
00125 subindex TestMaster_Index1016[] =
00126 {
00127 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1016 },
00128 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1016[0] }
00129 };
00130
00131
00132 UNS16 TestMaster_obj1017 = 0x0;
00133
00134
00135 UNS8 TestMaster_highestSubIndex_obj1018 = 4;
00136 UNS32 TestMaster_obj1018_Vendor_ID = 0x0;
00137 UNS32 TestMaster_obj1018_Product_Code = 0x0;
00138 UNS32 TestMaster_obj1018_Revision_Number = 0x0;
00139 UNS32 TestMaster_obj1018_Serial_Number = 0x0;
00140 subindex TestMaster_Index1018[] =
00141 {
00142 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1018 },
00143 { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Vendor_ID },
00144 { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Product_Code },
00145 { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Revision_Number },
00146 { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Serial_Number }
00147 };
00148
00149
00150 UNS8 TestMaster_highestSubIndex_obj1280 = 3;
00151 UNS32 TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x602;
00152 UNS32 TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x582;
00153 INTEGER32 TestMaster_obj1280_Node_ID_of_the_SDO_Server = 0x2;
00154 subindex TestMaster_Index1280[] =
00155 {
00156 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1280 },
00157 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO },
00158 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO },
00159 { RW, int32, sizeof (INTEGER32), (void*)&TestMaster_obj1280_Node_ID_of_the_SDO_Server }
00160 };
00161
00162
00163 UNS8 TestMaster_highestSubIndex_obj1400 = 5;
00164 UNS32 TestMaster_obj1400_COB_ID_used_by_PDO = 0x182;
00165 UNS8 TestMaster_obj1400_Transmission_Type = 0x1;
00166 UNS16 TestMaster_obj1400_Inhibit_Time = 0x0;
00167 UNS8 TestMaster_obj1400_Compatibility_Entry = 0x0;
00168 UNS16 TestMaster_obj1400_Event_Timer = 0x0;
00169 subindex TestMaster_Index1400[] =
00170 {
00171 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1400 },
00172 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1400_COB_ID_used_by_PDO },
00173 { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1400_Transmission_Type },
00174 { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Inhibit_Time },
00175 { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1400_Compatibility_Entry },
00176 { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Event_Timer }
00177 };
00178
00179
00180 UNS8 TestMaster_highestSubIndex_obj1401 = 5;
00181 UNS32 TestMaster_obj1401_COB_ID_used_by_PDO = 0x0;
00182 UNS8 TestMaster_obj1401_Transmission_Type = 0x0;
00183 UNS16 TestMaster_obj1401_Inhibit_Time = 0x0;
00184 UNS8 TestMaster_obj1401_Compatibility_Entry = 0x0;
00185 UNS16 TestMaster_obj1401_Event_Timer = 0x0;
00186 subindex TestMaster_Index1401[] =
00187 {
00188 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1401 },
00189 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1401_COB_ID_used_by_PDO },
00190 { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1401_Transmission_Type },
00191 { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1401_Inhibit_Time },
00192 { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1401_Compatibility_Entry },
00193 { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1401_Event_Timer }
00194 };
00195
00196
00197 UNS8 TestMaster_highestSubIndex_obj1600 = 10;
00198 UNS32 TestMaster_obj1600[] =
00199 {
00200 0x20000001,
00201 0x20010001,
00202 0x20020001,
00203 0x20030001,
00204 0x20040001,
00205 0x20050001,
00206 0x20060001,
00207 0x20070001,
00208 0x20080008,
00209 0x20090020
00210 };
00211 subindex TestMaster_Index1600[] =
00212 {
00213 { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1600 },
00214 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[0] },
00215 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[1] },
00216 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[2] },
00217 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[3] },
00218 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[4] },
00219 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[5] },
00220 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[6] },
00221 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[7] },
00222 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[8] },
00223 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[9] }
00224 };
00225
00226
00227 UNS8 TestMaster_highestSubIndex_obj1601 = 1;
00228 UNS32 TestMaster_obj1601[] =
00229 {
00230 0x200A0010
00231 };
00232 subindex TestMaster_Index1601[] =
00233 {
00234 { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1601 },
00235 { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1601[0] }
00236 };
00237
00238
00239 UNS8 TestMaster_highestSubIndex_obj1F22 = 2;
00240 UNS8* TestMaster_obj1F22[] =
00241 {
00242 "",
00243 "\x01\x00\x00\x00\x17\x10\x00\x02\x00\x00\x00\xe8\x03"
00244 };
00245 subindex TestMaster_Index1F22[] =
00246 {
00247 { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1F22 },
00248 { RW, domain, 0, (void*)&TestMaster_obj1F22[0] },
00249 { RW, domain, 13, (void*)&TestMaster_obj1F22[1] }
00250 };
00251
00252
00253 subindex TestMaster_Index2000[] =
00254 {
00255 { RW, boolean, sizeof (UNS8), (void*)&MasterMap1 }
00256 };
00257
00258
00259 subindex TestMaster_Index2001[] =
00260 {
00261 { RW, boolean, sizeof (UNS8), (void*)&MasterMap2 }
00262 };
00263
00264
00265 subindex TestMaster_Index2002[] =
00266 {
00267 { RW, boolean, sizeof (UNS8), (void*)&MasterMap3 }
00268 };
00269
00270
00271 subindex TestMaster_Index2003[] =
00272 {
00273 { RW, boolean, sizeof (UNS8), (void*)&MasterMap4 }
00274 };
00275
00276
00277 subindex TestMaster_Index2004[] =
00278 {
00279 { RW, boolean, sizeof (UNS8), (void*)&MasterMap5 }
00280 };
00281
00282
00283 subindex TestMaster_Index2005[] =
00284 {
00285 { RW, boolean, sizeof (UNS8), (void*)&MasterMap6 }
00286 };
00287
00288
00289 subindex TestMaster_Index2006[] =
00290 {
00291 { RW, boolean, sizeof (UNS8), (void*)&MasterMap7 }
00292 };
00293
00294
00295 subindex TestMaster_Index2007[] =
00296 {
00297 { RW, boolean, sizeof (UNS8), (void*)&MasterMap8 }
00298 };
00299
00300
00301 subindex TestMaster_Index2008[] =
00302 {
00303 { RW, uint8, sizeof (UNS8), (void*)&MasterMap9 }
00304 };
00305
00306
00307 subindex TestMaster_Index2009[] =
00308 {
00309 { RW, uint32, sizeof (UNS32), (void*)&MasterMap10 }
00310 };
00311
00312
00313 subindex TestMaster_Index200A[] =
00314 {
00315 { RW, uint16, sizeof (UNS16), (void*)&MasterMap11 }
00316 };
00317
00318 const indextable TestMaster_objdict[] =
00319 {
00320 { (subindex*)TestMaster_Index1000,sizeof(TestMaster_Index1000)/sizeof(TestMaster_Index1000[0]), 0x1000},
00321 { (subindex*)TestMaster_Index1001,sizeof(TestMaster_Index1001)/sizeof(TestMaster_Index1001[0]), 0x1001},
00322 { (subindex*)TestMaster_Index1005,sizeof(TestMaster_Index1005)/sizeof(TestMaster_Index1005[0]), 0x1005},
00323 { (subindex*)TestMaster_Index1006,sizeof(TestMaster_Index1006)/sizeof(TestMaster_Index1006[0]), 0x1006},
00324 { (subindex*)TestMaster_Index1010,sizeof(TestMaster_Index1010)/sizeof(TestMaster_Index1010[0]), 0x1010},
00325 { (subindex*)TestMaster_Index1011,sizeof(TestMaster_Index1011)/sizeof(TestMaster_Index1011[0]), 0x1011},
00326 { (subindex*)TestMaster_Index1016,sizeof(TestMaster_Index1016)/sizeof(TestMaster_Index1016[0]), 0x1016},
00327 { (subindex*)TestMaster_Index1018,sizeof(TestMaster_Index1018)/sizeof(TestMaster_Index1018[0]), 0x1018},
00328 { (subindex*)TestMaster_Index1280,sizeof(TestMaster_Index1280)/sizeof(TestMaster_Index1280[0]), 0x1280},
00329 { (subindex*)TestMaster_Index1400,sizeof(TestMaster_Index1400)/sizeof(TestMaster_Index1400[0]), 0x1400},
00330 { (subindex*)TestMaster_Index1401,sizeof(TestMaster_Index1401)/sizeof(TestMaster_Index1401[0]), 0x1401},
00331 { (subindex*)TestMaster_Index1600,sizeof(TestMaster_Index1600)/sizeof(TestMaster_Index1600[0]), 0x1600},
00332 { (subindex*)TestMaster_Index1601,sizeof(TestMaster_Index1601)/sizeof(TestMaster_Index1601[0]), 0x1601},
00333 { (subindex*)TestMaster_Index1F22,sizeof(TestMaster_Index1F22)/sizeof(TestMaster_Index1F22[0]), 0x1F22},
00334 { (subindex*)TestMaster_Index2000,sizeof(TestMaster_Index2000)/sizeof(TestMaster_Index2000[0]), 0x2000},
00335 { (subindex*)TestMaster_Index2001,sizeof(TestMaster_Index2001)/sizeof(TestMaster_Index2001[0]), 0x2001},
00336 { (subindex*)TestMaster_Index2002,sizeof(TestMaster_Index2002)/sizeof(TestMaster_Index2002[0]), 0x2002},
00337 { (subindex*)TestMaster_Index2003,sizeof(TestMaster_Index2003)/sizeof(TestMaster_Index2003[0]), 0x2003},
00338 { (subindex*)TestMaster_Index2004,sizeof(TestMaster_Index2004)/sizeof(TestMaster_Index2004[0]), 0x2004},
00339 { (subindex*)TestMaster_Index2005,sizeof(TestMaster_Index2005)/sizeof(TestMaster_Index2005[0]), 0x2005},
00340 { (subindex*)TestMaster_Index2006,sizeof(TestMaster_Index2006)/sizeof(TestMaster_Index2006[0]), 0x2006},
00341 { (subindex*)TestMaster_Index2007,sizeof(TestMaster_Index2007)/sizeof(TestMaster_Index2007[0]), 0x2007},
00342 { (subindex*)TestMaster_Index2008,sizeof(TestMaster_Index2008)/sizeof(TestMaster_Index2008[0]), 0x2008},
00343 { (subindex*)TestMaster_Index2009,sizeof(TestMaster_Index2009)/sizeof(TestMaster_Index2009[0]), 0x2009},
00344 { (subindex*)TestMaster_Index200A,sizeof(TestMaster_Index200A)/sizeof(TestMaster_Index200A[0]), 0x200A},
00345 };
00346
00347 const indextable * TestMaster_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks)
00348 {
00349 int i;
00350 *callbacks = NULL;
00351 switch(wIndex){
00352 case 0x1000: i = 0;break;
00353 case 0x1001: i = 1;break;
00354 case 0x1005: i = 2;*callbacks = TestMaster_Index1005_callbacks; break;
00355 case 0x1006: i = 3;*callbacks = TestMaster_Index1006_callbacks; break;
00356 case 0x1010: i = 4;break;
00357 case 0x1011: i = 5;break;
00358 case 0x1016: i = 6;break;
00359 case 0x1018: i = 7;break;
00360 case 0x1280: i = 8;break;
00361 case 0x1400: i = 9;break;
00362 case 0x1401: i = 10;break;
00363 case 0x1600: i = 11;break;
00364 case 0x1601: i = 12;break;
00365 case 0x1F22: i = 13;break;
00366 case 0x2000: i = 14;break;
00367 case 0x2001: i = 15;break;
00368 case 0x2002: i = 16;break;
00369 case 0x2003: i = 17;break;
00370 case 0x2004: i = 18;break;
00371 case 0x2005: i = 19;break;
00372 case 0x2006: i = 20;break;
00373 case 0x2007: i = 21;break;
00374 case 0x2008: i = 22;break;
00375 case 0x2009: i = 23;break;
00376 case 0x200A: i = 24;break;
00377 default:
00378 *errorCode = OD_NO_SUCH_OBJECT;
00379 return NULL;
00380 }
00381 *errorCode = OD_SUCCESSFUL;
00382 return &TestMaster_objdict[i];
00383 }
00384
00385
00386
00387
00388
00389 UNS8 TestMaster_count_sync[1] = {0,};
00390
00391 quick_index TestMaster_firstIndex = {
00392 0,
00393 8,
00394 9,
00395 11,
00396 0,
00397 0
00398 };
00399
00400 quick_index TestMaster_lastIndex = {
00401 0,
00402 8,
00403 10,
00404 12,
00405 0,
00406 0
00407 };
00408
00409 UNS16 TestMaster_ObjdictSize = sizeof(TestMaster_objdict)/sizeof(TestMaster_objdict[0]);
00410
00411 CO_Data TestMaster_Data = CANOPEN_NODE_DATA_INITIALIZER(TestMaster);
00412