nico@215: nico@215: nico@215: CanFestival: examples/gene_SYNC_HCS12/objdict.c Source File nico@215: nico@215: nico@215: nico@215: nico@215:
nico@215:
nico@215:
nico@215:
nico@215: nico@215:

objdict.c

Go to the documentation of this file.
00001 
nico@215: 00002 /* File generated by gen_cfile.py. Should not be modified. */
nico@215: 00003 
nico@215: 00004 #include "objdict.h"
nico@215: 00005 
nico@215: 00006 /**************************************************************************/
nico@215: 00007 /* Declaration of the mapped variables                                    */
nico@215: 00008 /**************************************************************************/
etisserant@240: 00009 UNS16 acceptanceFilter1 = 0x0;          /* Mapped at index 0x2015, subindex 0x00 */
etisserant@240: 00010 UNS16 acceptanceFilter2 = 0x0;          /* Mapped at index 0x2016, subindex 0x00 */
etisserant@240: 00011 UNS16 acceptanceFilter3 = 0x0;          /* Mapped at index 0x2017, subindex 0x00 */
etisserant@240: 00012 UNS16 acceptanceFilter4 = 0x0;          /* Mapped at index 0x2018, subindex 0x00 */
etisserant@240: 00013 UNS16 mask1 = 0x0;              /* Mapped at index 0x2019, subindex 0x00 */
etisserant@240: 00014 UNS16 mask2 = 0x0;              /* Mapped at index 0x2020, subindex 0x00 */
etisserant@240: 00015 UNS16 mask3 = 0x0;              /* Mapped at index 0x2021, subindex 0x00 */
etisserant@240: 00016 UNS16 mask4 = 0x0;              /* Mapped at index 0x2022, subindex 0x00 */
etisserant@240: 00017 UNS8 applyDownloadedFilters = 0x0;              /* Mapped at index 0x2023, subindex 0x00 */
nico@215: 00018 
nico@215: 00019 /**************************************************************************/
nico@215: 00020 /* Declaration of the value range types                                   */
nico@215: 00021 /**************************************************************************/
nico@215: 00022 
etisserant@240: 00023 UNS32 gene_SYNC_valueRangeTest (UNS8 typeValue, void * value)
nico@215: 00024 {
nico@215: 00025   switch (typeValue) {
nico@215: 00026   }
nico@215: 00027   return 0;
nico@215: 00028 }
nico@215: 00029 
nico@215: 00030 /**************************************************************************/
nico@215: 00031 /* The node id                                                            */
nico@215: 00032 /**************************************************************************/
nico@215: 00033 /* node_id default value.*/
etisserant@240: 00034 UNS8 gene_SYNC_bDeviceNodeId = 0x03;
nico@215: 00035 
nico@215: 00036 /**************************************************************************/
nico@215: 00037 /* Array of message processing information */
nico@215: 00038 
etisserant@240: 00039 const UNS8 gene_SYNC_iam_a_slave = 1;
nico@215: 00040 
etisserant@240: 00041 TIMER_HANDLE gene_SYNC_heartBeatTimers[1];
nico@215: 00042 
nico@215: 00043 /*
nico@215: 00044 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
nico@215: 00045 
nico@215: 00046                                OBJECT DICTIONARY
nico@215: 00047 
nico@215: 00048 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
nico@215: 00049 */
nico@215: 00050 
nico@215: 00051 /* index 0x1000 :   Device Type. */
etisserant@240: 00052                     UNS32 gene_SYNC_obj1000 = 0x0;      /* 0 */
etisserant@240: 00053                     subindex gene_SYNC_Index1000[] = 
nico@215: 00054                      {
etisserant@240: 00055                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1000 }
nico@215: 00056                      };
nico@215: 00057 
nico@215: 00058 /* index 0x1001 :   Error Register. */
etisserant@240: 00059                     UNS8 gene_SYNC_obj1001 = 0x0;       /* 0 */
etisserant@240: 00060                     subindex gene_SYNC_Index1001[] = 
nico@215: 00061                      {
etisserant@240: 00062                        { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_obj1001 }
nico@215: 00063                      };
nico@215: 00064 
nico@215: 00065 /* index 0x1005 :   SYNC COB ID. */
etisserant@240: 00066                     UNS32 gene_SYNC_obj1005 = 0x40000080;       /* 1073741952 */
etisserant@240: 00067                     ODCallback_t gene_SYNC_Index1005_callbacks[] = 
nico@215: 00068                      {
nico@215: 00069                        NULL,
nico@215: 00070                      };
etisserant@240: 00071                     subindex gene_SYNC_Index1005[] = 
nico@215: 00072                      {
etisserant@240: 00073                        { RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1005 }
nico@215: 00074                      };
nico@215: 00075 
nico@215: 00076 /* index 0x1006 :   Communication / Cycle Period. */
etisserant@240: 00077                     UNS32 gene_SYNC_obj1006 = 0x2710;   /* 10000 */
etisserant@240: 00078                     ODCallback_t gene_SYNC_Index1006_callbacks[] = 
nico@215: 00079                      {
nico@215: 00080                        NULL,
nico@215: 00081                      };
etisserant@240: 00082                     subindex gene_SYNC_Index1006[] = 
nico@215: 00083                      {
etisserant@240: 00084                        { RW, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1006 }
nico@215: 00085                      };
nico@215: 00086 
nico@215: 00087 /* index 0x1008 :   Manufacturer Device Name. */
etisserant@240: 00088                     UNS8 gene_SYNC_obj1008[10] = "GENE_SYNC";
etisserant@240: 00089                     subindex gene_SYNC_Index1008[] = 
nico@215: 00090                      {
etisserant@240: 00091                        { RO, visible_string, sizeof (gene_SYNC_obj1008), (void*)&gene_SYNC_obj1008 }
nico@215: 00092                      };
nico@215: 00093 
nico@215: 00094 /* index 0x1016 :   Consumer Heartbeat Time */
etisserant@240: 00095                     UNS8 gene_SYNC_highestSubIndex_obj1016 = 0;
etisserant@240: 00096                     UNS32 gene_SYNC_obj1016[];
etisserant@240: 00097                     subindex gene_SYNC_Index1016[];
nico@215: 00098 
nico@215: 00099 /* index 0x1017 :   Producer Heartbeat Time */ 
etisserant@240: 00100                     UNS16 gene_SYNC_obj1017 = 0x0;   /* 0 */
nico@215: 00101 
nico@215: 00102 /* index 0x1018 :   Identity. */
etisserant@240: 00103                     UNS8 gene_SYNC_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/
etisserant@240: 00104                     UNS32 gene_SYNC_obj1018_Vendor_ID = 0x0;    /* 0 */
etisserant@240: 00105                     UNS32 gene_SYNC_obj1018_Product_Code = 0x0; /* 0 */
etisserant@240: 00106                     UNS32 gene_SYNC_obj1018_Revision_Number = 0x0;      /* 0 */
etisserant@240: 00107                     UNS32 gene_SYNC_obj1018_Serial_Number = 0x0;        /* 0 */
etisserant@240: 00108                     subindex gene_SYNC_Index1018[] = 
nico@215: 00109                      {
etisserant@240: 00110                        { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1018 },
etisserant@240: 00111                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Vendor_ID },
etisserant@240: 00112                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Product_Code },
etisserant@240: 00113                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Revision_Number },
etisserant@240: 00114                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1018_Serial_Number }
nico@215: 00115                      };
nico@215: 00116 
nico@215: 00117 /* index 0x1200 :   Server SDO Parameter. */
etisserant@240: 00118                     UNS8 gene_SYNC_highestSubIndex_obj1200 = 2; /* number of subindex - 1*/
etisserant@240: 00119                     UNS32 gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO = 0x0;  /* 0 */
etisserant@240: 00120                     UNS32 gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO = 0x0; /* 0 */
etisserant@240: 00121                     subindex gene_SYNC_Index1200[] = 
nico@215: 00122                      {
etisserant@240: 00123                        { RO, uint8, sizeof (UNS8), (void*)&gene_SYNC_highestSubIndex_obj1200 },
etisserant@240: 00124                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Client_to_Server_Receive_SDO },
etisserant@240: 00125                        { RO, uint32, sizeof (UNS32), (void*)&gene_SYNC_obj1200_COB_ID_Server_to_Client_Transmit_SDO }
nico@215: 00126                      };
nico@215: 00127 
nico@215: 00128 /* index 0x2015 :   Mapped variable acceptanceFilter1 */
etisserant@240: 00129                     subindex gene_SYNC_Index2015[] = 
nico@215: 00130                      {
etisserant@240: 00131                        { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter1 }
nico@215: 00132                      };
nico@215: 00133 
nico@215: 00134 /* index 0x2016 :   Mapped variable acceptanceFilter2 */
etisserant@240: 00135                     subindex gene_SYNC_Index2016[] = 
nico@215: 00136                      {
etisserant@240: 00137                        { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter2 }
nico@215: 00138                      };
nico@215: 00139 
nico@215: 00140 /* index 0x2017 :   Mapped variable acceptanceFilter3 */
etisserant@240: 00141                     subindex gene_SYNC_Index2017[] = 
nico@215: 00142                      {
etisserant@240: 00143                        { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter3 }
nico@215: 00144                      };
nico@215: 00145 
nico@215: 00146 /* index 0x2018 :   Mapped variable acceptanceFilter4 */
etisserant@240: 00147                     subindex gene_SYNC_Index2018[] = 
nico@215: 00148                      {
etisserant@240: 00149                        { RW, uint16, sizeof (UNS16), (void*)&acceptanceFilter4 }
nico@215: 00150                      };
nico@215: 00151 
nico@215: 00152 /* index 0x2019 :   Mapped variable mask1 */
etisserant@240: 00153                     subindex gene_SYNC_Index2019[] = 
nico@215: 00154                      {
etisserant@240: 00155                        { RW, uint16, sizeof (UNS16), (void*)&mask1 }
nico@215: 00156                      };
nico@215: 00157 
nico@215: 00158 /* index 0x2020 :   Mapped variable mask2 */
etisserant@240: 00159                     subindex gene_SYNC_Index2020[] = 
nico@215: 00160                      {
etisserant@240: 00161                        { RW, uint16, sizeof (UNS16), (void*)&mask2 }
nico@215: 00162                      };
nico@215: 00163 
nico@215: 00164 /* index 0x2021 :   Mapped variable mask3 */
etisserant@240: 00165                     subindex gene_SYNC_Index2021[] = 
nico@215: 00166                      {
etisserant@240: 00167                        { RW, uint16, sizeof (UNS16), (void*)&mask3 }
nico@215: 00168                      };
nico@215: 00169 
nico@215: 00170 /* index 0x2022 :   Mapped variable mask4 */
etisserant@240: 00171                     subindex gene_SYNC_Index2022[] = 
nico@215: 00172                      {
etisserant@240: 00173                        { RW, uint16, sizeof (UNS16), (void*)&mask4 }
nico@215: 00174                      };
nico@215: 00175 
nico@215: 00176 /* index 0x2023 :   Mapped variable applyDownloadedFilters */
etisserant@240: 00177                     subindex gene_SYNC_Index2023[] = 
nico@215: 00178                      {
etisserant@240: 00179                        { RW, uint8, sizeof (UNS8), (void*)&applyDownloadedFilters }
nico@215: 00180                      };
nico@215: 00181 
etisserant@240: 00182 const indextable gene_SYNC_objdict[] = 
nico@215: 00183 {
etisserant@240: 00184   { (subindex*)gene_SYNC_Index1000,sizeof(gene_SYNC_Index1000)/sizeof(gene_SYNC_Index1000[0]), 0x1000},
etisserant@240: 00185   { (subindex*)gene_SYNC_Index1001,sizeof(gene_SYNC_Index1001)/sizeof(gene_SYNC_Index1001[0]), 0x1001},
etisserant@240: 00186   { (subindex*)gene_SYNC_Index1005,sizeof(gene_SYNC_Index1005)/sizeof(gene_SYNC_Index1005[0]), 0x1005},
etisserant@240: 00187   { (subindex*)gene_SYNC_Index1006,sizeof(gene_SYNC_Index1006)/sizeof(gene_SYNC_Index1006[0]), 0x1006},
etisserant@240: 00188   { (subindex*)gene_SYNC_Index1008,sizeof(gene_SYNC_Index1008)/sizeof(gene_SYNC_Index1008[0]), 0x1008},
etisserant@240: 00189   { (subindex*)gene_SYNC_Index1018,sizeof(gene_SYNC_Index1018)/sizeof(gene_SYNC_Index1018[0]), 0x1018},
etisserant@240: 00190   { (subindex*)gene_SYNC_Index1200,sizeof(gene_SYNC_Index1200)/sizeof(gene_SYNC_Index1200[0]), 0x1200},
etisserant@240: 00191   { (subindex*)gene_SYNC_Index2015,sizeof(gene_SYNC_Index2015)/sizeof(gene_SYNC_Index2015[0]), 0x2015},
etisserant@240: 00192   { (subindex*)gene_SYNC_Index2016,sizeof(gene_SYNC_Index2016)/sizeof(gene_SYNC_Index2016[0]), 0x2016},
etisserant@240: 00193   { (subindex*)gene_SYNC_Index2017,sizeof(gene_SYNC_Index2017)/sizeof(gene_SYNC_Index2017[0]), 0x2017},
etisserant@240: 00194   { (subindex*)gene_SYNC_Index2018,sizeof(gene_SYNC_Index2018)/sizeof(gene_SYNC_Index2018[0]), 0x2018},
etisserant@240: 00195   { (subindex*)gene_SYNC_Index2019,sizeof(gene_SYNC_Index2019)/sizeof(gene_SYNC_Index2019[0]), 0x2019},
etisserant@240: 00196   { (subindex*)gene_SYNC_Index2020,sizeof(gene_SYNC_Index2020)/sizeof(gene_SYNC_Index2020[0]), 0x2020},
etisserant@240: 00197   { (subindex*)gene_SYNC_Index2021,sizeof(gene_SYNC_Index2021)/sizeof(gene_SYNC_Index2021[0]), 0x2021},
etisserant@240: 00198   { (subindex*)gene_SYNC_Index2022,sizeof(gene_SYNC_Index2022)/sizeof(gene_SYNC_Index2022[0]), 0x2022},
etisserant@240: 00199   { (subindex*)gene_SYNC_Index2023,sizeof(gene_SYNC_Index2023)/sizeof(gene_SYNC_Index2023[0]), 0x2023},
nico@215: 00200 };
nico@215: 00201 
etisserant@240: 00202 const indextable * gene_SYNC_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks)
nico@215: 00203 {
nico@215: 00204         int i;
nico@215: 00205         *callbacks = NULL;
nico@215: 00206         switch(wIndex){
nico@215: 00207                 case 0x1000: i = 0;break;
nico@215: 00208                 case 0x1001: i = 1;break;
etisserant@240: 00209                 case 0x1005: i = 2;*callbacks = gene_SYNC_Index1005_callbacks; break;
etisserant@240: 00210                 case 0x1006: i = 3;*callbacks = gene_SYNC_Index1006_callbacks; break;
nico@215: 00211                 case 0x1008: i = 4;break;
nico@215: 00212                 case 0x1018: i = 5;break;
nico@215: 00213                 case 0x1200: i = 6;break;
nico@215: 00214                 case 0x2015: i = 7;break;
nico@215: 00215                 case 0x2016: i = 8;break;
nico@215: 00216                 case 0x2017: i = 9;break;
nico@215: 00217                 case 0x2018: i = 10;break;
nico@215: 00218                 case 0x2019: i = 11;break;
nico@215: 00219                 case 0x2020: i = 12;break;
nico@215: 00220                 case 0x2021: i = 13;break;
nico@215: 00221                 case 0x2022: i = 14;break;
nico@215: 00222                 case 0x2023: i = 15;break;
nico@215: 00223                 default:
etisserant@240: 00224                         *errorCode = OD_NO_SUCH_OBJECT;
nico@215: 00225                         return NULL;
nico@215: 00226         }
etisserant@240: 00227         *errorCode = OD_SUCCESSFUL;
etisserant@240: 00228         return &gene_SYNC_objdict[i];
nico@215: 00229 }
nico@215: 00230 
nico@215: 00231 /* To count at which received SYNC a PDO must be sent.
nico@215: 00232  * Even if no pdoTransmit are defined, at least one entry is computed
nico@215: 00233  * for compilations issues.
nico@215: 00234  */
etisserant@240: 00235 UNS8 gene_SYNC_count_sync[1] = {0,};
nico@215: 00236 
etisserant@240: 00237 quick_index gene_SYNC_firstIndex = {
nico@215: 00238   6, /* SDO_SVR */
nico@215: 00239   0, /* SDO_CLT */
nico@215: 00240   0, /* PDO_RCV */
nico@215: 00241   0, /* PDO_RCV_MAP */
nico@215: 00242   0, /* PDO_TRS */
nico@215: 00243   0 /* PDO_TRS_MAP */
nico@215: 00244 };
nico@215: 00245 
etisserant@240: 00246 quick_index gene_SYNC_lastIndex = {
nico@215: 00247   6, /* SDO_SVR */
nico@215: 00248   0, /* SDO_CLT */
nico@215: 00249   0, /* PDO_RCV */
nico@215: 00250   0, /* PDO_RCV_MAP */
nico@215: 00251   0, /* PDO_TRS */
nico@215: 00252   0 /* PDO_TRS_MAP */
nico@215: 00253 };
nico@215: 00254 
etisserant@240: 00255 UNS16 gene_SYNC_ObjdictSize = sizeof(gene_SYNC_objdict)/sizeof(gene_SYNC_objdict[0]); 
nico@215: 00256 
etisserant@240: 00257 CO_Data gene_SYNC_Data = CANOPEN_NODE_DATA_INITIALIZER(gene_SYNC);
nico@215: 00258 
etisserant@240: 

Generated on Mon Jul 2 19:10:16 2007 for CanFestival by  nico@215: nico@215: doxygen 1.5.1
nico@215: nico@215: