etisserant@145: etisserant@145: /* File generated by gen_cfile.py. Should not be modified. */ etisserant@145: etisserant@145: #include "TestSlave.h" etisserant@145: etisserant@145: /**************************************************************************/ etisserant@145: /* Declaration of the mapped variables */ etisserant@145: /**************************************************************************/ etisserant@145: UNS8 SlaveMap1 = 0x0; /* Mapped at index 0x2000, subindex 0x00 */ etisserant@145: UNS8 SlaveMap2 = 0x0; /* Mapped at index 0x2001, subindex 0x00 */ etisserant@145: UNS8 SlaveMap3 = 0x0; /* Mapped at index 0x2002, subindex 0x00 */ etisserant@145: UNS8 SlaveMap4 = 0x0; /* Mapped at index 0x2003, subindex 0x00 */ etisserant@145: etisserant@145: /**************************************************************************/ etisserant@145: /* Declaration of the value range types */ etisserant@145: /**************************************************************************/ etisserant@145: etisserant@145: UNS32 TestSlave_valueRangeTest (UNS8 typeValue, void * value) etisserant@145: { etisserant@145: switch (typeValue) { etisserant@145: } etisserant@145: return 0; etisserant@145: } etisserant@145: etisserant@145: /**************************************************************************/ etisserant@145: /* The node id */ etisserant@145: /**************************************************************************/ etisserant@145: /* node_id default value.*/ etisserant@145: UNS8 TestSlave_bDeviceNodeId = 0x00; etisserant@145: etisserant@145: /**************************************************************************/ etisserant@145: /* Array of message processing information */ etisserant@145: etisserant@145: const UNS8 TestSlave_iam_a_slave = 1; etisserant@145: etisserant@145: TIMER_HANDLE TestSlave_heartBeatTimers[1]; etisserant@145: etisserant@145: /* etisserant@145: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ etisserant@145: etisserant@145: OBJECT DICTIONARY etisserant@145: etisserant@145: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ etisserant@145: */ etisserant@145: etisserant@145: /* index 0x1000 : Device Type. */ etisserant@145: UNS32 TestSlave_obj1000 = 0x12D; /* 301 */ etisserant@145: subindex TestSlave_Index1000[] = etisserant@145: { etisserant@145: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1000 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1001 : Error Register. */ etisserant@145: UNS8 TestSlave_obj1001 = 0x0; /* 0 */ etisserant@145: subindex TestSlave_Index1001[] = etisserant@145: { etisserant@145: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_obj1001 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1005 : SYNC COB ID. */ etisserant@145: UNS32 TestSlave_obj1005 = 0x80; /* 128 */ etisserant@145: ODCallback_t TestSlave_Index1005_callbacks[] = etisserant@145: { etisserant@145: NULL, etisserant@145: }; etisserant@145: subindex TestSlave_Index1005[] = etisserant@145: { etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1005 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1006 : Communication / Cycle Period. */ etisserant@145: UNS32 TestSlave_obj1006 = 0x0; /* 0 */ etisserant@145: ODCallback_t TestSlave_Index1006_callbacks[] = etisserant@145: { etisserant@145: NULL, etisserant@145: }; etisserant@145: subindex TestSlave_Index1006[] = etisserant@145: { etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1006 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1010 : Store parameters. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1010 = 4; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1010_Save_All_Parameters = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1010_Save_Communication_Parameters = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1010_Save_Application_Parameters = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1010_Save_Manufacturer_Parameters = 0x0; /* 0 */ etisserant@145: ODCallback_t TestSlave_Index1010_callbacks[] = etisserant@145: { etisserant@145: NULL, etisserant@145: NULL, etisserant@145: NULL, etisserant@145: NULL, etisserant@145: NULL, etisserant@145: }; etisserant@145: subindex TestSlave_Index1010[] = etisserant@145: { etisserant@145: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1010 }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_All_Parameters }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_Communication_Parameters }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_Application_Parameters }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_Manufacturer_Parameters } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1011 : Restore Default Parameters. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1011 = 4; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1011_Restore_All_Default_Parameters = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1011_Restore_Communication_Default_Parameters = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1011_Restore_Application_Default_Parameters = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1011_Restore_Manufacturer_Default_Parameters = 0x0; /* 0 */ etisserant@145: ODCallback_t TestSlave_Index1011_callbacks[] = etisserant@145: { etisserant@145: NULL, etisserant@145: NULL, etisserant@145: NULL, etisserant@145: NULL, etisserant@145: NULL, etisserant@145: }; etisserant@145: subindex TestSlave_Index1011[] = etisserant@145: { etisserant@145: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1011 }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_All_Default_Parameters }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_Communication_Default_Parameters }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_Application_Default_Parameters }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_Manufacturer_Default_Parameters } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1016 : Consumer Heartbeat Time */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1016 = 0; etisserant@145: UNS32 TestSlave_obj1016[]={0}; etisserant@145: etisserant@145: /* index 0x1017 : Producer Heartbeat Time. */ etisserant@145: UNS16 TestSlave_obj1017 = 0x3E8; /* 1000 */ etisserant@145: subindex TestSlave_Index1017[] = etisserant@145: { etisserant@145: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1017 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1018 : Identity. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1018_Vendor_ID = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1018_Product_Code = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1018_Revision_Number = 0x0; /* 0 */ etisserant@145: UNS32 TestSlave_obj1018_Serial_Number = 0x0; /* 0 */ etisserant@145: subindex TestSlave_Index1018[] = etisserant@145: { etisserant@145: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1018 }, etisserant@145: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Vendor_ID }, etisserant@145: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Product_Code }, etisserant@145: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Revision_Number }, etisserant@145: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Serial_Number } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1200 : Server SDO Parameter. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x601; /* 1537 */ etisserant@145: UNS32 TestSlave_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x581; /* 1409 */ etisserant@145: subindex TestSlave_Index1200[] = etisserant@145: { etisserant@145: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1200 }, etisserant@145: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1200_COB_ID_Client_to_Server_Receive_SDO }, etisserant@145: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1200_COB_ID_Server_to_Client_Transmit_SDO } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1800 : Transmit PDO 1 Parameter. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1800_COB_ID_used_by_PDO = 0x182; /* 386 */ etisserant@145: UNS8 TestSlave_obj1800_Transmission_Type = 0x1; /* 1 */ etisserant@145: UNS16 TestSlave_obj1800_Inhibit_Time = 0x0; /* 0 */ etisserant@145: UNS16 TestSlave_obj1800_Compatibility_Entry = 0x0; /* 0 */ etisserant@145: UNS16 TestSlave_obj1800_Event_Timer = 0x0; /* 0 */ etisserant@145: subindex TestSlave_Index1800[] = etisserant@145: { etisserant@145: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1800 }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1800_COB_ID_used_by_PDO }, etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1800_Transmission_Type }, etisserant@145: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1800_Inhibit_Time }, etisserant@145: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1800_Compatibility_Entry }, etisserant@145: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1800_Event_Timer } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1801 : Transmit PDO 2 Parameter. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1801 = 5; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1801_COB_ID_used_by_PDO = 0x282; /* 642 */ etisserant@145: UNS8 TestSlave_obj1801_Transmission_Type = 0x1; /* 1 */ etisserant@145: UNS16 TestSlave_obj1801_Inhibit_Time = 0x0; /* 0 */ etisserant@145: UNS16 TestSlave_obj1801_Compatibility_Entry = 0x0; /* 0 */ etisserant@145: UNS16 TestSlave_obj1801_Event_Timer = 0x0; /* 0 */ etisserant@145: subindex TestSlave_Index1801[] = etisserant@145: { etisserant@145: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1801 }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1801_COB_ID_used_by_PDO }, etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1801_Transmission_Type }, etisserant@145: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1801_Inhibit_Time }, etisserant@145: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1801_Compatibility_Entry }, etisserant@145: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1801_Event_Timer } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1A00 : Transmit PDO 1 Mapping. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1A00 = 2; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1A00[] = etisserant@145: { etisserant@145: 0x20000008, /* 536870920 */ etisserant@145: 0x20010008 /* 536936456 */ etisserant@145: }; etisserant@145: subindex TestSlave_Index1A00[] = etisserant@145: { etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1A00 }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[0] }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[1] } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x1A01 : Transmit PDO 2 Mapping. */ etisserant@145: UNS8 TestSlave_highestSubIndex_obj1A01 = 2; /* number of subindex - 1*/ etisserant@145: UNS32 TestSlave_obj1A01[] = etisserant@145: { etisserant@145: 0x20020008, /* 537001992 */ etisserant@145: 0x20030008 /* 537067528 */ etisserant@145: }; etisserant@145: subindex TestSlave_Index1A01[] = etisserant@145: { etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1A01 }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A01[0] }, etisserant@145: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A01[1] } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x2000 : Mapped variable SlaveMap1 */ etisserant@145: subindex TestSlave_Index2000[] = etisserant@145: { etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&SlaveMap1 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x2001 : Mapped variable SlaveMap2 */ etisserant@145: subindex TestSlave_Index2001[] = etisserant@145: { etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&SlaveMap2 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x2002 : Mapped variable SlaveMap3 */ etisserant@145: subindex TestSlave_Index2002[] = etisserant@145: { etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&SlaveMap3 } etisserant@145: }; etisserant@145: etisserant@145: /* index 0x2003 : Mapped variable SlaveMap4 */ etisserant@145: subindex TestSlave_Index2003[] = etisserant@145: { etisserant@145: { RW, uint8, sizeof (UNS8), (void*)&SlaveMap4 } etisserant@145: }; etisserant@145: etisserant@145: const indextable TestSlave_objdict[] = etisserant@145: { etisserant@145: { (subindex*)TestSlave_Index1000,sizeof(TestSlave_Index1000)/sizeof(TestSlave_Index1000[0]), 0x1000}, etisserant@145: { (subindex*)TestSlave_Index1001,sizeof(TestSlave_Index1001)/sizeof(TestSlave_Index1001[0]), 0x1001}, etisserant@145: { (subindex*)TestSlave_Index1005,sizeof(TestSlave_Index1005)/sizeof(TestSlave_Index1005[0]), 0x1005}, etisserant@145: { (subindex*)TestSlave_Index1006,sizeof(TestSlave_Index1006)/sizeof(TestSlave_Index1006[0]), 0x1006}, etisserant@145: { (subindex*)TestSlave_Index1010,sizeof(TestSlave_Index1010)/sizeof(TestSlave_Index1010[0]), 0x1010}, etisserant@145: { (subindex*)TestSlave_Index1011,sizeof(TestSlave_Index1011)/sizeof(TestSlave_Index1011[0]), 0x1011}, etisserant@145: { (subindex*)TestSlave_Index1017,sizeof(TestSlave_Index1017)/sizeof(TestSlave_Index1017[0]), 0x1017}, etisserant@145: { (subindex*)TestSlave_Index1018,sizeof(TestSlave_Index1018)/sizeof(TestSlave_Index1018[0]), 0x1018}, etisserant@145: { (subindex*)TestSlave_Index1200,sizeof(TestSlave_Index1200)/sizeof(TestSlave_Index1200[0]), 0x1200}, etisserant@145: { (subindex*)TestSlave_Index1800,sizeof(TestSlave_Index1800)/sizeof(TestSlave_Index1800[0]), 0x1800}, etisserant@145: { (subindex*)TestSlave_Index1801,sizeof(TestSlave_Index1801)/sizeof(TestSlave_Index1801[0]), 0x1801}, etisserant@145: { (subindex*)TestSlave_Index1A00,sizeof(TestSlave_Index1A00)/sizeof(TestSlave_Index1A00[0]), 0x1A00}, etisserant@145: { (subindex*)TestSlave_Index1A01,sizeof(TestSlave_Index1A01)/sizeof(TestSlave_Index1A01[0]), 0x1A01}, etisserant@145: { (subindex*)TestSlave_Index2000,sizeof(TestSlave_Index2000)/sizeof(TestSlave_Index2000[0]), 0x2000}, etisserant@145: { (subindex*)TestSlave_Index2001,sizeof(TestSlave_Index2001)/sizeof(TestSlave_Index2001[0]), 0x2001}, etisserant@145: { (subindex*)TestSlave_Index2002,sizeof(TestSlave_Index2002)/sizeof(TestSlave_Index2002[0]), 0x2002}, etisserant@145: { (subindex*)TestSlave_Index2003,sizeof(TestSlave_Index2003)/sizeof(TestSlave_Index2003[0]), 0x2003}, etisserant@145: }; etisserant@145: etisserant@145: const indextable * TestSlave_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) etisserant@145: { etisserant@145: int i; etisserant@145: *callbacks = NULL; etisserant@145: switch(wIndex){ etisserant@145: case 0x1000: i = 0;break; etisserant@145: case 0x1001: i = 1;break; etisserant@145: case 0x1005: i = 2;*callbacks = TestSlave_Index1005_callbacks; break; etisserant@145: case 0x1006: i = 3;*callbacks = TestSlave_Index1006_callbacks; break; etisserant@145: case 0x1010: i = 4;*callbacks = TestSlave_Index1010_callbacks; break; etisserant@145: case 0x1011: i = 5;*callbacks = TestSlave_Index1011_callbacks; break; etisserant@145: case 0x1017: i = 6;break; etisserant@145: case 0x1018: i = 7;break; etisserant@145: case 0x1200: i = 8;break; etisserant@145: case 0x1800: i = 9;break; etisserant@145: case 0x1801: i = 10;break; etisserant@145: case 0x1A00: i = 11;break; etisserant@145: case 0x1A01: i = 12;break; etisserant@145: case 0x2000: i = 13;break; etisserant@145: case 0x2001: i = 14;break; etisserant@145: case 0x2002: i = 15;break; etisserant@145: case 0x2003: i = 16;break; etisserant@145: default: etisserant@145: *errorCode = OD_NO_SUCH_OBJECT; etisserant@145: return NULL; etisserant@145: } etisserant@145: *errorCode = OD_SUCCESSFUL; etisserant@145: return &TestSlave_objdict[i]; etisserant@145: } etisserant@145: etisserant@145: /* To count at which received SYNC a PDO must be sent. etisserant@145: * Even if no pdoTransmit are defined, at least one entry is computed etisserant@145: * for compilations issues. etisserant@145: */ etisserant@145: UNS8 TestSlave_count_sync[2] = {0,}; etisserant@145: etisserant@145: quick_index TestSlave_firstIndex = { etisserant@145: 8, /* SDO_SVR */ etisserant@145: 0, /* SDO_CLT */ etisserant@145: 0, /* PDO_RCV */ etisserant@145: 0, /* PDO_RCV_MAP */ etisserant@145: 9, /* PDO_TRS */ etisserant@145: 11 /* PDO_TRS_MAP */ etisserant@145: }; etisserant@145: etisserant@145: quick_index TestSlave_lastIndex = { etisserant@145: 8, /* SDO_SVR */ etisserant@145: 0, /* SDO_CLT */ etisserant@145: 0, /* PDO_RCV */ etisserant@145: 0, /* PDO_RCV_MAP */ etisserant@145: 10, /* PDO_TRS */ etisserant@145: 12 /* PDO_TRS_MAP */ etisserant@145: }; etisserant@145: etisserant@145: UNS16 TestSlave_ObjdictSize = sizeof(TestSlave_objdict)/sizeof(TestSlave_objdict[0]); etisserant@145: etisserant@145: CO_Data TestSlave_Data = CANOPEN_NODE_DATA_INITIALIZER(TestSlave); etisserant@145: