etisserant@0: frdupin@54: /* File generated by gen_cfile.py. Should not be modified. */ frdupin@54: etisserant@0: #include "objdict.h" etisserant@0: etisserant@0: /**************************************************************************/ etisserant@0: /* Declaration of the mapped variables */ etisserant@0: /**************************************************************************/ frdupin@80: UNS16 acceptanceFilter1 = 0x0; /* Mapped at index 0x2015, subindex 0x00 */ frdupin@80: UNS16 acceptanceFilter2 = 0x0; /* Mapped at index 0x2016, subindex 0x00 */ frdupin@80: UNS16 acceptanceFilter3 = 0x0; /* Mapped at index 0x2017, subindex 0x00 */ frdupin@80: UNS16 acceptanceFilter4 = 0x0; /* Mapped at index 0x2018, subindex 0x00 */ frdupin@80: UNS16 mask1 = 0x0; /* Mapped at index 0x2019, subindex 0x00 */ frdupin@80: UNS16 mask2 = 0x0; /* Mapped at index 0x2020, subindex 0x00 */ frdupin@80: UNS16 mask3 = 0x0; /* Mapped at index 0x2021, subindex 0x00 */ frdupin@80: UNS16 mask4 = 0x0; /* Mapped at index 0x2022, subindex 0x00 */ frdupin@80: UNS8 applyDownloadedFilters = 0x0; /* Mapped at index 0x2023, subindex 0x00 */ etisserant@0: etisserant@0: /**************************************************************************/ etisserant@0: /* Declaration of the value range types */ etisserant@0: /**************************************************************************/ etisserant@0: frdupin@54: UNS32 gene_SYNC_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: /**************************************************************************/ frdupin@54: /* node_id default value.*/ frdupin@54: UNS8 gene_SYNC_bDeviceNodeId = 0x03; etisserant@0: frdupin@80: /**************************************************************************/ etisserant@0: /* Array of message processing information */ etisserant@0: etisserant@0: const UNS8 gene_SYNC_iam_a_slave = 1; etisserant@0: frdupin@80: TIMER_HANDLE gene_SYNC_heartBeatTimers[1]; frdupin@80: frdupin@80: /* frdupin@80: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ frdupin@80: frdupin@80: OBJECT DICTIONARY frdupin@80: frdupin@80: $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ frdupin@80: */ frdupin@54: frdupin@54: /* index 0x1000 : Device Type. */ frdupin@80: UNS32 gene_SYNC_obj1000 = 0x0; /* 0 */ frdupin@54: subindex gene_SYNC_Index1000[] = frdupin@54: { frdupin@54: { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1000 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x1001 : Error Register. */ frdupin@80: UNS8 gene_SYNC_obj1001 = 0x0; /* 0 */ frdupin@54: subindex gene_SYNC_Index1001[] = frdupin@54: { frdupin@54: { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_obj1001 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x1005 : SYNC COB ID. */ frdupin@80: UNS32 gene_SYNC_obj1005 = 0x40000080; /* 1073741952 */ frdupin@54: ODCallback_t gene_SYNC_Index1005_callbacks[] = frdupin@54: { frdupin@54: NULL, frdupin@54: }; frdupin@54: subindex gene_SYNC_Index1005[] = frdupin@54: { frdupin@54: { RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1005 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x1006 : Communication / Cycle Period. */ frdupin@80: UNS32 gene_SYNC_obj1006 = 0x2710; /* 10000 */ frdupin@54: ODCallback_t gene_SYNC_Index1006_callbacks[] = frdupin@54: { frdupin@54: NULL, frdupin@54: }; frdupin@54: subindex gene_SYNC_Index1006[] = frdupin@54: { frdupin@54: { RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1006 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x1008 : Manufacturer Device Name. */ frdupin@54: UNS8 gene_SYNC_obj1008[10] = "GENE_SYNC"; frdupin@54: subindex gene_SYNC_Index1008[] = frdupin@54: { frdupin@54: { RO, visible_string, sizeof (gene_SYNC_obj1008), (void*)&gene_SYNC_obj1008 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x1016 : Consumer Heartbeat Time */ frdupin@54: UNS8 gene_SYNC_highestSubIndex_obj1016 = 0; frdupin@80: UNS32 gene_SYNC_obj1016[]; frdupin@80: subindex gene_SYNC_Index1016[]; etisserant@0: frdupin@54: /* index 0x1017 : Producer Heartbeat Time */ frdupin@80: UNS16 gene_SYNC_obj1017 = 0x0; /* 0 */ frdupin@54: frdupin@54: /* index 0x1018 : Identity. */ frdupin@80: UNS8 gene_SYNC_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ frdupin@80: UNS32 gene_SYNC_obj1018_Vendor_ID = 0x0; /* 0 */ frdupin@80: UNS32 gene_SYNC_obj1018_Product_Code = 0x0; /* 0 */ frdupin@80: UNS32 gene_SYNC_obj1018_Revision_Number = 0x0; /* 0 */ frdupin@80: UNS32 gene_SYNC_obj1018_Serial_Number = 0x0; /* 0 */ frdupin@54: subindex gene_SYNC_Index1018[] = frdupin@54: { frdupin@54: { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1018 }, frdupin@54: { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Vendor_ID }, frdupin@54: { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Product_Code }, frdupin@54: { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Revision_Number }, frdupin@54: { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Serial_Number } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x1200 : Server SDO Parameter. */ frdupin@80: UNS8 gene_SYNC_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/ frdupin@80: UNS32 gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x0; /* 0 */ frdupin@80: UNS32 gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x0; /* 0 */ frdupin@54: subindex gene_SYNC_Index1200[] = frdupin@54: { frdupin@54: { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1200 }, frdupin@54: { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO }, frdupin@54: { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2015 : Mapped variable acceptanceFilter1 */ frdupin@54: subindex gene_SYNC_Index2015[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter1 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2016 : Mapped variable acceptanceFilter2 */ frdupin@54: subindex gene_SYNC_Index2016[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter2 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2017 : Mapped variable acceptanceFilter3 */ frdupin@54: subindex gene_SYNC_Index2017[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter3 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2018 : Mapped variable acceptanceFilter4 */ frdupin@54: subindex gene_SYNC_Index2018[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter4 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2019 : Mapped variable mask1 */ frdupin@54: subindex gene_SYNC_Index2019[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&mask1 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2020 : Mapped variable mask2 */ frdupin@54: subindex gene_SYNC_Index2020[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&mask2 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2021 : Mapped variable mask3 */ frdupin@54: subindex gene_SYNC_Index2021[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&mask3 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2022 : Mapped variable mask4 */ frdupin@54: subindex gene_SYNC_Index2022[] = frdupin@54: { frdupin@54: { RW, uint16, sizeof (UNS16), (void*)&mask4 } frdupin@54: }; frdupin@54: frdupin@54: /* index 0x2023 : Mapped variable applyDownloadedFilters */ frdupin@54: subindex gene_SYNC_Index2023[] = frdupin@54: { frdupin@54: { RW, uint8, sizeof (UNS8), (void*)&applyDownloadedFilters } frdupin@54: }; etisserant@0: etisserant@0: const indextable gene_SYNC_objdict[] = etisserant@0: { frdupin@54: { (subindex*)gene_SYNC_Index1000,sizeof(gene_SYNC_Index1000)/sizeof(gene_SYNC_Index1000[0]), 0x1000}, frdupin@54: { (subindex*)gene_SYNC_Index1001,sizeof(gene_SYNC_Index1001)/sizeof(gene_SYNC_Index1001[0]), 0x1001}, frdupin@54: { (subindex*)gene_SYNC_Index1005,sizeof(gene_SYNC_Index1005)/sizeof(gene_SYNC_Index1005[0]), 0x1005}, frdupin@54: { (subindex*)gene_SYNC_Index1006,sizeof(gene_SYNC_Index1006)/sizeof(gene_SYNC_Index1006[0]), 0x1006}, frdupin@54: { (subindex*)gene_SYNC_Index1008,sizeof(gene_SYNC_Index1008)/sizeof(gene_SYNC_Index1008[0]), 0x1008}, frdupin@54: { (subindex*)gene_SYNC_Index1018,sizeof(gene_SYNC_Index1018)/sizeof(gene_SYNC_Index1018[0]), 0x1018}, frdupin@54: { (subindex*)gene_SYNC_Index1200,sizeof(gene_SYNC_Index1200)/sizeof(gene_SYNC_Index1200[0]), 0x1200}, frdupin@54: { (subindex*)gene_SYNC_Index2015,sizeof(gene_SYNC_Index2015)/sizeof(gene_SYNC_Index2015[0]), 0x2015}, frdupin@54: { (subindex*)gene_SYNC_Index2016,sizeof(gene_SYNC_Index2016)/sizeof(gene_SYNC_Index2016[0]), 0x2016}, frdupin@54: { (subindex*)gene_SYNC_Index2017,sizeof(gene_SYNC_Index2017)/sizeof(gene_SYNC_Index2017[0]), 0x2017}, frdupin@54: { (subindex*)gene_SYNC_Index2018,sizeof(gene_SYNC_Index2018)/sizeof(gene_SYNC_Index2018[0]), 0x2018}, frdupin@54: { (subindex*)gene_SYNC_Index2019,sizeof(gene_SYNC_Index2019)/sizeof(gene_SYNC_Index2019[0]), 0x2019}, frdupin@54: { (subindex*)gene_SYNC_Index2020,sizeof(gene_SYNC_Index2020)/sizeof(gene_SYNC_Index2020[0]), 0x2020}, frdupin@54: { (subindex*)gene_SYNC_Index2021,sizeof(gene_SYNC_Index2021)/sizeof(gene_SYNC_Index2021[0]), 0x2021}, frdupin@54: { (subindex*)gene_SYNC_Index2022,sizeof(gene_SYNC_Index2022)/sizeof(gene_SYNC_Index2022[0]), 0x2022}, frdupin@54: { (subindex*)gene_SYNC_Index2023,sizeof(gene_SYNC_Index2023)/sizeof(gene_SYNC_Index2023[0]), 0x2023}, etisserant@0: }; etisserant@0: frdupin@54: const indextable * gene_SYNC_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) frdupin@54: { frdupin@54: int i; frdupin@54: *callbacks = NULL; frdupin@54: switch(wIndex){ frdupin@54: case 0x1000: i = 0;break; frdupin@54: case 0x1001: i = 1;break; frdupin@54: case 0x1005: i = 2;*callbacks = gene_SYNC_Index1005_callbacks; break; frdupin@54: case 0x1006: i = 3;*callbacks = gene_SYNC_Index1006_callbacks; break; frdupin@54: case 0x1008: i = 4;break; frdupin@54: case 0x1018: i = 5;break; frdupin@54: case 0x1200: i = 6;break; frdupin@54: case 0x2015: i = 7;break; frdupin@54: case 0x2016: i = 8;break; frdupin@54: case 0x2017: i = 9;break; frdupin@54: case 0x2018: i = 10;break; frdupin@54: case 0x2019: i = 11;break; frdupin@54: case 0x2020: i = 12;break; frdupin@54: case 0x2021: i = 13;break; frdupin@54: case 0x2022: i = 14;break; frdupin@54: case 0x2023: i = 15;break; frdupin@54: default: frdupin@54: *errorCode = OD_NO_SUCH_OBJECT; frdupin@54: return NULL; frdupin@54: } frdupin@54: *errorCode = OD_SUCCESSFUL; frdupin@54: return &gene_SYNC_objdict[i]; frdupin@54: } frdupin@54: frdupin@80: /* To count at which received SYNC a PDO must be sent. frdupin@80: * Even if no pdoTransmit are defined, at least one entry is computed frdupin@80: * for compilations issues. frdupin@80: */ frdupin@54: UNS8 gene_SYNC_count_sync[1] = {0,}; etisserant@0: etisserant@0: quick_index gene_SYNC_firstIndex = { frdupin@80: 6, /* SDO_SVR */ frdupin@80: 0, /* SDO_CLT */ frdupin@80: 0, /* PDO_RCV */ frdupin@80: 0, /* PDO_RCV_MAP */ frdupin@80: 0, /* PDO_TRS */ frdupin@80: 0 /* PDO_TRS_MAP */ etisserant@0: }; etisserant@0: etisserant@0: quick_index gene_SYNC_lastIndex = { frdupin@80: 6, /* SDO_SVR */ frdupin@80: 0, /* SDO_CLT */ frdupin@80: 0, /* PDO_RCV */ frdupin@80: 0, /* PDO_RCV_MAP */ frdupin@80: 0, /* PDO_TRS */ frdupin@80: 0 /* PDO_TRS_MAP */ etisserant@0: }; etisserant@0: etisserant@0: UNS16 gene_SYNC_ObjdictSize = sizeof(gene_SYNC_objdict)/sizeof(gene_SYNC_objdict[0]); etisserant@0: etisserant@0: CO_Data gene_SYNC_Data = CANOPEN_NODE_DATA_INITIALIZER(gene_SYNC); etisserant@0: