2 /* File generated by gen_cfile.py. Should not be modified. */ |
2 /* File generated by gen_cfile.py. Should not be modified. */ |
3 |
3 |
4 #include "win32test.h" |
4 #include "win32test.h" |
5 |
5 |
6 /**************************************************************************/ |
6 /**************************************************************************/ |
7 /* Declaration of the mapped variables */ |
7 /* Declaration of mapped variables */ |
8 /**************************************************************************/ |
8 /**************************************************************************/ |
9 |
9 |
10 /**************************************************************************/ |
10 /**************************************************************************/ |
11 /* Declaration of the value range types */ |
11 /* Declaration of value range types */ |
12 /**************************************************************************/ |
12 /**************************************************************************/ |
13 |
13 |
|
14 #define valueRange_EMC 0x9F /* Type for index 0x1003 subindex 0x00 (only set of value 0 is possible) */ |
14 UNS32 win32test_valueRangeTest (UNS8 typeValue, void * value) |
15 UNS32 win32test_valueRangeTest (UNS8 typeValue, void * value) |
15 { |
16 { |
16 switch (typeValue) { |
17 switch (typeValue) { |
|
18 case valueRange_EMC: |
|
19 if (*(UNS8*)value != (UNS8)0) return OD_VALUE_RANGE_EXCEEDED; |
|
20 break; |
17 } |
21 } |
18 return 0; |
22 return 0; |
19 } |
23 } |
20 |
24 |
21 /**************************************************************************/ |
25 /**************************************************************************/ |
22 /* The node id */ |
26 /* The node id */ |
23 /**************************************************************************/ |
27 /**************************************************************************/ |
24 /* node_id default value.*/ |
28 /* node_id default value.*/ |
25 UNS8 win32test_bDeviceNodeId = 0x01; |
29 UNS8 win32test_bDeviceNodeId = 0x00; |
26 |
30 |
27 /**************************************************************************/ |
31 /**************************************************************************/ |
28 /* Array of message processing information */ |
32 /* Array of message processing information */ |
29 |
33 |
30 const UNS8 win32test_iam_a_slave = 0; |
34 const UNS8 win32test_iam_a_slave = 0; |
51 subindex win32test_Index1001[] = |
55 subindex win32test_Index1001[] = |
52 { |
56 { |
53 { RO, uint8, sizeof (UNS8), (void*)&win32test_obj1001 } |
57 { RO, uint8, sizeof (UNS8), (void*)&win32test_obj1001 } |
54 }; |
58 }; |
55 |
59 |
|
60 /* index 0x1003 : Pre-defined Error Field */ |
|
61 UNS8 win32test_highestSubIndex_obj1003 = 0; /* number of subindex - 1*/ |
|
62 UNS32 win32test_obj1003[] = |
|
63 { |
|
64 0x0 /* 0 */ |
|
65 }; |
|
66 ODCallback_t win32test_Index1003_callbacks[] = |
|
67 { |
|
68 NULL, |
|
69 NULL, |
|
70 }; |
|
71 subindex win32test_Index1003[] = |
|
72 { |
|
73 { RW, valueRange_EMC, sizeof (UNS8), (void*)&win32test_highestSubIndex_obj1003 }, |
|
74 { RO, uint32, sizeof (UNS32), (void*)&win32test_obj1003[0] } |
|
75 }; |
|
76 |
56 /* index 0x1005 : SYNC COB ID. */ |
77 /* index 0x1005 : SYNC COB ID. */ |
57 UNS32 win32test_obj1005 = 0x0; /* 0 */ |
78 UNS32 win32test_obj1005 = 0x0; /* 0 */ |
58 ODCallback_t win32test_Index1005_callbacks[] = |
79 ODCallback_t win32test_Index1005_callbacks[] = |
59 { |
80 { |
60 NULL, |
81 NULL, |
64 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1005 } |
85 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1005 } |
65 }; |
86 }; |
66 |
87 |
67 /* index 0x1006 : Communication / Cycle Period */ |
88 /* index 0x1006 : Communication / Cycle Period */ |
68 UNS32 win32test_obj1006 = 0x0; /* 0 */ |
89 UNS32 win32test_obj1006 = 0x0; /* 0 */ |
|
90 |
|
91 /* index 0x1014 : Emergency COB ID */ |
|
92 UNS32 win32test_obj1014 = 0x80 + 0x00; /* 128 + NodeID */ |
69 |
93 |
70 /* index 0x1016 : Consumer Heartbeat Time */ |
94 /* index 0x1016 : Consumer Heartbeat Time */ |
71 UNS8 win32test_highestSubIndex_obj1016 = 0; |
95 UNS8 win32test_highestSubIndex_obj1016 = 0; |
72 UNS32 win32test_obj1016[]={0}; |
96 UNS32 win32test_obj1016[]={0}; |
73 |
97 |
91 |
115 |
92 /* index 0x1280 : Client SDO 1 Parameter. */ |
116 /* index 0x1280 : Client SDO 1 Parameter. */ |
93 UNS8 win32test_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/ |
117 UNS8 win32test_highestSubIndex_obj1280 = 3; /* number of subindex - 1*/ |
94 UNS32 win32test_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x0; /* 0 */ |
118 UNS32 win32test_obj1280_COB_ID_Client_to_Server_Transmit_SDO = 0x0; /* 0 */ |
95 UNS32 win32test_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x0; /* 0 */ |
119 UNS32 win32test_obj1280_COB_ID_Server_to_Client_Receive_SDO = 0x0; /* 0 */ |
96 INTEGER32 win32test_obj1280_Node_ID_of_the_SDO_Server = 0x0; /* 0 */ |
120 UNS8 win32test_obj1280_Node_ID_of_the_SDO_Server = 0x0; /* 0 */ |
97 subindex win32test_Index1280[] = |
121 subindex win32test_Index1280[] = |
98 { |
122 { |
99 { RO, uint8, sizeof (UNS8), (void*)&win32test_highestSubIndex_obj1280 }, |
123 { RO, uint8, sizeof (UNS8), (void*)&win32test_highestSubIndex_obj1280 }, |
100 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1280_COB_ID_Client_to_Server_Transmit_SDO }, |
124 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1280_COB_ID_Client_to_Server_Transmit_SDO }, |
101 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1280_COB_ID_Server_to_Client_Receive_SDO }, |
125 { RW, uint32, sizeof (UNS32), (void*)&win32test_obj1280_COB_ID_Server_to_Client_Receive_SDO }, |
102 { RW, int32, sizeof (INTEGER32), (void*)&win32test_obj1280_Node_ID_of_the_SDO_Server } |
126 { RW, uint8, sizeof (UNS8), (void*)&win32test_obj1280_Node_ID_of_the_SDO_Server } |
103 }; |
127 }; |
|
128 |
|
129 /**************************************************************************/ |
|
130 /* Declaration of pointed variables */ |
|
131 /**************************************************************************/ |
104 |
132 |
105 const indextable win32test_objdict[] = |
133 const indextable win32test_objdict[] = |
106 { |
134 { |
107 { (subindex*)win32test_Index1000,sizeof(win32test_Index1000)/sizeof(win32test_Index1000[0]), 0x1000}, |
135 { (subindex*)win32test_Index1000,sizeof(win32test_Index1000)/sizeof(win32test_Index1000[0]), 0x1000}, |
108 { (subindex*)win32test_Index1001,sizeof(win32test_Index1001)/sizeof(win32test_Index1001[0]), 0x1001}, |
136 { (subindex*)win32test_Index1001,sizeof(win32test_Index1001)/sizeof(win32test_Index1001[0]), 0x1001}, |
134 * Even if no pdoTransmit are defined, at least one entry is computed |
162 * Even if no pdoTransmit are defined, at least one entry is computed |
135 * for compilations issues. |
163 * for compilations issues. |
136 */ |
164 */ |
137 s_PDO_status win32test_PDO_status[1] = {s_PDO_status_Initializer}; |
165 s_PDO_status win32test_PDO_status[1] = {s_PDO_status_Initializer}; |
138 |
166 |
139 quick_index win32test_firstIndex = { |
167 const quick_index win32test_firstIndex = { |
140 0, /* SDO_SVR */ |
168 0, /* SDO_SVR */ |
141 4, /* SDO_CLT */ |
169 4, /* SDO_CLT */ |
142 0, /* PDO_RCV */ |
170 0, /* PDO_RCV */ |
143 0, /* PDO_RCV_MAP */ |
171 0, /* PDO_RCV_MAP */ |
144 0, /* PDO_TRS */ |
172 0, /* PDO_TRS */ |
145 0 /* PDO_TRS_MAP */ |
173 0 /* PDO_TRS_MAP */ |
146 }; |
174 }; |
147 |
175 |
148 quick_index win32test_lastIndex = { |
176 const quick_index win32test_lastIndex = { |
149 0, /* SDO_SVR */ |
177 0, /* SDO_SVR */ |
150 4, /* SDO_CLT */ |
178 4, /* SDO_CLT */ |
151 0, /* PDO_RCV */ |
179 0, /* PDO_RCV */ |
152 0, /* PDO_RCV_MAP */ |
180 0, /* PDO_RCV_MAP */ |
153 0, /* PDO_TRS */ |
181 0, /* PDO_TRS */ |
154 0 /* PDO_TRS_MAP */ |
182 0 /* PDO_TRS_MAP */ |
155 }; |
183 }; |
156 |
184 |
157 UNS16 win32test_ObjdictSize = sizeof(win32test_objdict)/sizeof(win32test_objdict[0]); |
185 const UNS16 win32test_ObjdictSize = sizeof(win32test_objdict)/sizeof(win32test_objdict[0]); |
158 |
186 |
159 CO_Data win32test_Data = CANOPEN_NODE_DATA_INITIALIZER(win32test); |
187 CO_Data win32test_Data = CANOPEN_NODE_DATA_INITIALIZER(win32test); |
160 |
188 |