etisserant@166: etisserant@166: /* File generated by gen_cfile.py. Should not be modified. */ etisserant@166: etisserant@166: #include "TestMaster.h" etisserant@166: etisserant@166: /**************************************************************************/ etisserant@166: /* Declaration of the mapped variables */ etisserant@166: /**************************************************************************/ etisserant@166: UNS8 DO = 0x0; /* Mapped at index 0x2000, subindex 0x00 */ greg@201: UNS8 DI1 = 0x0; /* Mapped at index 0x200F, subindex 0x00 */ greg@201: UNS8 DI2 = 0x0; /* Mapped at index 0x2010, subindex 0x00 */ greg@201: UNS8 DI3 = 0x0; /* Mapped at index 0x2011, subindex 0x00 */ greg@201: UNS8 DI4 = 0x0; /* Mapped at index 0x2012, subindex 0x00 */ greg@201: UNS8 DI5 = 0x0; /* Mapped at index 0x2013, subindex 0x00 */ greg@201: UNS8 DI6 = 0x0; /* Mapped at index 0x2014, subindex 0x00 */ greg@201: UNS8 DI7 = 0x0; /* Mapped at index 0x2015, subindex 0x00 */ greg@201: UNS8 DI8 = 0x0; /* Mapped at index 0x2016, subindex 0x00 */ etisserant@166: etisserant@166: /**************************************************************************/ etisserant@166: /* Declaration of the value range types */ etisserant@166: /**************************************************************************/ etisserant@166: lbessard@287: #define valueRange_EMC 0x9F /* Type for index 0x1003 subindex 0x00 (only set of value 0 is possible) */ etisserant@166: UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value) etisserant@166: { etisserant@166: switch (typeValue) { lbessard@287: case valueRange_EMC: etisserant@307: if (*(UNS8*)value != (UNS8)0) return OD_VALUE_RANGE_EXCEEDED; lbessard@287: break; etisserant@166: } etisserant@166: return 0; etisserant@166: } etisserant@166: etisserant@166: /**************************************************************************/ etisserant@166: /* The node id */ etisserant@166: /**************************************************************************/ etisserant@166: /* node_id default value.*/ etisserant@307: UNS8 TestMaster_bDeviceNodeId = 0x00; etisserant@166: etisserant@166: /**************************************************************************/ etisserant@166: /* Array of message processing information */ etisserant@166: etisserant@166: const UNS8 TestMaster_iam_a_slave = 0; etisserant@166: etisserant@422: TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE}; etisserant@166: etisserant@166: /* etisserant@166: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ etisserant@166: etisserant@166: OBJECT DICTIONARY etisserant@166: etisserant@166: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ etisserant@166: */ etisserant@166: etisserant@166: /* index 0x1000 : Device Type. */ etisserant@166: UNS32 TestMaster_obj1000 = 0x191; /* 401 */ etisserant@166: subindex TestMaster_Index1000[] = etisserant@166: { etisserant@166: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1000 } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1001 : Error Register. */ etisserant@166: UNS8 TestMaster_obj1001 = 0x0; /* 0 */ etisserant@166: subindex TestMaster_Index1001[] = etisserant@166: { etisserant@166: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_obj1001 } etisserant@166: }; etisserant@166: luis@284: /* index 0x1003 : Pre-defined Error Field */ luis@284: UNS8 TestMaster_highestSubIndex_obj1003 = 0; /* number of subindex - 1*/ luis@284: UNS32 TestMaster_obj1003[] = luis@284: { luis@284: 0x0 /* 0 */ luis@284: }; luis@284: ODCallback_t TestMaster_Index1003_callbacks[] = luis@284: { luis@284: NULL, luis@284: NULL, luis@284: }; luis@284: subindex TestMaster_Index1003[] = luis@284: { lbessard@287: { RW, valueRange_EMC, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1003 }, luis@284: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1003[0] } luis@284: }; luis@284: etisserant@166: /* index 0x1005 : SYNC COB ID. */ etisserant@166: UNS32 TestMaster_obj1005 = 0x40000080; /* 1073741952 */ etisserant@166: ODCallback_t TestMaster_Index1005_callbacks[] = etisserant@166: { etisserant@166: NULL, etisserant@166: }; etisserant@166: subindex TestMaster_Index1005[] = etisserant@166: { etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1005 } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1006 : Communication / Cycle Period. */ etisserant@166: UNS32 TestMaster_obj1006 = 0xC350; /* 50000 */ etisserant@166: ODCallback_t TestMaster_Index1006_callbacks[] = etisserant@166: { etisserant@166: NULL, etisserant@166: }; etisserant@166: subindex TestMaster_Index1006[] = etisserant@166: { etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1006 } etisserant@166: }; etisserant@166: etisserant@314: /* index 0x1014 : Emergency COB ID */ etisserant@314: UNS32 TestMaster_obj1014 = 0x0; /* 0 */ etisserant@314: etisserant@166: /* index 0x1016 : Consumer Heartbeat Time. */ etisserant@166: UNS8 TestMaster_highestSubIndex_obj1016 = 1; /* number of subindex - 1*/ etisserant@166: UNS32 TestMaster_obj1016[] = etisserant@166: { etisserant@166: 0x4005DC /* 4195804 */ etisserant@166: }; etisserant@166: subindex TestMaster_Index1016[] = etisserant@166: { etisserant@166: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1016 }, etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1016[0] } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1017 : Producer Heartbeat Time */ etisserant@166: UNS16 TestMaster_obj1017 = 0x0; /* 0 */ etisserant@166: etisserant@166: /* index 0x1018 : Identity. */ etisserant@166: UNS8 TestMaster_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ etisserant@166: UNS32 TestMaster_obj1018_Vendor_ID = 0x0; /* 0 */ etisserant@166: UNS32 TestMaster_obj1018_Product_Code = 0x0; /* 0 */ etisserant@166: UNS32 TestMaster_obj1018_Revision_Number = 0x0; /* 0 */ etisserant@166: UNS32 TestMaster_obj1018_Serial_Number = 0x0; /* 0 */ etisserant@166: subindex TestMaster_Index1018[] = etisserant@166: { etisserant@166: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1018 }, etisserant@166: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Vendor_ID }, etisserant@166: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Product_Code }, etisserant@166: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Revision_Number }, etisserant@166: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Serial_Number } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1280 : Client SDO 1 Parameter. */ etisserant@166: UNS8 TestMaster_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/ etisserant@166: UNS32 TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x640; /* 1600 */ etisserant@166: UNS32 TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x5C0; /* 1472 */ luis@284: UNS8 TestMaster_obj1280_Node_ID_of_the_SDO_Server = 0x40; /* 64 */ etisserant@166: subindex TestMaster_Index1280[] = etisserant@166: { etisserant@166: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1280 }, etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO }, etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO }, luis@284: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1280_Node_ID_of_the_SDO_Server } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1400 : Receive PDO 1 Parameter. */ etisserant@166: UNS8 TestMaster_highestSubIndex_obj1400 = 5; /* number of subindex - 1*/ etisserant@230: UNS32 TestMaster_obj1400_COB_ID_used_by_PDO = 0x1C0; /* 448 */ etisserant@166: UNS8 TestMaster_obj1400_Transmission_Type = 0x1; /* 1 */ etisserant@166: UNS16 TestMaster_obj1400_Inhibit_Time = 0x0; /* 0 */ greg@201: UNS8 TestMaster_obj1400_Compatibility_Entry = 0x0; /* 0 */ etisserant@166: UNS16 TestMaster_obj1400_Event_Timer = 0x0; /* 0 */ etisserant@166: subindex TestMaster_Index1400[] = etisserant@166: { etisserant@166: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1400 }, etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1400_COB_ID_used_by_PDO }, etisserant@166: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1400_Transmission_Type }, etisserant@166: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Inhibit_Time }, greg@201: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1400_Compatibility_Entry }, etisserant@166: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Event_Timer } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1600 : Receive PDO 1 Mapping. */ greg@201: UNS8 TestMaster_highestSubIndex_obj1600 = 8; /* number of subindex - 1*/ etisserant@166: UNS32 TestMaster_obj1600[] = etisserant@166: { greg@201: 0x200F0001, /* 537853953 */ greg@201: 0x20100001, /* 537919489 */ greg@201: 0x20110001, /* 537985025 */ greg@201: 0x20120001, /* 538050561 */ greg@201: 0x20130001, /* 538116097 */ greg@201: 0x20140001, /* 538181633 */ greg@201: 0x20150001, /* 538247169 */ greg@201: 0x20160001 /* 538312705 */ etisserant@166: }; etisserant@166: subindex TestMaster_Index1600[] = etisserant@166: { etisserant@166: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1600 }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[0] }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[1] }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[2] }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[3] }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[4] }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[5] }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[6] }, greg@201: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[7] } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1800 : Transmit PDO 1 Parameter. */ etisserant@166: UNS8 TestMaster_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/ etisserant@166: UNS32 TestMaster_obj1800_COB_ID_used_by_PDO = 0x240; /* 576 */ etisserant@166: UNS8 TestMaster_obj1800_Transmission_Type = 0x1; /* 1 */ etisserant@166: UNS16 TestMaster_obj1800_Inhibit_Time = 0x0; /* 0 */ greg@201: UNS8 TestMaster_obj1800_Compatibility_Entry = 0x0; /* 0 */ etisserant@166: UNS16 TestMaster_obj1800_Event_Timer = 0x0; /* 0 */ luis@284: ODCallback_t TestMaster_Index1800_callbacks[] = luis@284: { luis@284: NULL, luis@284: NULL, luis@284: NULL, luis@284: NULL, luis@284: NULL, luis@284: NULL, luis@284: }; etisserant@166: subindex TestMaster_Index1800[] = etisserant@166: { etisserant@166: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1800 }, etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1800_COB_ID_used_by_PDO }, etisserant@166: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1800_Transmission_Type }, etisserant@166: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1800_Inhibit_Time }, greg@201: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1800_Compatibility_Entry }, etisserant@166: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1800_Event_Timer } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x1A00 : Transmit PDO 1 Mapping. */ etisserant@166: UNS8 TestMaster_highestSubIndex_obj1A00 = 1; /* number of subindex - 1*/ etisserant@166: UNS32 TestMaster_obj1A00[] = etisserant@166: { etisserant@166: 0x20000008 /* 536870920 */ etisserant@166: }; etisserant@166: subindex TestMaster_Index1A00[] = etisserant@166: { etisserant@166: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1A00 }, etisserant@166: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1A00[0] } etisserant@166: }; etisserant@166: etisserant@166: /* index 0x2000 : Mapped variable DO */ etisserant@166: subindex TestMaster_Index2000[] = etisserant@166: { etisserant@166: { RW, uint8, sizeof (UNS8), (void*)&DO } etisserant@166: }; etisserant@166: greg@201: /* index 0x200F : Mapped variable DI1 */ greg@201: subindex TestMaster_Index200F[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI1 } greg@201: }; greg@201: greg@201: /* index 0x2010 : Mapped variable DI2 */ greg@201: subindex TestMaster_Index2010[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI2 } greg@201: }; greg@201: greg@201: /* index 0x2011 : Mapped variable DI3 */ greg@201: subindex TestMaster_Index2011[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI3 } greg@201: }; greg@201: greg@201: /* index 0x2012 : Mapped variable DI4 */ greg@201: subindex TestMaster_Index2012[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI4 } greg@201: }; greg@201: greg@201: /* index 0x2013 : Mapped variable DI5 */ greg@201: subindex TestMaster_Index2013[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI5 } greg@201: }; greg@201: greg@201: /* index 0x2014 : Mapped variable DI6 */ greg@201: subindex TestMaster_Index2014[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI6 } greg@201: }; greg@201: greg@201: /* index 0x2015 : Mapped variable DI7 */ greg@201: subindex TestMaster_Index2015[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI7 } greg@201: }; greg@201: greg@201: /* index 0x2016 : Mapped variable DI8 */ greg@201: subindex TestMaster_Index2016[] = greg@201: { greg@201: { RW, boolean, sizeof (UNS8), (void*)&DI8 } etisserant@166: }; etisserant@166: etisserant@166: const indextable TestMaster_objdict[] = etisserant@166: { etisserant@166: { (subindex*)TestMaster_Index1000,sizeof(TestMaster_Index1000)/sizeof(TestMaster_Index1000[0]), 0x1000}, etisserant@166: { (subindex*)TestMaster_Index1001,sizeof(TestMaster_Index1001)/sizeof(TestMaster_Index1001[0]), 0x1001}, etisserant@166: { (subindex*)TestMaster_Index1005,sizeof(TestMaster_Index1005)/sizeof(TestMaster_Index1005[0]), 0x1005}, etisserant@166: { (subindex*)TestMaster_Index1006,sizeof(TestMaster_Index1006)/sizeof(TestMaster_Index1006[0]), 0x1006}, etisserant@166: { (subindex*)TestMaster_Index1016,sizeof(TestMaster_Index1016)/sizeof(TestMaster_Index1016[0]), 0x1016}, etisserant@166: { (subindex*)TestMaster_Index1018,sizeof(TestMaster_Index1018)/sizeof(TestMaster_Index1018[0]), 0x1018}, etisserant@166: { (subindex*)TestMaster_Index1280,sizeof(TestMaster_Index1280)/sizeof(TestMaster_Index1280[0]), 0x1280}, etisserant@166: { (subindex*)TestMaster_Index1400,sizeof(TestMaster_Index1400)/sizeof(TestMaster_Index1400[0]), 0x1400}, etisserant@166: { (subindex*)TestMaster_Index1600,sizeof(TestMaster_Index1600)/sizeof(TestMaster_Index1600[0]), 0x1600}, etisserant@166: { (subindex*)TestMaster_Index1800,sizeof(TestMaster_Index1800)/sizeof(TestMaster_Index1800[0]), 0x1800}, etisserant@166: { (subindex*)TestMaster_Index1A00,sizeof(TestMaster_Index1A00)/sizeof(TestMaster_Index1A00[0]), 0x1A00}, etisserant@166: { (subindex*)TestMaster_Index2000,sizeof(TestMaster_Index2000)/sizeof(TestMaster_Index2000[0]), 0x2000}, greg@201: { (subindex*)TestMaster_Index200F,sizeof(TestMaster_Index200F)/sizeof(TestMaster_Index200F[0]), 0x200F}, greg@201: { (subindex*)TestMaster_Index2010,sizeof(TestMaster_Index2010)/sizeof(TestMaster_Index2010[0]), 0x2010}, greg@201: { (subindex*)TestMaster_Index2011,sizeof(TestMaster_Index2011)/sizeof(TestMaster_Index2011[0]), 0x2011}, greg@201: { (subindex*)TestMaster_Index2012,sizeof(TestMaster_Index2012)/sizeof(TestMaster_Index2012[0]), 0x2012}, greg@201: { (subindex*)TestMaster_Index2013,sizeof(TestMaster_Index2013)/sizeof(TestMaster_Index2013[0]), 0x2013}, greg@201: { (subindex*)TestMaster_Index2014,sizeof(TestMaster_Index2014)/sizeof(TestMaster_Index2014[0]), 0x2014}, greg@201: { (subindex*)TestMaster_Index2015,sizeof(TestMaster_Index2015)/sizeof(TestMaster_Index2015[0]), 0x2015}, greg@201: { (subindex*)TestMaster_Index2016,sizeof(TestMaster_Index2016)/sizeof(TestMaster_Index2016[0]), 0x2016}, etisserant@166: }; etisserant@166: etisserant@166: const indextable * TestMaster_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) etisserant@166: { etisserant@166: int i; etisserant@166: *callbacks = NULL; etisserant@166: switch(wIndex){ etisserant@166: case 0x1000: i = 0;break; etisserant@166: case 0x1001: i = 1;break; etisserant@166: case 0x1005: i = 2;*callbacks = TestMaster_Index1005_callbacks; break; etisserant@166: case 0x1006: i = 3;*callbacks = TestMaster_Index1006_callbacks; break; etisserant@166: case 0x1016: i = 4;break; etisserant@166: case 0x1018: i = 5;break; etisserant@166: case 0x1280: i = 6;break; etisserant@166: case 0x1400: i = 7;break; greg@201: case 0x1600: i = 8;break; luis@284: case 0x1800: i = 9;*callbacks = TestMaster_Index1800_callbacks; break; greg@201: case 0x1A00: i = 10;break; greg@201: case 0x2000: i = 11;break; greg@201: case 0x200F: i = 12;break; greg@201: case 0x2010: i = 13;break; greg@201: case 0x2011: i = 14;break; greg@201: case 0x2012: i = 15;break; greg@201: case 0x2013: i = 16;break; greg@201: case 0x2014: i = 17;break; greg@201: case 0x2015: i = 18;break; greg@201: case 0x2016: i = 19;break; etisserant@166: default: etisserant@166: *errorCode = OD_NO_SUCH_OBJECT; etisserant@166: return NULL; etisserant@166: } etisserant@166: *errorCode = OD_SUCCESSFUL; etisserant@166: return &TestMaster_objdict[i]; etisserant@166: } etisserant@166: etisserant@235: /* etisserant@235: * To count at which received SYNC a PDO must be sent. etisserant@166: * Even if no pdoTransmit are defined, at least one entry is computed etisserant@166: * for compilations issues. etisserant@166: */ greg@369: s_PDO_status TestMaster_PDO_status[1] = {s_PDO_status_Initializer}; etisserant@166: etisserant@166: quick_index TestMaster_firstIndex = { etisserant@166: 0, /* SDO_SVR */ etisserant@166: 6, /* SDO_CLT */ etisserant@166: 7, /* PDO_RCV */ greg@201: 8, /* PDO_RCV_MAP */ greg@201: 9, /* PDO_TRS */ greg@201: 10 /* PDO_TRS_MAP */ etisserant@166: }; etisserant@166: etisserant@166: quick_index TestMaster_lastIndex = { etisserant@166: 0, /* SDO_SVR */ etisserant@166: 6, /* SDO_CLT */ greg@201: 7, /* PDO_RCV */ greg@201: 8, /* PDO_RCV_MAP */ greg@201: 9, /* PDO_TRS */ greg@201: 10 /* PDO_TRS_MAP */ etisserant@166: }; etisserant@166: etisserant@166: UNS16 TestMaster_ObjdictSize = sizeof(TestMaster_objdict)/sizeof(TestMaster_objdict[0]); etisserant@166: etisserant@166: CO_Data TestMaster_Data = CANOPEN_NODE_DATA_INITIALIZER(TestMaster); etisserant@166: