etisserant@0: etisserant@0: /* File generated by gen_cfile.py. Should not be modified. */ etisserant@0: etisserant@0: #include "TestMaster.h" etisserant@0: etisserant@0: /**************************************************************************/ etisserant@0: /* Declaration of the mapped variables */ etisserant@0: /**************************************************************************/ frdupin@79: UNS8 MasterMap1 = 0x0; /* Mapped at index 0x2000, subindex 0x00 */ frdupin@79: UNS8 MasterMap2 = 0x0; /* Mapped at index 0x2001, subindex 0x00 */ frdupin@79: UNS8 MasterMap3 = 0x0; /* Mapped at index 0x2002, subindex 0x00 */ frdupin@79: UNS8 MasterMap4 = 0x0; /* Mapped at index 0x2003, subindex 0x00 */ etisserant@0: etisserant@0: /**************************************************************************/ etisserant@0: /* Declaration of the value range types */ etisserant@0: /**************************************************************************/ etisserant@0: etisserant@0: UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value) etisserant@0: { etisserant@0: switch (typeValue) { etisserant@0: } etisserant@0: return 0; etisserant@0: } etisserant@0: etisserant@0: /**************************************************************************/ etisserant@0: /* The node id */ etisserant@0: /**************************************************************************/ etisserant@0: /* node_id default value.*/ etisserant@0: UNS8 TestMaster_bDeviceNodeId = 0x00; etisserant@0: frdupin@79: /**************************************************************************/ etisserant@0: /* Array of message processing information */ etisserant@0: etisserant@0: const UNS8 TestMaster_iam_a_slave = 0; etisserant@0: etisserant@0: TIMER_HANDLE TestMaster_heartBeatTimers[1] = {TIMER_NONE,}; etisserant@0: frdupin@79: /* frdupin@79: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ frdupin@79: frdupin@79: OBJECT DICTIONARY frdupin@79: frdupin@79: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ frdupin@79: */ etisserant@0: etisserant@0: /* index 0x1000 : Device Type. */ frdupin@79: UNS32 TestMaster_obj1000 = 0x12D; /* 301 */ etisserant@0: subindex TestMaster_Index1000[] = etisserant@0: { etisserant@0: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1000 } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1001 : Error Register. */ frdupin@79: UNS8 TestMaster_obj1001 = 0x0; /* 0 */ etisserant@0: subindex TestMaster_Index1001[] = etisserant@0: { etisserant@0: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_obj1001 } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1005 : SYNC COB ID. */ frdupin@79: UNS32 TestMaster_obj1005 = 0x40000080; /* 1073741952 */ etisserant@0: ODCallback_t TestMaster_Index1005_callbacks[] = etisserant@0: { etisserant@0: NULL, etisserant@0: }; etisserant@0: subindex TestMaster_Index1005[] = etisserant@0: { etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1005 } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1006 : Communication / Cycle Period. */ frdupin@79: UNS32 TestMaster_obj1006 = 0xC350; /* 50000 */ etisserant@0: ODCallback_t TestMaster_Index1006_callbacks[] = etisserant@0: { etisserant@0: NULL, etisserant@0: }; etisserant@0: subindex TestMaster_Index1006[] = etisserant@0: { etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1006 } etisserant@0: }; etisserant@0: oremeq@23: /* index 0x1010 : Store parameters. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1010 = 4; /* number of subindex - 1*/ frdupin@79: UNS32 TestMaster_obj1010_Save_All_Parameters = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1010_Save_Communication_Parameters = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1010_Save_Application_Parameters = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1010_Save_Manufacturer_Parameters = 0x0; /* 0 */ oremeq@23: ODCallback_t TestMaster_Index1010_callbacks[] = oremeq@23: { oremeq@23: NULL, oremeq@23: NULL, oremeq@23: NULL, oremeq@23: NULL, oremeq@23: NULL, oremeq@23: }; oremeq@23: subindex TestMaster_Index1010[] = oremeq@23: { oremeq@23: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1010 }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_All_Parameters }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_Communication_Parameters }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_Application_Parameters }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1010_Save_Manufacturer_Parameters } oremeq@23: }; oremeq@23: oremeq@23: /* index 0x1011 : Restore Default Parameters. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1011 = 4; /* number of subindex - 1*/ frdupin@79: UNS32 TestMaster_obj1011_Restore_All_Default_Parameters = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1011_Restore_Communication_Default_Parameters = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1011_Restore_Application_Default_Parameters = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1011_Restore_Manufacturer_Default_Parameters = 0x0; /* 0 */ oremeq@23: ODCallback_t TestMaster_Index1011_callbacks[] = oremeq@23: { oremeq@23: NULL, oremeq@23: NULL, oremeq@23: NULL, oremeq@23: NULL, oremeq@23: NULL, oremeq@23: }; oremeq@23: subindex TestMaster_Index1011[] = oremeq@23: { oremeq@23: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1011 }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_All_Default_Parameters }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_Communication_Default_Parameters }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_Application_Default_Parameters }, oremeq@23: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1011_Restore_Manufacturer_Default_Parameters } oremeq@23: }; oremeq@23: etisserant@0: /* index 0x1016 : Consumer Heartbeat Time. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1016 = 1; /* number of subindex - 1*/ etisserant@0: UNS32 TestMaster_obj1016[] = etisserant@0: { frdupin@79: 0x20802 /* 133122 */ etisserant@0: }; etisserant@0: subindex TestMaster_Index1016[] = etisserant@0: { etisserant@0: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1016 }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1016[0] } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1017 : Producer Heartbeat Time */ frdupin@79: UNS16 TestMaster_obj1017 = 0x0; /* 0 */ etisserant@0: etisserant@0: /* index 0x1018 : Identity. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ frdupin@79: UNS32 TestMaster_obj1018_Vendor_ID = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1018_Product_Code = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1018_Revision_Number = 0x0; /* 0 */ frdupin@79: UNS32 TestMaster_obj1018_Serial_Number = 0x0; /* 0 */ etisserant@0: subindex TestMaster_Index1018[] = etisserant@0: { etisserant@0: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1018 }, etisserant@0: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Vendor_ID }, etisserant@0: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Product_Code }, etisserant@0: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Revision_Number }, etisserant@0: { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1018_Serial_Number } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1280 : Client SDO 1 Parameter. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/ frdupin@79: UNS32 TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x602; /* 1538 */ frdupin@79: UNS32 TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x582; /* 1410 */ frdupin@79: UNS32 TestMaster_obj1280_Node_ID_of_the_SDO_Server = 0x2; /* 2 */ etisserant@0: subindex TestMaster_Index1280[] = etisserant@0: { etisserant@0: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1280 }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Client_to_Server_Transmit_SDO }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_COB_ID_Server_to_Client_Receive_SDO }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1280_Node_ID_of_the_SDO_Server } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1400 : Receive PDO 1 Parameter. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1400 = 5; /* number of subindex - 1*/ frdupin@79: UNS32 TestMaster_obj1400_COB_ID_used_by_PDO = 0x182; /* 386 */ frdupin@79: UNS8 TestMaster_obj1400_Transmission_Type = 0x1; /* 1 */ frdupin@79: UNS16 TestMaster_obj1400_Inhibit_Time = 0x0; /* 0 */ frdupin@79: UNS16 TestMaster_obj1400_Compatibility_Entry = 0x0; /* 0 */ frdupin@79: UNS16 TestMaster_obj1400_Event_Timer = 0x0; /* 0 */ etisserant@0: subindex TestMaster_Index1400[] = etisserant@0: { etisserant@0: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1400 }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1400_COB_ID_used_by_PDO }, etisserant@0: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1400_Transmission_Type }, etisserant@0: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Inhibit_Time }, etisserant@0: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Compatibility_Entry }, etisserant@0: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1400_Event_Timer } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1401 : Receive PDO 2 Parameter. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1401 = 5; /* number of subindex - 1*/ frdupin@79: UNS32 TestMaster_obj1401_COB_ID_used_by_PDO = 0x282; /* 642 */ frdupin@79: UNS8 TestMaster_obj1401_Transmission_Type = 0x1; /* 1 */ frdupin@79: UNS16 TestMaster_obj1401_Inhibit_Time = 0x0; /* 0 */ frdupin@79: UNS16 TestMaster_obj1401_Compatibility_Entry = 0x0; /* 0 */ frdupin@79: UNS16 TestMaster_obj1401_Event_Timer = 0x0; /* 0 */ etisserant@0: subindex TestMaster_Index1401[] = etisserant@0: { etisserant@0: { RO, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1401 }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1401_COB_ID_used_by_PDO }, etisserant@0: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_obj1401_Transmission_Type }, etisserant@0: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1401_Inhibit_Time }, etisserant@0: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1401_Compatibility_Entry }, etisserant@0: { RW, uint16, sizeof (UNS16), (void*)&TestMaster_obj1401_Event_Timer } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1600 : Receive PDO 1 Mapping. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1600 = 2; /* number of subindex - 1*/ etisserant@0: UNS32 TestMaster_obj1600[] = etisserant@0: { frdupin@79: 0x20000008, /* 536870920 */ frdupin@79: 0x20010008 /* 536936456 */ etisserant@0: }; etisserant@0: subindex TestMaster_Index1600[] = etisserant@0: { frdupin@79: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1600 }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[0] }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1600[1] } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x1601 : Receive PDO 2 Mapping. */ frdupin@79: UNS8 TestMaster_highestSubIndex_obj1601 = 2; /* number of subindex - 1*/ etisserant@0: UNS32 TestMaster_obj1601[] = etisserant@0: { frdupin@79: 0x20020008, /* 537001992 */ frdupin@79: 0x20030008 /* 537067528 */ etisserant@0: }; etisserant@0: subindex TestMaster_Index1601[] = etisserant@0: { frdupin@79: { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1601 }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1601[0] }, etisserant@0: { RW, uint32, sizeof (UNS32), (void*)&TestMaster_obj1601[1] } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x2000 : Mapped variable MasterMap1 */ etisserant@0: ODCallback_t MasterMap1_callbacks[] = etisserant@0: { etisserant@0: NULL, etisserant@0: }; etisserant@0: subindex TestMaster_Index2000[] = etisserant@0: { etisserant@0: { RW, uint8, sizeof (UNS8), (void*)&MasterMap1 } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x2001 : Mapped variable MasterMap2 */ etisserant@0: subindex TestMaster_Index2001[] = etisserant@0: { etisserant@0: { RW, uint8, sizeof (UNS8), (void*)&MasterMap2 } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x2002 : Mapped variable MasterMap3 */ etisserant@0: subindex TestMaster_Index2002[] = etisserant@0: { etisserant@0: { RW, uint8, sizeof (UNS8), (void*)&MasterMap3 } etisserant@0: }; etisserant@0: etisserant@0: /* index 0x2003 : Mapped variable MasterMap4 */ etisserant@0: subindex TestMaster_Index2003[] = etisserant@0: { etisserant@0: { RW, uint8, sizeof (UNS8), (void*)&MasterMap4 } etisserant@0: }; etisserant@0: etisserant@0: const indextable TestMaster_objdict[] = etisserant@0: { etisserant@0: { (subindex*)TestMaster_Index1000,sizeof(TestMaster_Index1000)/sizeof(TestMaster_Index1000[0]), 0x1000}, etisserant@0: { (subindex*)TestMaster_Index1001,sizeof(TestMaster_Index1001)/sizeof(TestMaster_Index1001[0]), 0x1001}, etisserant@0: { (subindex*)TestMaster_Index1005,sizeof(TestMaster_Index1005)/sizeof(TestMaster_Index1005[0]), 0x1005}, etisserant@0: { (subindex*)TestMaster_Index1006,sizeof(TestMaster_Index1006)/sizeof(TestMaster_Index1006[0]), 0x1006}, oremeq@23: { (subindex*)TestMaster_Index1010,sizeof(TestMaster_Index1010)/sizeof(TestMaster_Index1010[0]), 0x1010}, oremeq@23: { (subindex*)TestMaster_Index1011,sizeof(TestMaster_Index1011)/sizeof(TestMaster_Index1011[0]), 0x1011}, etisserant@0: { (subindex*)TestMaster_Index1016,sizeof(TestMaster_Index1016)/sizeof(TestMaster_Index1016[0]), 0x1016}, etisserant@0: { (subindex*)TestMaster_Index1018,sizeof(TestMaster_Index1018)/sizeof(TestMaster_Index1018[0]), 0x1018}, etisserant@0: { (subindex*)TestMaster_Index1280,sizeof(TestMaster_Index1280)/sizeof(TestMaster_Index1280[0]), 0x1280}, etisserant@0: { (subindex*)TestMaster_Index1400,sizeof(TestMaster_Index1400)/sizeof(TestMaster_Index1400[0]), 0x1400}, etisserant@0: { (subindex*)TestMaster_Index1401,sizeof(TestMaster_Index1401)/sizeof(TestMaster_Index1401[0]), 0x1401}, etisserant@0: { (subindex*)TestMaster_Index1600,sizeof(TestMaster_Index1600)/sizeof(TestMaster_Index1600[0]), 0x1600}, etisserant@0: { (subindex*)TestMaster_Index1601,sizeof(TestMaster_Index1601)/sizeof(TestMaster_Index1601[0]), 0x1601}, etisserant@0: { (subindex*)TestMaster_Index2000,sizeof(TestMaster_Index2000)/sizeof(TestMaster_Index2000[0]), 0x2000}, etisserant@0: { (subindex*)TestMaster_Index2001,sizeof(TestMaster_Index2001)/sizeof(TestMaster_Index2001[0]), 0x2001}, etisserant@0: { (subindex*)TestMaster_Index2002,sizeof(TestMaster_Index2002)/sizeof(TestMaster_Index2002[0]), 0x2002}, etisserant@0: { (subindex*)TestMaster_Index2003,sizeof(TestMaster_Index2003)/sizeof(TestMaster_Index2003[0]), 0x2003}, etisserant@0: }; etisserant@0: etisserant@0: const indextable * TestMaster_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) etisserant@0: { etisserant@0: int i; oremeq@23: *callbacks = NULL; etisserant@0: switch(wIndex){ oremeq@23: case 0x1000: i = 0;break; oremeq@23: case 0x1001: i = 1;break; oremeq@23: case 0x1005: i = 2;*callbacks = TestMaster_Index1005_callbacks; break; oremeq@23: case 0x1006: i = 3;*callbacks = TestMaster_Index1006_callbacks; break; oremeq@23: case 0x1010: i = 4;*callbacks = TestMaster_Index1010_callbacks; break; oremeq@23: case 0x1011: i = 5;*callbacks = TestMaster_Index1011_callbacks; break; oremeq@23: case 0x1016: i = 6;break; oremeq@23: case 0x1018: i = 7;break; oremeq@23: case 0x1280: i = 8;break; oremeq@23: case 0x1400: i = 9;break; oremeq@23: case 0x1401: i = 10;break; oremeq@23: case 0x1600: i = 11;break; oremeq@23: case 0x1601: i = 12;break; oremeq@23: case 0x2000: i = 13;*callbacks = MasterMap1_callbacks; break; oremeq@23: case 0x2001: i = 14;break; oremeq@23: case 0x2002: i = 15;break; oremeq@23: case 0x2003: i = 16;break; etisserant@0: default: etisserant@0: *errorCode = OD_NO_SUCH_OBJECT; etisserant@0: return NULL; etisserant@0: } etisserant@0: *errorCode = OD_SUCCESSFUL; etisserant@0: return &TestMaster_objdict[i]; etisserant@0: } etisserant@0: frdupin@79: /* To count at which received SYNC a PDO must be sent. frdupin@79: * Even if no pdoTransmit are defined, at least one entry is computed frdupin@79: * for compilations issues. frdupin@79: */ etisserant@0: UNS8 TestMaster_count_sync[1] = {0,}; etisserant@0: etisserant@0: quick_index TestMaster_firstIndex = { frdupin@79: 0, /* SDO_SVR */ frdupin@79: 8, /* SDO_CLT */ frdupin@79: 9, /* PDO_RCV */ frdupin@79: 11, /* PDO_RCV_MAP */ frdupin@79: 0, /* PDO_TRS */ frdupin@79: 0 /* PDO_TRS_MAP */ etisserant@0: }; etisserant@0: etisserant@0: quick_index TestMaster_lastIndex = { frdupin@79: 0, /* SDO_SVR */ frdupin@79: 8, /* SDO_CLT */ frdupin@79: 10, /* PDO_RCV */ frdupin@79: 12, /* PDO_RCV_MAP */ frdupin@79: 0, /* PDO_TRS */ frdupin@79: 0 /* PDO_TRS_MAP */ etisserant@0: }; etisserant@0: etisserant@0: UNS16 TestMaster_ObjdictSize = sizeof(TestMaster_objdict)/sizeof(TestMaster_objdict[0]); etisserant@0: etisserant@0: CO_Data TestMaster_Data = CANOPEN_NODE_DATA_INITIALIZER(TestMaster); etisserant@0: