peter@521: peter@521: /* File generated by gen_cfile.py. Should not be modified. */ peter@521: peter@521: #include "ObjDict.h" peter@521: peter@521: /**************************************************************************/ peter@521: /* Declaration of the mapped variables */ peter@521: /**************************************************************************/ peter@521: UNS8 DI1 = 0x0; /* Mapped at index 0x2000, subindex 0x00 */ peter@521: UNS8 DI2 = 0x0; /* Mapped at index 0x2001, subindex 0x00 */ peter@521: UNS8 DO1 = 0x0; /* Mapped at index 0x2100, subindex 0x00 */ peter@521: UNS8 DO2 = 0x0; /* Mapped at index 0x2101, subindex 0x00 */ peter@521: peter@521: /**************************************************************************/ peter@521: /* Declaration of the value range types */ peter@521: /**************************************************************************/ peter@521: peter@521: #define valueRange_EMC 0x9F /* Type for index 0x1003 subindex 0x00 (only set of value 0 is possible) */ peter@521: UNS32 ObjDict_valueRangeTest (UNS8 typeValue, void * value) peter@521: { peter@521: switch (typeValue) { peter@521: case valueRange_EMC: peter@521: if (*(UNS8*)value != (UNS8)0) return OD_VALUE_RANGE_EXCEEDED; peter@521: break; peter@521: } peter@521: return 0; peter@521: } peter@521: peter@521: /**************************************************************************/ peter@521: /* The node id */ peter@521: /**************************************************************************/ peter@521: /* node_id default value.*/ peter@521: UNS8 ObjDict_bDeviceNodeId = 0x00; peter@521: peter@521: /**************************************************************************/ peter@521: /* Array of message processing information */ peter@521: peter@521: const UNS8 ObjDict_iam_a_slave = 0; peter@521: peter@521: TIMER_HANDLE ObjDict_heartBeatTimers[1] = {TIMER_NONE}; peter@521: peter@521: /* peter@521: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ peter@521: peter@521: OBJECT DICTIONARY peter@521: peter@521: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ peter@521: */ peter@521: peter@521: /* index 0x1000 : Device Type. */ peter@521: UNS32 ObjDict_obj1000 = 0x30191; /* 197009 */ peter@521: subindex ObjDict_Index1000[] = peter@521: { peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1000 } peter@521: }; peter@521: peter@521: /* index 0x1001 : Error Register. */ peter@521: UNS8 ObjDict_obj1001 = 0x0; /* 0 */ peter@521: subindex ObjDict_Index1001[] = peter@521: { peter@521: { RO, uint8, sizeof (UNS8), (void*)&ObjDict_obj1001 } peter@521: }; peter@521: peter@521: /* index 0x1003 : Pre-defined Error Field */ peter@521: UNS8 ObjDict_highestSubIndex_obj1003 = 0; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1003[] = peter@521: { peter@521: 0x0 /* 0 */ peter@521: }; peter@521: ODCallback_t ObjDict_Index1003_callbacks[] = peter@521: { peter@521: NULL, peter@521: NULL, peter@521: }; peter@521: subindex ObjDict_Index1003[] = peter@521: { peter@521: { RW, valueRange_EMC, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1003 }, peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1003[0] } peter@521: }; peter@521: peter@521: /* index 0x1005 : SYNC COB ID. */ peter@521: UNS32 ObjDict_obj1005 = 0x40000080; /* 1073741952 */ peter@521: ODCallback_t ObjDict_Index1005_callbacks[] = peter@521: { peter@521: NULL, peter@521: }; peter@521: subindex ObjDict_Index1005[] = peter@521: { peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1005 } peter@521: }; peter@521: peter@521: /* index 0x1006 : Communication / Cycle Period. */ peter@521: UNS32 ObjDict_obj1006 = 0xF4240; /* 1000000 */ peter@521: ODCallback_t ObjDict_Index1006_callbacks[] = peter@521: { peter@521: NULL, peter@521: }; peter@521: subindex ObjDict_Index1006[] = peter@521: { peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1006 } peter@521: }; peter@521: peter@521: /* index 0x1014 : Emergency COB ID */ peter@521: UNS32 ObjDict_obj1014 = 0x0; /* 0 */ peter@521: peter@521: /* index 0x1016 : Consumer Heartbeat Time. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1016 = 1; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1016[] = peter@521: { peter@521: 0x4005DC /* 4195804 */ peter@521: }; peter@521: subindex ObjDict_Index1016[] = peter@521: { peter@521: { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1016 }, peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1016[0] } peter@521: }; peter@521: peter@521: /* index 0x1017 : Producer Heartbeat Time */ peter@521: UNS16 ObjDict_obj1017 = 0x0; /* 0 */ peter@521: peter@521: /* index 0x1018 : Identity. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1018_Vendor_ID = 0x0; /* 0 */ peter@521: UNS32 ObjDict_obj1018_Product_Code = 0x0; /* 0 */ peter@521: UNS32 ObjDict_obj1018_Revision_Number = 0x0; /* 0 */ peter@521: UNS32 ObjDict_obj1018_Serial_Number = 0x0; /* 0 */ peter@521: subindex ObjDict_Index1018[] = peter@521: { peter@521: { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1018 }, peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Vendor_ID }, peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Product_Code }, peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Revision_Number }, peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1018_Serial_Number } peter@521: }; peter@521: peter@521: /* index 0x1200 : Server SDO Parameter. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x600; /* 1536 */ peter@521: UNS32 ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x580; /* 1408 */ peter@521: subindex ObjDict_Index1200[] = peter@521: { peter@521: { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1200 }, peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Client_to_Server_Receive_SDO }, peter@521: { RO, uint32, sizeof (UNS32), (void*)&ObjDict_obj1200_COB_ID_Server_to_Client_Transmit_SDO } peter@521: }; peter@521: peter@521: /* index 0x1280 : Client SDO 1 Parameter. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x640; /* 1600 */ peter@521: UNS32 ObjDict_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x5C0; /* 1472 */ peter@521: UNS8 ObjDict_obj1280_Node_ID_of_the_SDO_Server = 0x40; /* 64 */ peter@521: subindex ObjDict_Index1280[] = peter@521: { peter@521: { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1280 }, peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1280_COB_ID_Client_to_Server_Transmit_SDO }, peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1280_COB_ID_Server_to_Client_Receive_SDO }, peter@521: { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1280_Node_ID_of_the_SDO_Server } peter@521: }; peter@521: peter@521: /* index 0x1400 : Receive PDO 1 Parameter. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1400 = 5; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1400_COB_ID_used_by_PDO = 0x181; /* 385 */ peter@521: UNS8 ObjDict_obj1400_Transmission_Type = 0x1; /* 1 */ peter@521: UNS16 ObjDict_obj1400_Inhibit_Time = 0x0; /* 0 */ peter@521: UNS8 ObjDict_obj1400_Compatibility_Entry = 0x0; /* 0 */ peter@521: UNS16 ObjDict_obj1400_Event_Timer = 0x0; /* 0 */ peter@521: subindex ObjDict_Index1400[] = peter@521: { peter@521: { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1400 }, peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1400_COB_ID_used_by_PDO }, peter@521: { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1400_Transmission_Type }, peter@521: { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1400_Inhibit_Time }, peter@521: { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1400_Compatibility_Entry }, peter@521: { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1400_Event_Timer } peter@521: }; peter@521: peter@521: /* index 0x1600 : Receive PDO 1 Mapping. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1600 = 1; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1600[] = peter@521: { peter@521: 0x20000008 /* 536870920 */ peter@521: }; peter@521: subindex ObjDict_Index1600[] = peter@521: { peter@521: { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1600 }, peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1600[0] } peter@521: }; peter@521: peter@521: /* index 0x1800 : Transmit PDO 1 Parameter. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1800 = 5; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1800_COB_ID_used_by_PDO = 0x201; /* 513 */ peter@521: UNS8 ObjDict_obj1800_Transmission_Type = 0xFF; /* 255 */ peter@521: UNS16 ObjDict_obj1800_Inhibit_Time = 0x0; /* 0 */ peter@521: UNS8 ObjDict_obj1800_Compatibility_Entry = 0x0; /* 0 */ peter@521: UNS16 ObjDict_obj1800_Event_Timer = 0x0; /* 0 */ peter@521: ODCallback_t ObjDict_Index1800_callbacks[] = peter@521: { peter@521: NULL, peter@521: NULL, peter@521: NULL, peter@521: NULL, peter@521: NULL, peter@521: NULL, peter@521: }; peter@521: subindex ObjDict_Index1800[] = peter@521: { peter@521: { RO, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1800 }, peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1800_COB_ID_used_by_PDO }, peter@521: { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Transmission_Type }, peter@521: { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Inhibit_Time }, peter@521: { RW, uint8, sizeof (UNS8), (void*)&ObjDict_obj1800_Compatibility_Entry }, peter@521: { RW, uint16, sizeof (UNS16), (void*)&ObjDict_obj1800_Event_Timer } peter@521: }; peter@521: peter@521: /* index 0x1A00 : Transmit PDO 1 Mapping. */ peter@521: UNS8 ObjDict_highestSubIndex_obj1A00 = 1; /* number of subindex - 1*/ peter@521: UNS32 ObjDict_obj1A00[] = peter@521: { peter@521: 0x21000008 /* 553648136 */ peter@521: }; peter@521: subindex ObjDict_Index1A00[] = peter@521: { peter@521: { RW, uint8, sizeof (UNS8), (void*)&ObjDict_highestSubIndex_obj1A00 }, peter@521: { RW, uint32, sizeof (UNS32), (void*)&ObjDict_obj1A00[0] } peter@521: }; peter@521: peter@521: /* index 0x2000 : Mapped variable DI1 */ peter@521: subindex ObjDict_Index2000[] = peter@521: { peter@521: { RW, uint8, sizeof (UNS8), (void*)&DI1 } peter@521: }; peter@521: peter@521: /* index 0x2001 : Mapped variable DI2 */ peter@521: subindex ObjDict_Index2001[] = peter@521: { peter@521: { RW, uint8, sizeof (UNS8), (void*)&DI2 } peter@521: }; peter@521: peter@521: /* index 0x2100 : Mapped variable DO1 */ peter@521: subindex ObjDict_Index2100[] = peter@521: { peter@521: { RW, uint8, sizeof (UNS8), (void*)&DO1 } peter@521: }; peter@521: peter@521: /* index 0x2101 : Mapped variable DO2 */ peter@521: subindex ObjDict_Index2101[] = peter@521: { peter@521: { RW, uint8, sizeof (UNS8), (void*)&DO2 } peter@521: }; peter@521: peter@521: const indextable ObjDict_objdict[] = peter@521: { peter@521: { (subindex*)ObjDict_Index1000,sizeof(ObjDict_Index1000)/sizeof(ObjDict_Index1000[0]), 0x1000}, peter@521: { (subindex*)ObjDict_Index1001,sizeof(ObjDict_Index1001)/sizeof(ObjDict_Index1001[0]), 0x1001}, peter@521: { (subindex*)ObjDict_Index1005,sizeof(ObjDict_Index1005)/sizeof(ObjDict_Index1005[0]), 0x1005}, peter@521: { (subindex*)ObjDict_Index1006,sizeof(ObjDict_Index1006)/sizeof(ObjDict_Index1006[0]), 0x1006}, peter@521: { (subindex*)ObjDict_Index1016,sizeof(ObjDict_Index1016)/sizeof(ObjDict_Index1016[0]), 0x1016}, peter@521: { (subindex*)ObjDict_Index1018,sizeof(ObjDict_Index1018)/sizeof(ObjDict_Index1018[0]), 0x1018}, peter@521: { (subindex*)ObjDict_Index1200,sizeof(ObjDict_Index1200)/sizeof(ObjDict_Index1200[0]), 0x1200}, peter@521: { (subindex*)ObjDict_Index1280,sizeof(ObjDict_Index1280)/sizeof(ObjDict_Index1280[0]), 0x1280}, peter@521: { (subindex*)ObjDict_Index1400,sizeof(ObjDict_Index1400)/sizeof(ObjDict_Index1400[0]), 0x1400}, peter@521: { (subindex*)ObjDict_Index1600,sizeof(ObjDict_Index1600)/sizeof(ObjDict_Index1600[0]), 0x1600}, peter@521: { (subindex*)ObjDict_Index1800,sizeof(ObjDict_Index1800)/sizeof(ObjDict_Index1800[0]), 0x1800}, peter@521: { (subindex*)ObjDict_Index1A00,sizeof(ObjDict_Index1A00)/sizeof(ObjDict_Index1A00[0]), 0x1A00}, peter@521: { (subindex*)ObjDict_Index2000,sizeof(ObjDict_Index2000)/sizeof(ObjDict_Index2000[0]), 0x2000}, peter@521: { (subindex*)ObjDict_Index2001,sizeof(ObjDict_Index2001)/sizeof(ObjDict_Index2001[0]), 0x2001}, peter@521: { (subindex*)ObjDict_Index2100,sizeof(ObjDict_Index2100)/sizeof(ObjDict_Index2100[0]), 0x2100}, peter@521: { (subindex*)ObjDict_Index2101,sizeof(ObjDict_Index2101)/sizeof(ObjDict_Index2101[0]), 0x2101}, peter@521: }; peter@521: peter@521: const indextable * ObjDict_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) peter@521: { peter@521: int i; peter@521: *callbacks = NULL; peter@521: switch(wIndex){ peter@521: case 0x1000: i = 0;break; peter@521: case 0x1001: i = 1;break; peter@521: case 0x1005: i = 2;*callbacks = ObjDict_Index1005_callbacks; break; peter@521: case 0x1006: i = 3;*callbacks = ObjDict_Index1006_callbacks; break; peter@521: case 0x1016: i = 4;break; peter@521: case 0x1018: i = 5;break; peter@521: case 0x1200: i = 6;break; peter@521: case 0x1280: i = 7;break; peter@521: case 0x1400: i = 8;break; peter@521: case 0x1600: i = 9;break; peter@521: case 0x1800: i = 10;*callbacks = ObjDict_Index1800_callbacks; break; peter@521: case 0x1A00: i = 11;break; peter@521: case 0x2000: i = 12;break; peter@521: case 0x2001: i = 13;break; peter@521: case 0x2100: i = 14;break; peter@521: case 0x2101: i = 15;break; peter@521: default: peter@521: *errorCode = OD_NO_SUCH_OBJECT; peter@521: return NULL; peter@521: } peter@521: *errorCode = OD_SUCCESSFUL; peter@521: return &ObjDict_objdict[i]; peter@521: } peter@521: peter@521: /* peter@521: * To count at which received SYNC a PDO must be sent. peter@521: * Even if no pdoTransmit are defined, at least one entry is computed peter@521: * for compilations issues. peter@521: */ peter@521: s_PDO_status ObjDict_PDO_status[1] = {s_PDO_status_Initializer}; peter@521: peter@521: quick_index ObjDict_firstIndex = { peter@521: 6, /* SDO_SVR */ peter@521: 7, /* SDO_CLT */ peter@521: 8, /* PDO_RCV */ peter@521: 9, /* PDO_RCV_MAP */ peter@521: 10, /* PDO_TRS */ peter@521: 11 /* PDO_TRS_MAP */ peter@521: }; peter@521: peter@521: quick_index ObjDict_lastIndex = { peter@521: 6, /* SDO_SVR */ peter@521: 7, /* SDO_CLT */ peter@521: 8, /* PDO_RCV */ peter@521: 9, /* PDO_RCV_MAP */ peter@521: 10, /* PDO_TRS */ peter@521: 11 /* PDO_TRS_MAP */ peter@521: }; peter@521: peter@521: UNS16 ObjDict_ObjdictSize = sizeof(ObjDict_objdict)/sizeof(ObjDict_objdict[0]); peter@521: peter@521: CO_Data ObjDict_Data = CANOPEN_NODE_DATA_INITIALIZER(ObjDict); peter@521: