nico@215: nico@215:
nico@215:00001 nico@215: 00002 /* File generated by gen_cfile.py. Should not be modified. */ nico@215: 00003 nico@215: 00004 #include "win32test.h" nico@215: 00005 nico@215: 00006 /**************************************************************************/ nico@215: 00007 /* Declaration of the mapped variables */ nico@215: 00008 /**************************************************************************/ nico@215: 00009 nico@215: 00010 /**************************************************************************/ nico@215: 00011 /* Declaration of the value range types */ nico@215: 00012 /**************************************************************************/ nico@215: 00013 etisserant@240: 00014 UNS32 win32test_valueRangeTest (UNS8 typeValue, void * value) nico@215: 00015 { nico@215: 00016 switch (typeValue) { nico@215: 00017 } nico@215: 00018 return 0; nico@215: 00019 } nico@215: 00020 nico@215: 00021 /**************************************************************************/ nico@215: 00022 /* The node id */ nico@215: 00023 /**************************************************************************/ nico@215: 00024 /* node_id default value.*/ etisserant@240: 00025 UNS8 win32test_bDeviceNodeId = 0x01; nico@215: 00026 nico@215: 00027 /**************************************************************************/ nico@215: 00028 /* Array of message processing information */ nico@215: 00029 etisserant@240: 00030 const UNS8 win32test_iam_a_slave = 0; nico@215: 00031 etisserant@240: 00032 TIMER_HANDLE win32test_heartBeatTimers[1]; nico@215: 00033 nico@215: 00034 /* nico@215: 00035 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ nico@215: 00036 nico@215: 00037 OBJECT DICTIONARY nico@215: 00038 nico@215: 00039 $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ nico@215: 00040 */ nico@215: 00041 nico@215: 00042 /* index 0x1000 : Device Type. */ etisserant@240: 00043 UNS32 win32test_obj1000 = 0x12D; /* 301 */ etisserant@240: 00044 subindex win32test_Index1000[] = nico@215: 00045 { etisserant@240: 00046 { RO, uint32, sizeof (UNS32), (void*)&win32test_obj1000 } nico@215: 00047 }; nico@215: 00048 nico@215: 00049 /* index 0x1001 : Error Register. */ etisserant@240: 00050 UNS8 win32test_obj1001 = 0x0; /* 0 */ etisserant@240: 00051 subindex win32test_Index1001[] = nico@215: 00052 { etisserant@240: 00053 { RO, uint8, sizeof (UNS8), (void*)&win32test_obj1001 } nico@215: 00054 }; nico@215: 00055 nico@215: 00056 /* index 0x1005 : SYNC COB ID. */ etisserant@240: 00057 UNS32 win32test_obj1005 = 0x0; /* 0 */ etisserant@240: 00058 ODCallback_t win32test_Index1005_callbacks[] = nico@215: 00059 { nico@215: 00060 NULL, nico@215: 00061 }; etisserant@240: 00062 subindex win32test_Index1005[] = nico@215: 00063 { etisserant@240: 00064 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1005 } nico@215: 00065 }; nico@215: 00066 nico@215: 00067 /* index 0x1006 : Communication / Cycle Period */ etisserant@240: 00068 UNS32 win32test_obj1006 = 0x0; /* 0 */ nico@215: 00069 nico@215: 00070 /* index 0x1016 : Consumer Heartbeat Time */ etisserant@240: 00071 UNS8 win32test_highestSubIndex_obj1016 = 0; etisserant@240: 00072 UNS32 win32test_obj1016[]={0}; nico@215: 00073 nico@215: 00074 /* index 0x1017 : Producer Heartbeat Time */ etisserant@240: 00075 UNS16 win32test_obj1017 = 0x0; /* 0 */ nico@215: 00076 nico@215: 00077 /* index 0x1018 : Identity. */ etisserant@240: 00078 UNS8 win32test_highestSubIndex_obj1018 = 4; /* number of subindex - 1*/ etisserant@240: 00079 UNS32 win32test_obj1018_Vendor_ID = 0x0; /* 0 */ etisserant@240: 00080 UNS32 win32test_obj1018_Product_Code = 0x0; /* 0 */ etisserant@240: 00081 UNS32 win32test_obj1018_Revision_Number = 0x0; /* 0 */ etisserant@240: 00082 UNS32 win32test_obj1018_Serial_Number = 0x0; /* 0 */ etisserant@240: 00083 subindex win32test_Index1018[] = nico@215: 00084 { etisserant@240: 00085 { RO, uint8, sizeof (UNS8), (void*)&win32test_highestSubIndex_obj1018 }, etisserant@240: 00086 { RO, uint32, sizeof (UNS32), (void*)&win32test_obj1018_Vendor_ID }, etisserant@240: 00087 { RO, uint32, sizeof (UNS32), (void*)&win32test_obj1018_Product_Code }, etisserant@240: 00088 { RO, uint32, sizeof (UNS32), (void*)&win32test_obj1018_Revision_Number }, etisserant@240: 00089 { RO, uint32, sizeof (UNS32), (void*)&win32test_obj1018_Serial_Number } nico@215: 00090 }; nico@215: 00091 nico@215: 00092 /* index 0x1280 : Client SDO 1 Parameter. */ etisserant@240: 00093 UNS8 win32test_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/ etisserant@240: 00094 UNS32 win32test_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x0; /* 0 */ etisserant@240: 00095 UNS32 win32test_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x0; /* 0 */ etisserant@240: 00096 UNS32 win32test_obj1280_Node_ID_of_the_SDO_Server = 0x0; /* 0 */ etisserant@240: 00097 subindex win32test_Index1280[] = nico@215: 00098 { etisserant@240: 00099 { RO, uint8, sizeof (UNS8), (void*)&win32test_highestSubIndex_obj1280 }, etisserant@240: 00100 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1280_COB_ID_Client_to_Server_Transmit_SDO }, etisserant@240: 00101 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1280_COB_ID_Server_to_Client_Receive_SDO }, etisserant@240: 00102 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1280_Node_ID_of_the_SDO_Server } nico@215: 00103 }; nico@215: 00104 etisserant@240: 00105 const indextable win32test_objdict[] = nico@215: 00106 { etisserant@240: 00107 { (subindex*)win32test_Index1000,sizeof(win32test_Index1000)/sizeof(win32test_Index1000[0]), 0x1000}, etisserant@240: 00108 { (subindex*)win32test_Index1001,sizeof(win32test_Index1001)/sizeof(win32test_Index1001[0]), 0x1001}, etisserant@240: 00109 { (subindex*)win32test_Index1005,sizeof(win32test_Index1005)/sizeof(win32test_Index1005[0]), 0x1005}, etisserant@240: 00110 { (subindex*)win32test_Index1018,sizeof(win32test_Index1018)/sizeof(win32test_Index1018[0]), 0x1018}, etisserant@240: 00111 { (subindex*)win32test_Index1280,sizeof(win32test_Index1280)/sizeof(win32test_Index1280[0]), 0x1280}, nico@215: 00112 }; nico@215: 00113 etisserant@240: 00114 const indextable * win32test_scanIndexOD (UNS16 wIndex, UNS32 * errorCode, ODCallback_t **callbacks) nico@215: 00115 { nico@215: 00116 int i; nico@215: 00117 *callbacks = NULL; nico@215: 00118 switch(wIndex){ nico@215: 00119 case 0x1000: i = 0;break; nico@215: 00120 case 0x1001: i = 1;break; etisserant@240: 00121 case 0x1005: i = 2;*callbacks = win32test_Index1005_callbacks; break; nico@215: 00122 case 0x1018: i = 3;break; nico@215: 00123 case 0x1280: i = 4;break; nico@215: 00124 default: etisserant@240: 00125 *errorCode = OD_NO_SUCH_OBJECT; nico@215: 00126 return NULL; nico@215: 00127 } etisserant@240: 00128 *errorCode = OD_SUCCESSFUL; etisserant@240: 00129 return &win32test_objdict[i]; nico@215: 00130 } nico@215: 00131 nico@215: 00132 /* To count at which received SYNC a PDO must be sent. nico@215: 00133 * Even if no pdoTransmit are defined, at least one entry is computed nico@215: 00134 * for compilations issues. nico@215: 00135 */ etisserant@240: 00136 UNS8 win32test_count_sync[1] = {0,}; nico@215: 00137 etisserant@240: 00138 quick_index win32test_firstIndex = { nico@215: 00139 0, /* SDO_SVR */ nico@215: 00140 4, /* SDO_CLT */ nico@215: 00141 0, /* PDO_RCV */ nico@215: 00142 0, /* PDO_RCV_MAP */ nico@215: 00143 0, /* PDO_TRS */ nico@215: 00144 0 /* PDO_TRS_MAP */ nico@215: 00145 }; nico@215: 00146 etisserant@240: 00147 quick_index win32test_lastIndex = { nico@215: 00148 0, /* SDO_SVR */ nico@215: 00149 4, /* SDO_CLT */ nico@215: 00150 0, /* PDO_RCV */ nico@215: 00151 0, /* PDO_RCV_MAP */ nico@215: 00152 0, /* PDO_TRS */ nico@215: 00153 0 /* PDO_TRS_MAP */ nico@215: 00154 }; nico@215: 00155 etisserant@240: 00156 UNS16 win32test_ObjdictSize = sizeof(win32test_objdict)/sizeof(win32test_objdict[0]); nico@215: 00157 etisserant@240: 00158 CO_Data win32test_Data = CANOPEN_NODE_DATA_INITIALIZER(win32test); nico@215: 00159 etisserant@240: