etisserant@391: etisserant@391: /* File generated by gen_cfile.py. Should not be modified. */ etisserant@391: etisserant@391: #include "TestSlave.h" etisserant@391: etisserant@391: /**************************************************************************/ etisserant@391: /* Declaration of the mapped variables */ etisserant@391: /**************************************************************************/ etisserant@391: UNS8 SlaveMap1 = 0x0; /* Mapped at index 0x2000, subindex 0x00 */ etisserant@391: UNS8 SlaveMap2 = 0x0; /* Mapped at index 0x2001, subindex 0x00 */ etisserant@391: UNS8 SlaveMap3 = 0x0; /* Mapped at index 0x2002, subindex 0x00 */ etisserant@391: UNS8 SlaveMap4 = 0x0; /* Mapped at index 0x2003, subindex 0x00 */ etisserant@391: UNS8 SlaveMap5 = 0x0; /* Mapped at index 0x2004, subindex 0x00 */ etisserant@391: UNS8 SlaveMap6 = 0x0; /* Mapped at index 0x2005, subindex 0x00 */ etisserant@391: UNS8 SlaveMap7 = 0x0; /* Mapped at index 0x2006, subindex 0x00 */ etisserant@391: UNS8 SlaveMap8 = 0x0; /* Mapped at index 0x2007, subindex 0x00 */ etisserant@391: UNS8 SlaveMap9 = 0x0; /* Mapped at index 0x2008, subindex 0x00 */ etisserant@391: UNS32 SlaveMap10 = 0x0; /* Mapped at index 0x2009, subindex 0x00 */ etisserant@391: UNS16 SlaveMap11 = 0x0; /* Mapped at index 0x200A, subindex 0x00 */ etisserant@391: INTEGER16 SlaveMap12 = 0x0; /* Mapped at index 0x200B, subindex 0x00 */ etisserant@391: INTEGER16 SlaveMap13 = 0x4D2; /* Mapped at index 0x200C, subindex 0x00 */ etisserant@391: etisserant@391: /**************************************************************************/ etisserant@391: /* Declaration of the value range types */ etisserant@391: /**************************************************************************/ etisserant@391: etisserant@391: #define valueRange_EMC 0x9F /* Type for index 0x1003 subindex 0x00 (only set of value 0 is possible) */ etisserant@391: UNS32 TestSlave_valueRangeTest (UNS8 typeValue, void * value) etisserant@391: { etisserant@391: switch (typeValue) { etisserant@391: case valueRange_EMC: etisserant@391: if (*(UNS8*)value != (UNS8)0) return OD_VALUE_RANGE_EXCEEDED; etisserant@391: break; etisserant@391: } etisserant@391: return 0; etisserant@391: } etisserant@391: etisserant@391: /**************************************************************************/ etisserant@391: /* The node id */ etisserant@391: /**************************************************************************/ etisserant@391: /* node_id default value.*/ etisserant@391: UNS8 TestSlave_bDeviceNodeId = 0x00; etisserant@391: etisserant@391: /**************************************************************************/ etisserant@391: /* Array of message processing information */ etisserant@391: etisserant@391: const UNS8 TestSlave_iam_a_slave = 1; etisserant@391: etisserant@391: TIMER_HANDLE TestSlave_heartBeatTimers[1]; etisserant@391: etisserant@391: /* etisserant@391: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ etisserant@391: etisserant@391: OBJECT DICTIONARY etisserant@391: etisserant@391: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ etisserant@391: */ etisserant@391: etisserant@391: /* index 0x1000 : Device Type. */ etisserant@391: UNS32 TestSlave_obj1000 = 0x12D; /* 301 */ etisserant@391: subindex TestSlave_Index1000[] = etisserant@391: { etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1000 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1001 : Error Register. */ etisserant@391: UNS8 TestSlave_obj1001 = 0x0; /* 0 */ etisserant@391: subindex TestSlave_Index1001[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_obj1001 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1003 : Pre-defined Error Field. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1003 = 0; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1003[] = etisserant@391: { etisserant@391: 0x0, /* 0 */ etisserant@391: 0x0, /* 0 */ etisserant@391: 0x0, /* 0 */ etisserant@391: 0x0, /* 0 */ etisserant@391: 0x0, /* 0 */ etisserant@391: 0x0, /* 0 */ etisserant@391: 0x0, /* 0 */ etisserant@391: 0x0 /* 0 */ etisserant@391: }; etisserant@391: ODCallback_t TestSlave_Index1003_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1003[] = etisserant@391: { etisserant@391: { RW, valueRange_EMC, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1003 }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[0] }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[1] }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[2] }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[3] }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[4] }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[5] }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[6] }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1003[7] } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1005 : SYNC COB ID. */ etisserant@391: UNS32 TestSlave_obj1005 = 0x80; /* 128 */ etisserant@391: ODCallback_t TestSlave_Index1005_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1005[] = etisserant@391: { etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1005 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1006 : Communication / Cycle Period. */ etisserant@391: UNS32 TestSlave_obj1006 = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1006_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1006[] = etisserant@391: { etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1006 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1010 : Store parameters. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1010 = 4; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1010_Save_All_Parameters = 0x0; /* 0 */ etisserant@391: UNS32 TestSlave_obj1010_Save_Communication_Parameters = 0x0; /* 0 */ etisserant@391: UNS32 TestSlave_obj1010_Save_Application_Parameters = 0x0; /* 0 */ etisserant@391: UNS32 TestSlave_obj1010_Save_Manufacturer_Parameters = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1010_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1010[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1010 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_All_Parameters }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_Communication_Parameters }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_Application_Parameters }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1010_Save_Manufacturer_Parameters } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1011 : Restore Default Parameters. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1011 = 4; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1011_Restore_All_Default_Parameters = 0x0; /* 0 */ etisserant@391: UNS32 TestSlave_obj1011_Restore_Communication_Default_Parameters = 0x0; /* 0 */ etisserant@391: UNS32 TestSlave_obj1011_Restore_Application_Default_Parameters = 0x0; /* 0 */ etisserant@391: UNS32 TestSlave_obj1011_Restore_Manufacturer_Default_Parameters = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1011_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1011[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1011 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_All_Default_Parameters }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_Communication_Default_Parameters }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_Application_Default_Parameters }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1011_Restore_Manufacturer_Default_Parameters } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1014 : Emergency COB ID. */ etisserant@391: UNS32 TestSlave_obj1014 = 0x80; /* 128 */ etisserant@391: subindex TestSlave_Index1014[] = etisserant@391: { etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1014 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1016 : Consumer Heartbeat Time */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1016 = 0; etisserant@391: UNS32 TestSlave_obj1016[]={0}; etisserant@391: etisserant@391: /* index 0x1017 : Producer Heartbeat Time. */ etisserant@391: UNS16 TestSlave_obj1017 = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1017_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1017[] = etisserant@391: { etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1017 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1018 : Identity. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1018_Vendor_ID = 0x12345678; /* 305419896 */ etisserant@391: UNS32 TestSlave_obj1018_Product_Code = 0x90123456; /* 2417112150 */ etisserant@391: UNS32 TestSlave_obj1018_Revision_Number = 0x78901234; /* 2022707764 */ etisserant@391: UNS32 TestSlave_obj1018_Serial_Number = 0x56789012; /* 1450741778 */ etisserant@391: subindex TestSlave_Index1018[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1018 }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Vendor_ID }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Product_Code }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Revision_Number }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1018_Serial_Number } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1200 : Server SDO Parameter. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600; /* 1536 */ etisserant@391: UNS32 TestSlave_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x580; /* 1408 */ etisserant@391: subindex TestSlave_Index1200[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1200 }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1200_COB_ID_Client_to_Server_Receive_SDO }, etisserant@391: { RO, uint32, sizeof (UNS32), (void*)&TestSlave_obj1200_COB_ID_Server_to_Client_Transmit_SDO } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1800 : Transmit PDO 1 Parameter. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1800_COB_ID_used_by_PDO = 0x180; /* 384 */ etisserant@391: UNS8 TestSlave_obj1800_Transmission_Type = 0x0; /* 0 */ etisserant@391: UNS16 TestSlave_obj1800_Inhibit_Time = 0x0; /* 0 */ etisserant@391: UNS8 TestSlave_obj1800_Compatibility_Entry = 0x0; /* 0 */ etisserant@391: UNS16 TestSlave_obj1800_Event_Timer = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1800_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1800[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1800 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1800_COB_ID_used_by_PDO }, etisserant@391: { RW|TO_BE_SAVE, uint8, sizeof (UNS8), (void*)&TestSlave_obj1800_Transmission_Type }, etisserant@391: { RW|TO_BE_SAVE, uint16, sizeof (UNS16), (void*)&TestSlave_obj1800_Inhibit_Time }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1800_Compatibility_Entry }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1800_Event_Timer } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1801 : Transmit PDO 2 Parameter. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1801 = 5; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1801_COB_ID_used_by_PDO = 0x280; /* 640 */ etisserant@391: UNS8 TestSlave_obj1801_Transmission_Type = 0x0; /* 0 */ etisserant@391: UNS16 TestSlave_obj1801_Inhibit_Time = 0x0; /* 0 */ etisserant@391: UNS8 TestSlave_obj1801_Compatibility_Entry = 0x0; /* 0 */ etisserant@391: UNS16 TestSlave_obj1801_Event_Timer = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1801_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1801[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1801 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1801_COB_ID_used_by_PDO }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1801_Transmission_Type }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1801_Inhibit_Time }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1801_Compatibility_Entry }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1801_Event_Timer } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1802 : Transmit PDO 3 Parameter. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1802 = 5; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1802_COB_ID_used_by_PDO = 0x380; /* 896 */ etisserant@391: UNS8 TestSlave_obj1802_Transmission_Type = 0xFF; /* 255 */ etisserant@391: UNS16 TestSlave_obj1802_Inhibit_Time = 0x1388; /* 5000 */ etisserant@391: UNS8 TestSlave_obj1802_Compatibility_Entry = 0x0; /* 0 */ etisserant@391: UNS16 TestSlave_obj1802_Event_Timer = 0x3E8; /* 1000 */ etisserant@391: ODCallback_t TestSlave_Index1802_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1802[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1802 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1802_COB_ID_used_by_PDO }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1802_Transmission_Type }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1802_Inhibit_Time }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1802_Compatibility_Entry }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1802_Event_Timer } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1803 : Transmit PDO 4 Parameter. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1803 = 5; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1803_COB_ID_used_by_PDO = 0x480; /* 1152 */ etisserant@391: UNS8 TestSlave_obj1803_Transmission_Type = 0xFC; /* 252 */ etisserant@391: UNS16 TestSlave_obj1803_Inhibit_Time = 0x0; /* 0 */ etisserant@391: UNS8 TestSlave_obj1803_Compatibility_Entry = 0x0; /* 0 */ etisserant@391: UNS16 TestSlave_obj1803_Event_Timer = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1803_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1803[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1803 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1803_COB_ID_used_by_PDO }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1803_Transmission_Type }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1803_Inhibit_Time }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1803_Compatibility_Entry }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1803_Event_Timer } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1804 : Transmit PDO 5 Parameter. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1804 = 5; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1804_COB_ID_used_by_PDO = 0x401; /* 1025 */ etisserant@391: UNS8 TestSlave_obj1804_Transmission_Type = 0xFD; /* 253 */ etisserant@391: UNS16 TestSlave_obj1804_Inhibit_Time = 0x0; /* 0 */ etisserant@391: UNS8 TestSlave_obj1804_Compatibility_Entry = 0x0; /* 0 */ etisserant@391: UNS16 TestSlave_obj1804_Event_Timer = 0x0; /* 0 */ etisserant@391: ODCallback_t TestSlave_Index1804_callbacks[] = etisserant@391: { etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: NULL, etisserant@391: }; etisserant@391: subindex TestSlave_Index1804[] = etisserant@391: { etisserant@391: { RO, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1804 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1804_COB_ID_used_by_PDO }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1804_Transmission_Type }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1804_Inhibit_Time }, etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_obj1804_Compatibility_Entry }, etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&TestSlave_obj1804_Event_Timer } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1A00 : Transmit PDO 1 Mapping. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1A00 = 10; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1A00[] = etisserant@391: { etisserant@391: 0x20000001, /* 536870913 */ etisserant@391: 0x20010001, /* 536936449 */ etisserant@391: 0x20020001, /* 537001985 */ etisserant@391: 0x20030001, /* 537067521 */ etisserant@391: 0x20040001, /* 537133057 */ etisserant@391: 0x20050001, /* 537198593 */ etisserant@391: 0x20060001, /* 537264129 */ etisserant@391: 0x20070001, /* 537329665 */ etisserant@391: 0x20080008, /* 537395208 */ etisserant@391: 0x20090020 /* 537460768 */ etisserant@391: }; etisserant@391: subindex TestSlave_Index1A00[] = etisserant@391: { etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1A00 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[0] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[1] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[2] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[3] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[4] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[5] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[6] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[7] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[8] }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A00[9] } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1A01 : Transmit PDO 2 Mapping. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1A01 = 1; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1A01[] = etisserant@391: { etisserant@391: 0x200A0010 /* 537526288 */ etisserant@391: }; etisserant@391: subindex TestSlave_Index1A01[] = etisserant@391: { etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1A01 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A01[0] } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1A02 : Transmit PDO 3 Mapping. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1A02 = 1; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1A02[] = etisserant@391: { etisserant@391: 0x200B0010 /* 537591824 */ etisserant@391: }; etisserant@391: subindex TestSlave_Index1A02[] = etisserant@391: { etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1A02 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A02[0] } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1A03 : Transmit PDO 4 Mapping. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1A03 = 1; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1A03[] = etisserant@391: { etisserant@391: 0x200C0010 /* 537657360 */ etisserant@391: }; etisserant@391: subindex TestSlave_Index1A03[] = etisserant@391: { etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1A03 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A03[0] } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x1A04 : Transmit PDO 5 Mapping. */ etisserant@391: UNS8 TestSlave_highestSubIndex_obj1A04 = 1; /* number of subindex - 1*/ etisserant@391: UNS32 TestSlave_obj1A04[] = etisserant@391: { etisserant@391: 0x200C0010 /* 537657360 */ etisserant@391: }; etisserant@391: subindex TestSlave_Index1A04[] = etisserant@391: { etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&TestSlave_highestSubIndex_obj1A04 }, etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&TestSlave_obj1A04[0] } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2000 : Mapped variable SlaveMap1 */ etisserant@391: subindex TestSlave_Index2000[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap1 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2001 : Mapped variable SlaveMap2 */ etisserant@391: subindex TestSlave_Index2001[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap2 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2002 : Mapped variable SlaveMap3 */ etisserant@391: subindex TestSlave_Index2002[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap3 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2003 : Mapped variable SlaveMap4 */ etisserant@391: subindex TestSlave_Index2003[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap4 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2004 : Mapped variable SlaveMap5 */ etisserant@391: subindex TestSlave_Index2004[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap5 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2005 : Mapped variable SlaveMap6 */ etisserant@391: subindex TestSlave_Index2005[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap6 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2006 : Mapped variable SlaveMap7 */ etisserant@391: subindex TestSlave_Index2006[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap7 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2007 : Mapped variable SlaveMap8 */ etisserant@391: subindex TestSlave_Index2007[] = etisserant@391: { etisserant@391: { RW, boolean, sizeof (UNS8), (void*)&SlaveMap8 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2008 : Mapped variable SlaveMap9 */ etisserant@391: subindex TestSlave_Index2008[] = etisserant@391: { etisserant@391: { RW, uint8, sizeof (UNS8), (void*)&SlaveMap9 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x2009 : Mapped variable SlaveMap10 */ etisserant@391: subindex TestSlave_Index2009[] = etisserant@391: { etisserant@391: { RW, uint32, sizeof (UNS32), (void*)&SlaveMap10 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x200A : Mapped variable SlaveMap11 */ etisserant@391: subindex TestSlave_Index200A[] = etisserant@391: { etisserant@391: { RW, uint16, sizeof (UNS16), (void*)&SlaveMap11 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x200B : Mapped variable SlaveMap12 */ etisserant@391: subindex TestSlave_Index200B[] = etisserant@391: { etisserant@391: { RW, int16, sizeof (INTEGER16), (void*)&SlaveMap12 } etisserant@391: }; etisserant@391: etisserant@391: /* index 0x200C : Mapped variable SlaveMap13 */ etisserant@391: subindex TestSlave_Index200C[] = etisserant@391: { etisserant@391: { RW, int16, sizeof (INTEGER16), (void*)&SlaveMap13 } etisserant@391: }; etisserant@391: etisserant@391: const indextable TestSlave_objdict[] = etisserant@391: { etisserant@391: { (subindex*)TestSlave_Index1000,sizeof(TestSlave_Index1000)/sizeof(TestSlave_Index1000[0]), 0x1000}, etisserant@391: { (subindex*)TestSlave_Index1001,sizeof(TestSlave_Index1001)/sizeof(TestSlave_Index1001[0]), 0x1001}, etisserant@391: { (subindex*)TestSlave_Index1003,sizeof(TestSlave_Index1003)/sizeof(TestSlave_Index1003[0]), 0x1003}, etisserant@391: { (subindex*)TestSlave_Index1005,sizeof(TestSlave_Index1005)/sizeof(TestSlave_Index1005[0]), 0x1005}, etisserant@391: { (subindex*)TestSlave_Index1006,sizeof(TestSlave_Index1006)/sizeof(TestSlave_Index1006[0]), 0x1006}, etisserant@391: { (subindex*)TestSlave_Index1010,sizeof(TestSlave_Index1010)/sizeof(TestSlave_Index1010[0]), 0x1010}, etisserant@391: { (subindex*)TestSlave_Index1011,sizeof(TestSlave_Index1011)/sizeof(TestSlave_Index1011[0]), 0x1011}, etisserant@391: { (subindex*)TestSlave_Index1014,sizeof(TestSlave_Index1014)/sizeof(TestSlave_Index1014[0]), 0x1014}, etisserant@391: { (subindex*)TestSlave_Index1017,sizeof(TestSlave_Index1017)/sizeof(TestSlave_Index1017[0]), 0x1017}, etisserant@391: { (subindex*)TestSlave_Index1018,sizeof(TestSlave_Index1018)/sizeof(TestSlave_Index1018[0]), 0x1018}, etisserant@391: { (subindex*)TestSlave_Index1200,sizeof(TestSlave_Index1200)/sizeof(TestSlave_Index1200[0]), 0x1200}, etisserant@391: { (subindex*)TestSlave_Index1800,sizeof(TestSlave_Index1800)/sizeof(TestSlave_Index1800[0]), 0x1800}, etisserant@391: { (subindex*)TestSlave_Index1801,sizeof(TestSlave_Index1801)/sizeof(TestSlave_Index1801[0]), 0x1801}, etisserant@391: { (subindex*)TestSlave_Index1802,sizeof(TestSlave_Index1802)/sizeof(TestSlave_Index1802[0]), 0x1802}, etisserant@391: { (subindex*)TestSlave_Index1803,sizeof(TestSlave_Index1803)/sizeof(TestSlave_Index1803[0]), 0x1803}, etisserant@391: { (subindex*)TestSlave_Index1804,sizeof(TestSlave_Index1804)/sizeof(TestSlave_Index1804[0]), 0x1804}, etisserant@391: { (subindex*)TestSlave_Index1A00,sizeof(TestSlave_Index1A00)/sizeof(TestSlave_Index1A00[0]), 0x1A00}, etisserant@391: { (subindex*)TestSlave_Index1A01,sizeof(TestSlave_Index1A01)/sizeof(TestSlave_Index1A01[0]), 0x1A01}, etisserant@391: { (subindex*)TestSlave_Index1A02,sizeof(TestSlave_Index1A02)/sizeof(TestSlave_Index1A02[0]), 0x1A02}, etisserant@391: { (subindex*)TestSlave_Index1A03,sizeof(TestSlave_Index1A03)/sizeof(TestSlave_Index1A03[0]), 0x1A03}, etisserant@391: { (subindex*)TestSlave_Index1A04,sizeof(TestSlave_Index1A04)/sizeof(TestSlave_Index1A04[0]), 0x1A04}, etisserant@391: { (subindex*)TestSlave_Index2000,sizeof(TestSlave_Index2000)/sizeof(TestSlave_Index2000[0]), 0x2000}, etisserant@391: { (subindex*)TestSlave_Index2001,sizeof(TestSlave_Index2001)/sizeof(TestSlave_Index2001[0]), 0x2001}, etisserant@391: { (subindex*)TestSlave_Index2002,sizeof(TestSlave_Index2002)/sizeof(TestSlave_Index2002[0]), 0x2002}, etisserant@391: { (subindex*)TestSlave_Index2003,sizeof(TestSlave_Index2003)/sizeof(TestSlave_Index2003[0]), 0x2003}, etisserant@391: { (subindex*)TestSlave_Index2004,sizeof(TestSlave_Index2004)/sizeof(TestSlave_Index2004[0]), 0x2004}, etisserant@391: { (subindex*)TestSlave_Index2005,sizeof(TestSlave_Index2005)/sizeof(TestSlave_Index2005[0]), 0x2005}, etisserant@391: { (subindex*)TestSlave_Index2006,sizeof(TestSlave_Index2006)/sizeof(TestSlave_Index2006[0]), 0x2006}, etisserant@391: { (subindex*)TestSlave_Index2007,sizeof(TestSlave_Index2007)/sizeof(TestSlave_Index2007[0]), 0x2007}, etisserant@391: { (subindex*)TestSlave_Index2008,sizeof(TestSlave_Index2008)/sizeof(TestSlave_Index2008[0]), 0x2008}, etisserant@391: { (subindex*)TestSlave_Index2009,sizeof(TestSlave_Index2009)/sizeof(TestSlave_Index2009[0]), 0x2009}, etisserant@391: { (subindex*)TestSlave_Index200A,sizeof(TestSlave_Index200A)/sizeof(TestSlave_Index200A[0]), 0x200A}, etisserant@391: { (subindex*)TestSlave_Index200B,sizeof(TestSlave_Index200B)/sizeof(TestSlave_Index200B[0]), 0x200B}, etisserant@391: { (subindex*)TestSlave_Index200C,sizeof(TestSlave_Index200C)/sizeof(TestSlave_Index200C[0]), 0x200C}, etisserant@391: }; etisserant@391: etisserant@391: const indextable * TestSlave_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) etisserant@391: { etisserant@391: int i; etisserant@391: *callbacks = NULL; etisserant@391: switch(wIndex){ etisserant@391: case 0x1000: i = 0;break; etisserant@391: case 0x1001: i = 1;break; etisserant@391: case 0x1003: i = 2;*callbacks = TestSlave_Index1003_callbacks; break; etisserant@391: case 0x1005: i = 3;*callbacks = TestSlave_Index1005_callbacks; break; etisserant@391: case 0x1006: i = 4;*callbacks = TestSlave_Index1006_callbacks; break; etisserant@391: case 0x1010: i = 5;*callbacks = TestSlave_Index1010_callbacks; break; etisserant@391: case 0x1011: i = 6;*callbacks = TestSlave_Index1011_callbacks; break; etisserant@391: case 0x1014: i = 7;break; etisserant@391: case 0x1017: i = 8;*callbacks = TestSlave_Index1017_callbacks; break; etisserant@391: case 0x1018: i = 9;break; etisserant@391: case 0x1200: i = 10;break; etisserant@391: case 0x1800: i = 11;*callbacks = TestSlave_Index1800_callbacks; break; etisserant@391: case 0x1801: i = 12;*callbacks = TestSlave_Index1801_callbacks; break; etisserant@391: case 0x1802: i = 13;*callbacks = TestSlave_Index1802_callbacks; break; etisserant@391: case 0x1803: i = 14;*callbacks = TestSlave_Index1803_callbacks; break; etisserant@391: case 0x1804: i = 15;*callbacks = TestSlave_Index1804_callbacks; break; etisserant@391: case 0x1A00: i = 16;break; etisserant@391: case 0x1A01: i = 17;break; etisserant@391: case 0x1A02: i = 18;break; etisserant@391: case 0x1A03: i = 19;break; etisserant@391: case 0x1A04: i = 20;break; etisserant@391: case 0x2000: i = 21;break; etisserant@391: case 0x2001: i = 22;break; etisserant@391: case 0x2002: i = 23;break; etisserant@391: case 0x2003: i = 24;break; etisserant@391: case 0x2004: i = 25;break; etisserant@391: case 0x2005: i = 26;break; etisserant@391: case 0x2006: i = 27;break; etisserant@391: case 0x2007: i = 28;break; etisserant@391: case 0x2008: i = 29;break; etisserant@391: case 0x2009: i = 30;break; etisserant@391: case 0x200A: i = 31;break; etisserant@391: case 0x200B: i = 32;break; etisserant@391: case 0x200C: i = 33;break; etisserant@391: default: etisserant@391: *errorCode = OD_NO_SUCH_OBJECT; etisserant@391: return NULL; etisserant@391: } etisserant@391: *errorCode = OD_SUCCESSFUL; etisserant@391: return &TestSlave_objdict[i]; etisserant@391: } etisserant@391: etisserant@391: /* etisserant@391: * To count at which received SYNC a PDO must be sent. etisserant@391: * Even if no pdoTransmit are defined, at least one entry is computed etisserant@391: * for compilations issues. etisserant@391: */ etisserant@391: s_PDO_status TestSlave_PDO_status[5] = {s_PDO_status_Initializer,s_PDO_status_Initializer,s_PDO_status_Initializer,s_PDO_status_Initializer,s_PDO_status_Initializer}; etisserant@391: etisserant@391: quick_index TestSlave_firstIndex = { etisserant@391: 10, /* SDO_SVR */ etisserant@391: 0, /* SDO_CLT */ etisserant@391: 0, /* PDO_RCV */ etisserant@391: 0, /* PDO_RCV_MAP */ etisserant@391: 11, /* PDO_TRS */ etisserant@391: 16 /* PDO_TRS_MAP */ etisserant@391: }; etisserant@391: etisserant@391: quick_index TestSlave_lastIndex = { etisserant@391: 10, /* SDO_SVR */ etisserant@391: 0, /* SDO_CLT */ etisserant@391: 0, /* PDO_RCV */ etisserant@391: 0, /* PDO_RCV_MAP */ etisserant@391: 15, /* PDO_TRS */ etisserant@391: 20 /* PDO_TRS_MAP */ etisserant@391: }; etisserant@391: etisserant@391: UNS16 TestSlave_ObjdictSize = sizeof(TestSlave_objdict)/sizeof(TestSlave_objdict[0]); etisserant@391: etisserant@391: CO_Data TestSlave_Data = CANOPEN_NODE_DATA_INITIALIZER(TestSlave); etisserant@391: