gjc@3468
|
1 |
from pybindgen import Module, FileCodeSink, param, retval, cppclass
|
gjc@3408
|
2 |
|
gjc@3408
|
3 |
|
gjc@3408
|
4 |
import pybindgen.settings
|
gjc@3408
|
5 |
import warnings
|
gjc@3408
|
6 |
|
gjc@3408
|
7 |
class ErrorHandler(pybindgen.settings.ErrorHandler):
|
gjc@3408
|
8 |
def handle_error(self, wrapper, exception, traceback_):
|
gjc@3408
|
9 |
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
|
gjc@3408
|
10 |
return True
|
gjc@3408
|
11 |
pybindgen.settings.error_handler = ErrorHandler()
|
gjc@3408
|
12 |
|
gjc@3408
|
13 |
|
gjc@3408
|
14 |
import sys
|
gjc@3408
|
15 |
import ns3_module_core
|
gjc@3408
|
16 |
import ns3_module_simulator
|
gjc@3408
|
17 |
import ns3_module_mobility
|
gjc@3408
|
18 |
import ns3_module_common
|
gjc@3408
|
19 |
import ns3_module_contrib
|
gjc@3408
|
20 |
import ns3_module_node
|
gjc@3408
|
21 |
import ns3_module_point_to_point
|
gjc@3408
|
22 |
import ns3_module_internet_stack
|
gjc@3408
|
23 |
import ns3_module_wifi
|
gjc@3408
|
24 |
import ns3_module_csma
|
gjc@3457
|
25 |
import ns3_module_bridge
|
gjc@3408
|
26 |
import ns3_module_packet_sink
|
gjc@3408
|
27 |
import ns3_module_global_routing
|
gjc@3408
|
28 |
import ns3_module_onoff
|
gjc@3408
|
29 |
import ns3_module_olsr
|
gjc@3408
|
30 |
import ns3_module_udp_echo
|
gjc@3408
|
31 |
import ns3_module_helper
|
gjc@3408
|
32 |
|
gjc@3408
|
33 |
def module_init():
|
gjc@3408
|
34 |
root_module = Module('ns3', cpp_namespace='::ns3')
|
gjc@3408
|
35 |
return root_module
|
gjc@3408
|
36 |
|
gjc@3408
|
37 |
def register_types(module):
|
gjc@3408
|
38 |
root_module = module.get_root()
|
gjc@3408
|
39 |
|
gjc@3408
|
40 |
root_module.begin_section('ns3_module_core')
|
gjc@3408
|
41 |
ns3_module_core.register_types(module)
|
gjc@3408
|
42 |
|
gjc@3408
|
43 |
try:
|
gjc@3408
|
44 |
import ns3_module_core__local
|
gjc@3408
|
45 |
except ImportError:
|
gjc@3408
|
46 |
pass
|
gjc@3408
|
47 |
else:
|
gjc@3408
|
48 |
ns3_module_core__local.register_types(module)
|
gjc@3408
|
49 |
|
gjc@3408
|
50 |
root_module.end_section('ns3_module_core')
|
gjc@3408
|
51 |
root_module.begin_section('ns3_module_simulator')
|
gjc@3408
|
52 |
ns3_module_simulator.register_types(module)
|
gjc@3408
|
53 |
|
gjc@3408
|
54 |
try:
|
gjc@3408
|
55 |
import ns3_module_simulator__local
|
gjc@3408
|
56 |
except ImportError:
|
gjc@3408
|
57 |
pass
|
gjc@3408
|
58 |
else:
|
gjc@3408
|
59 |
ns3_module_simulator__local.register_types(module)
|
gjc@3408
|
60 |
|
gjc@3408
|
61 |
root_module.end_section('ns3_module_simulator')
|
gjc@3408
|
62 |
root_module.begin_section('ns3_module_mobility')
|
gjc@3408
|
63 |
ns3_module_mobility.register_types(module)
|
gjc@3408
|
64 |
|
gjc@3408
|
65 |
try:
|
gjc@3408
|
66 |
import ns3_module_mobility__local
|
gjc@3408
|
67 |
except ImportError:
|
gjc@3408
|
68 |
pass
|
gjc@3408
|
69 |
else:
|
gjc@3408
|
70 |
ns3_module_mobility__local.register_types(module)
|
gjc@3408
|
71 |
|
gjc@3408
|
72 |
root_module.end_section('ns3_module_mobility')
|
gjc@3408
|
73 |
root_module.begin_section('ns3_module_common')
|
gjc@3408
|
74 |
ns3_module_common.register_types(module)
|
gjc@3408
|
75 |
|
gjc@3408
|
76 |
try:
|
gjc@3408
|
77 |
import ns3_module_common__local
|
gjc@3408
|
78 |
except ImportError:
|
gjc@3408
|
79 |
pass
|
gjc@3408
|
80 |
else:
|
gjc@3408
|
81 |
ns3_module_common__local.register_types(module)
|
gjc@3408
|
82 |
|
gjc@3408
|
83 |
root_module.end_section('ns3_module_common')
|
gjc@3408
|
84 |
root_module.begin_section('ns3_module_contrib')
|
gjc@3408
|
85 |
ns3_module_contrib.register_types(module)
|
gjc@3408
|
86 |
|
gjc@3408
|
87 |
try:
|
gjc@3408
|
88 |
import ns3_module_contrib__local
|
gjc@3408
|
89 |
except ImportError:
|
gjc@3408
|
90 |
pass
|
gjc@3408
|
91 |
else:
|
gjc@3408
|
92 |
ns3_module_contrib__local.register_types(module)
|
gjc@3408
|
93 |
|
gjc@3408
|
94 |
root_module.end_section('ns3_module_contrib')
|
gjc@3408
|
95 |
root_module.begin_section('ns3_module_node')
|
gjc@3408
|
96 |
ns3_module_node.register_types(module)
|
gjc@3408
|
97 |
|
gjc@3408
|
98 |
try:
|
gjc@3408
|
99 |
import ns3_module_node__local
|
gjc@3408
|
100 |
except ImportError:
|
gjc@3408
|
101 |
pass
|
gjc@3408
|
102 |
else:
|
gjc@3408
|
103 |
ns3_module_node__local.register_types(module)
|
gjc@3408
|
104 |
|
gjc@3408
|
105 |
root_module.end_section('ns3_module_node')
|
gjc@3408
|
106 |
root_module.begin_section('ns3_module_point_to_point')
|
gjc@3408
|
107 |
ns3_module_point_to_point.register_types(module)
|
gjc@3408
|
108 |
|
gjc@3408
|
109 |
try:
|
gjc@3408
|
110 |
import ns3_module_point_to_point__local
|
gjc@3408
|
111 |
except ImportError:
|
gjc@3408
|
112 |
pass
|
gjc@3408
|
113 |
else:
|
gjc@3408
|
114 |
ns3_module_point_to_point__local.register_types(module)
|
gjc@3408
|
115 |
|
gjc@3408
|
116 |
root_module.end_section('ns3_module_point_to_point')
|
gjc@3408
|
117 |
root_module.begin_section('ns3_module_internet_stack')
|
gjc@3408
|
118 |
ns3_module_internet_stack.register_types(module)
|
gjc@3408
|
119 |
|
gjc@3408
|
120 |
try:
|
gjc@3408
|
121 |
import ns3_module_internet_stack__local
|
gjc@3408
|
122 |
except ImportError:
|
gjc@3408
|
123 |
pass
|
gjc@3408
|
124 |
else:
|
gjc@3408
|
125 |
ns3_module_internet_stack__local.register_types(module)
|
gjc@3408
|
126 |
|
gjc@3408
|
127 |
root_module.end_section('ns3_module_internet_stack')
|
gjc@3408
|
128 |
root_module.begin_section('ns3_module_wifi')
|
gjc@3408
|
129 |
ns3_module_wifi.register_types(module)
|
gjc@3408
|
130 |
|
gjc@3408
|
131 |
try:
|
gjc@3408
|
132 |
import ns3_module_wifi__local
|
gjc@3408
|
133 |
except ImportError:
|
gjc@3408
|
134 |
pass
|
gjc@3408
|
135 |
else:
|
gjc@3408
|
136 |
ns3_module_wifi__local.register_types(module)
|
gjc@3408
|
137 |
|
gjc@3408
|
138 |
root_module.end_section('ns3_module_wifi')
|
gjc@3408
|
139 |
root_module.begin_section('ns3_module_csma')
|
gjc@3408
|
140 |
ns3_module_csma.register_types(module)
|
gjc@3408
|
141 |
|
gjc@3408
|
142 |
try:
|
gjc@3408
|
143 |
import ns3_module_csma__local
|
gjc@3408
|
144 |
except ImportError:
|
gjc@3408
|
145 |
pass
|
gjc@3408
|
146 |
else:
|
gjc@3408
|
147 |
ns3_module_csma__local.register_types(module)
|
gjc@3408
|
148 |
|
gjc@3408
|
149 |
root_module.end_section('ns3_module_csma')
|
gjc@3457
|
150 |
root_module.begin_section('ns3_module_bridge')
|
gjc@3457
|
151 |
ns3_module_bridge.register_types(module)
|
gjc@3457
|
152 |
|
gjc@3457
|
153 |
try:
|
gjc@3457
|
154 |
import ns3_module_bridge__local
|
gjc@3457
|
155 |
except ImportError:
|
gjc@3457
|
156 |
pass
|
gjc@3457
|
157 |
else:
|
gjc@3457
|
158 |
ns3_module_bridge__local.register_types(module)
|
gjc@3457
|
159 |
|
gjc@3457
|
160 |
root_module.end_section('ns3_module_bridge')
|
gjc@3408
|
161 |
root_module.begin_section('ns3_module_packet_sink')
|
gjc@3408
|
162 |
ns3_module_packet_sink.register_types(module)
|
gjc@3408
|
163 |
|
gjc@3408
|
164 |
try:
|
gjc@3408
|
165 |
import ns3_module_packet_sink__local
|
gjc@3408
|
166 |
except ImportError:
|
gjc@3408
|
167 |
pass
|
gjc@3408
|
168 |
else:
|
gjc@3408
|
169 |
ns3_module_packet_sink__local.register_types(module)
|
gjc@3408
|
170 |
|
gjc@3408
|
171 |
root_module.end_section('ns3_module_packet_sink')
|
gjc@3408
|
172 |
root_module.begin_section('ns3_module_global_routing')
|
gjc@3408
|
173 |
ns3_module_global_routing.register_types(module)
|
gjc@3408
|
174 |
|
gjc@3408
|
175 |
try:
|
gjc@3408
|
176 |
import ns3_module_global_routing__local
|
gjc@3408
|
177 |
except ImportError:
|
gjc@3408
|
178 |
pass
|
gjc@3408
|
179 |
else:
|
gjc@3408
|
180 |
ns3_module_global_routing__local.register_types(module)
|
gjc@3408
|
181 |
|
gjc@3408
|
182 |
root_module.end_section('ns3_module_global_routing')
|
gjc@3408
|
183 |
root_module.begin_section('ns3_module_onoff')
|
gjc@3408
|
184 |
ns3_module_onoff.register_types(module)
|
gjc@3408
|
185 |
|
gjc@3408
|
186 |
try:
|
gjc@3408
|
187 |
import ns3_module_onoff__local
|
gjc@3408
|
188 |
except ImportError:
|
gjc@3408
|
189 |
pass
|
gjc@3408
|
190 |
else:
|
gjc@3408
|
191 |
ns3_module_onoff__local.register_types(module)
|
gjc@3408
|
192 |
|
gjc@3408
|
193 |
root_module.end_section('ns3_module_onoff')
|
gjc@3408
|
194 |
root_module.begin_section('ns3_module_olsr')
|
gjc@3408
|
195 |
ns3_module_olsr.register_types(module)
|
gjc@3408
|
196 |
|
gjc@3408
|
197 |
try:
|
gjc@3408
|
198 |
import ns3_module_olsr__local
|
gjc@3408
|
199 |
except ImportError:
|
gjc@3408
|
200 |
pass
|
gjc@3408
|
201 |
else:
|
gjc@3408
|
202 |
ns3_module_olsr__local.register_types(module)
|
gjc@3408
|
203 |
|
gjc@3408
|
204 |
root_module.end_section('ns3_module_olsr')
|
gjc@3408
|
205 |
root_module.begin_section('ns3_module_udp_echo')
|
gjc@3408
|
206 |
ns3_module_udp_echo.register_types(module)
|
gjc@3408
|
207 |
|
gjc@3408
|
208 |
try:
|
gjc@3408
|
209 |
import ns3_module_udp_echo__local
|
gjc@3408
|
210 |
except ImportError:
|
gjc@3408
|
211 |
pass
|
gjc@3408
|
212 |
else:
|
gjc@3408
|
213 |
ns3_module_udp_echo__local.register_types(module)
|
gjc@3408
|
214 |
|
gjc@3408
|
215 |
root_module.end_section('ns3_module_udp_echo')
|
gjc@3408
|
216 |
root_module.begin_section('ns3_module_helper')
|
gjc@3408
|
217 |
ns3_module_helper.register_types(module)
|
gjc@3408
|
218 |
|
gjc@3408
|
219 |
try:
|
gjc@3408
|
220 |
import ns3_module_helper__local
|
gjc@3408
|
221 |
except ImportError:
|
gjc@3408
|
222 |
pass
|
gjc@3408
|
223 |
else:
|
gjc@3408
|
224 |
ns3_module_helper__local.register_types(module)
|
gjc@3408
|
225 |
|
gjc@3408
|
226 |
root_module.end_section('ns3_module_helper')
|
gjc@3539
|
227 |
module.add_container('std::vector< unsigned int, std::allocator< unsigned int > >', 'unsigned int')
|
gjc@3539
|
228 |
module.add_container('std::list< unsigned int, std::allocator< unsigned int > >', 'unsigned int')
|
gjc@3408
|
229 |
|
gjc@3408
|
230 |
## Register a nested module for the namespace internal
|
gjc@3408
|
231 |
|
gjc@3408
|
232 |
nested_module = module.add_cpp_namespace('internal')
|
gjc@3408
|
233 |
register_types_ns3_internal(nested_module)
|
gjc@3408
|
234 |
|
gjc@3408
|
235 |
|
gjc@3408
|
236 |
## Register a nested module for the namespace TimeStepPrecision
|
gjc@3408
|
237 |
|
gjc@3408
|
238 |
nested_module = module.add_cpp_namespace('TimeStepPrecision')
|
gjc@3408
|
239 |
register_types_ns3_TimeStepPrecision(nested_module)
|
gjc@3408
|
240 |
|
gjc@3408
|
241 |
|
gjc@3408
|
242 |
## Register a nested module for the namespace Config
|
gjc@3408
|
243 |
|
gjc@3408
|
244 |
nested_module = module.add_cpp_namespace('Config')
|
gjc@3408
|
245 |
register_types_ns3_Config(nested_module)
|
gjc@3408
|
246 |
|
gjc@3408
|
247 |
|
gjc@3408
|
248 |
## Register a nested module for the namespace olsr
|
gjc@3408
|
249 |
|
gjc@3408
|
250 |
nested_module = module.add_cpp_namespace('olsr')
|
gjc@3408
|
251 |
register_types_ns3_olsr(nested_module)
|
gjc@3408
|
252 |
|
gjc@3408
|
253 |
|
gjc@3408
|
254 |
def register_types_ns3_internal(module):
|
gjc@3408
|
255 |
root_module = module.get_root()
|
gjc@3408
|
256 |
|
gjc@3408
|
257 |
|
gjc@3408
|
258 |
def register_types_ns3_TimeStepPrecision(module):
|
gjc@3408
|
259 |
root_module = module.get_root()
|
gjc@3408
|
260 |
|
gjc@3408
|
261 |
|
gjc@3408
|
262 |
def register_types_ns3_Config(module):
|
gjc@3408
|
263 |
root_module = module.get_root()
|
gjc@3408
|
264 |
|
gjc@3408
|
265 |
|
gjc@3408
|
266 |
def register_types_ns3_olsr(module):
|
gjc@3408
|
267 |
root_module = module.get_root()
|
gjc@3408
|
268 |
|
gjc@3408
|
269 |
|
gjc@3408
|
270 |
def register_methods(root_module):
|
gjc@3408
|
271 |
root_module.begin_section('ns3_module_core')
|
gjc@3408
|
272 |
ns3_module_core.register_methods(root_module)
|
gjc@3408
|
273 |
|
gjc@3408
|
274 |
try:
|
gjc@3408
|
275 |
import ns3_module_core__local
|
gjc@3408
|
276 |
except ImportError:
|
gjc@3408
|
277 |
pass
|
gjc@3408
|
278 |
else:
|
gjc@3408
|
279 |
ns3_module_core__local.register_methods(root_module)
|
gjc@3408
|
280 |
|
gjc@3408
|
281 |
root_module.end_section('ns3_module_core')
|
gjc@3408
|
282 |
root_module.begin_section('ns3_module_simulator')
|
gjc@3408
|
283 |
ns3_module_simulator.register_methods(root_module)
|
gjc@3408
|
284 |
|
gjc@3408
|
285 |
try:
|
gjc@3408
|
286 |
import ns3_module_simulator__local
|
gjc@3408
|
287 |
except ImportError:
|
gjc@3408
|
288 |
pass
|
gjc@3408
|
289 |
else:
|
gjc@3408
|
290 |
ns3_module_simulator__local.register_methods(root_module)
|
gjc@3408
|
291 |
|
gjc@3408
|
292 |
root_module.end_section('ns3_module_simulator')
|
gjc@3408
|
293 |
root_module.begin_section('ns3_module_mobility')
|
gjc@3408
|
294 |
ns3_module_mobility.register_methods(root_module)
|
gjc@3408
|
295 |
|
gjc@3408
|
296 |
try:
|
gjc@3408
|
297 |
import ns3_module_mobility__local
|
gjc@3408
|
298 |
except ImportError:
|
gjc@3408
|
299 |
pass
|
gjc@3408
|
300 |
else:
|
gjc@3408
|
301 |
ns3_module_mobility__local.register_methods(root_module)
|
gjc@3408
|
302 |
|
gjc@3408
|
303 |
root_module.end_section('ns3_module_mobility')
|
gjc@3408
|
304 |
root_module.begin_section('ns3_module_common')
|
gjc@3408
|
305 |
ns3_module_common.register_methods(root_module)
|
gjc@3408
|
306 |
|
gjc@3408
|
307 |
try:
|
gjc@3408
|
308 |
import ns3_module_common__local
|
gjc@3408
|
309 |
except ImportError:
|
gjc@3408
|
310 |
pass
|
gjc@3408
|
311 |
else:
|
gjc@3408
|
312 |
ns3_module_common__local.register_methods(root_module)
|
gjc@3408
|
313 |
|
gjc@3408
|
314 |
root_module.end_section('ns3_module_common')
|
gjc@3408
|
315 |
root_module.begin_section('ns3_module_contrib')
|
gjc@3408
|
316 |
ns3_module_contrib.register_methods(root_module)
|
gjc@3408
|
317 |
|
gjc@3408
|
318 |
try:
|
gjc@3408
|
319 |
import ns3_module_contrib__local
|
gjc@3408
|
320 |
except ImportError:
|
gjc@3408
|
321 |
pass
|
gjc@3408
|
322 |
else:
|
gjc@3408
|
323 |
ns3_module_contrib__local.register_methods(root_module)
|
gjc@3408
|
324 |
|
gjc@3408
|
325 |
root_module.end_section('ns3_module_contrib')
|
gjc@3408
|
326 |
root_module.begin_section('ns3_module_node')
|
gjc@3408
|
327 |
ns3_module_node.register_methods(root_module)
|
gjc@3408
|
328 |
|
gjc@3408
|
329 |
try:
|
gjc@3408
|
330 |
import ns3_module_node__local
|
gjc@3408
|
331 |
except ImportError:
|
gjc@3408
|
332 |
pass
|
gjc@3408
|
333 |
else:
|
gjc@3408
|
334 |
ns3_module_node__local.register_methods(root_module)
|
gjc@3408
|
335 |
|
gjc@3408
|
336 |
root_module.end_section('ns3_module_node')
|
gjc@3408
|
337 |
root_module.begin_section('ns3_module_point_to_point')
|
gjc@3408
|
338 |
ns3_module_point_to_point.register_methods(root_module)
|
gjc@3408
|
339 |
|
gjc@3408
|
340 |
try:
|
gjc@3408
|
341 |
import ns3_module_point_to_point__local
|
gjc@3408
|
342 |
except ImportError:
|
gjc@3408
|
343 |
pass
|
gjc@3408
|
344 |
else:
|
gjc@3408
|
345 |
ns3_module_point_to_point__local.register_methods(root_module)
|
gjc@3408
|
346 |
|
gjc@3408
|
347 |
root_module.end_section('ns3_module_point_to_point')
|
gjc@3408
|
348 |
root_module.begin_section('ns3_module_internet_stack')
|
gjc@3408
|
349 |
ns3_module_internet_stack.register_methods(root_module)
|
gjc@3408
|
350 |
|
gjc@3408
|
351 |
try:
|
gjc@3408
|
352 |
import ns3_module_internet_stack__local
|
gjc@3408
|
353 |
except ImportError:
|
gjc@3408
|
354 |
pass
|
gjc@3408
|
355 |
else:
|
gjc@3408
|
356 |
ns3_module_internet_stack__local.register_methods(root_module)
|
gjc@3408
|
357 |
|
gjc@3408
|
358 |
root_module.end_section('ns3_module_internet_stack')
|
gjc@3408
|
359 |
root_module.begin_section('ns3_module_wifi')
|
gjc@3408
|
360 |
ns3_module_wifi.register_methods(root_module)
|
gjc@3408
|
361 |
|
gjc@3408
|
362 |
try:
|
gjc@3408
|
363 |
import ns3_module_wifi__local
|
gjc@3408
|
364 |
except ImportError:
|
gjc@3408
|
365 |
pass
|
gjc@3408
|
366 |
else:
|
gjc@3408
|
367 |
ns3_module_wifi__local.register_methods(root_module)
|
gjc@3408
|
368 |
|
gjc@3408
|
369 |
root_module.end_section('ns3_module_wifi')
|
gjc@3408
|
370 |
root_module.begin_section('ns3_module_csma')
|
gjc@3408
|
371 |
ns3_module_csma.register_methods(root_module)
|
gjc@3408
|
372 |
|
gjc@3408
|
373 |
try:
|
gjc@3408
|
374 |
import ns3_module_csma__local
|
gjc@3408
|
375 |
except ImportError:
|
gjc@3408
|
376 |
pass
|
gjc@3408
|
377 |
else:
|
gjc@3408
|
378 |
ns3_module_csma__local.register_methods(root_module)
|
gjc@3408
|
379 |
|
gjc@3408
|
380 |
root_module.end_section('ns3_module_csma')
|
gjc@3457
|
381 |
root_module.begin_section('ns3_module_bridge')
|
gjc@3457
|
382 |
ns3_module_bridge.register_methods(root_module)
|
gjc@3457
|
383 |
|
gjc@3457
|
384 |
try:
|
gjc@3457
|
385 |
import ns3_module_bridge__local
|
gjc@3457
|
386 |
except ImportError:
|
gjc@3457
|
387 |
pass
|
gjc@3457
|
388 |
else:
|
gjc@3457
|
389 |
ns3_module_bridge__local.register_methods(root_module)
|
gjc@3457
|
390 |
|
gjc@3457
|
391 |
root_module.end_section('ns3_module_bridge')
|
gjc@3408
|
392 |
root_module.begin_section('ns3_module_packet_sink')
|
gjc@3408
|
393 |
ns3_module_packet_sink.register_methods(root_module)
|
gjc@3408
|
394 |
|
gjc@3408
|
395 |
try:
|
gjc@3408
|
396 |
import ns3_module_packet_sink__local
|
gjc@3408
|
397 |
except ImportError:
|
gjc@3408
|
398 |
pass
|
gjc@3408
|
399 |
else:
|
gjc@3408
|
400 |
ns3_module_packet_sink__local.register_methods(root_module)
|
gjc@3408
|
401 |
|
gjc@3408
|
402 |
root_module.end_section('ns3_module_packet_sink')
|
gjc@3408
|
403 |
root_module.begin_section('ns3_module_global_routing')
|
gjc@3408
|
404 |
ns3_module_global_routing.register_methods(root_module)
|
gjc@3408
|
405 |
|
gjc@3408
|
406 |
try:
|
gjc@3408
|
407 |
import ns3_module_global_routing__local
|
gjc@3408
|
408 |
except ImportError:
|
gjc@3408
|
409 |
pass
|
gjc@3408
|
410 |
else:
|
gjc@3408
|
411 |
ns3_module_global_routing__local.register_methods(root_module)
|
gjc@3408
|
412 |
|
gjc@3408
|
413 |
root_module.end_section('ns3_module_global_routing')
|
gjc@3408
|
414 |
root_module.begin_section('ns3_module_onoff')
|
gjc@3408
|
415 |
ns3_module_onoff.register_methods(root_module)
|
gjc@3408
|
416 |
|
gjc@3408
|
417 |
try:
|
gjc@3408
|
418 |
import ns3_module_onoff__local
|
gjc@3408
|
419 |
except ImportError:
|
gjc@3408
|
420 |
pass
|
gjc@3408
|
421 |
else:
|
gjc@3408
|
422 |
ns3_module_onoff__local.register_methods(root_module)
|
gjc@3408
|
423 |
|
gjc@3408
|
424 |
root_module.end_section('ns3_module_onoff')
|
gjc@3408
|
425 |
root_module.begin_section('ns3_module_olsr')
|
gjc@3408
|
426 |
ns3_module_olsr.register_methods(root_module)
|
gjc@3408
|
427 |
|
gjc@3408
|
428 |
try:
|
gjc@3408
|
429 |
import ns3_module_olsr__local
|
gjc@3408
|
430 |
except ImportError:
|
gjc@3408
|
431 |
pass
|
gjc@3408
|
432 |
else:
|
gjc@3408
|
433 |
ns3_module_olsr__local.register_methods(root_module)
|
gjc@3408
|
434 |
|
gjc@3408
|
435 |
root_module.end_section('ns3_module_olsr')
|
gjc@3408
|
436 |
root_module.begin_section('ns3_module_udp_echo')
|
gjc@3408
|
437 |
ns3_module_udp_echo.register_methods(root_module)
|
gjc@3408
|
438 |
|
gjc@3408
|
439 |
try:
|
gjc@3408
|
440 |
import ns3_module_udp_echo__local
|
gjc@3408
|
441 |
except ImportError:
|
gjc@3408
|
442 |
pass
|
gjc@3408
|
443 |
else:
|
gjc@3408
|
444 |
ns3_module_udp_echo__local.register_methods(root_module)
|
gjc@3408
|
445 |
|
gjc@3408
|
446 |
root_module.end_section('ns3_module_udp_echo')
|
gjc@3408
|
447 |
root_module.begin_section('ns3_module_helper')
|
gjc@3408
|
448 |
ns3_module_helper.register_methods(root_module)
|
gjc@3408
|
449 |
|
gjc@3408
|
450 |
try:
|
gjc@3408
|
451 |
import ns3_module_helper__local
|
gjc@3408
|
452 |
except ImportError:
|
gjc@3408
|
453 |
pass
|
gjc@3408
|
454 |
else:
|
gjc@3408
|
455 |
ns3_module_helper__local.register_methods(root_module)
|
gjc@3408
|
456 |
|
gjc@3408
|
457 |
root_module.end_section('ns3_module_helper')
|
gjc@3408
|
458 |
return
|
gjc@3408
|
459 |
|
gjc@3408
|
460 |
def register_functions(root_module):
|
gjc@3408
|
461 |
module = root_module
|
gjc@3408
|
462 |
root_module.begin_section('ns3_module_core')
|
gjc@3408
|
463 |
ns3_module_core.register_functions(root_module)
|
gjc@3408
|
464 |
|
gjc@3408
|
465 |
try:
|
gjc@3408
|
466 |
import ns3_module_core__local
|
gjc@3408
|
467 |
except ImportError:
|
gjc@3408
|
468 |
pass
|
gjc@3408
|
469 |
else:
|
gjc@3408
|
470 |
ns3_module_core__local.register_functions(root_module)
|
gjc@3408
|
471 |
|
gjc@3408
|
472 |
root_module.end_section('ns3_module_core')
|
gjc@3408
|
473 |
root_module.begin_section('ns3_module_simulator')
|
gjc@3408
|
474 |
ns3_module_simulator.register_functions(root_module)
|
gjc@3408
|
475 |
|
gjc@3408
|
476 |
try:
|
gjc@3408
|
477 |
import ns3_module_simulator__local
|
gjc@3408
|
478 |
except ImportError:
|
gjc@3408
|
479 |
pass
|
gjc@3408
|
480 |
else:
|
gjc@3408
|
481 |
ns3_module_simulator__local.register_functions(root_module)
|
gjc@3408
|
482 |
|
gjc@3408
|
483 |
root_module.end_section('ns3_module_simulator')
|
gjc@3408
|
484 |
root_module.begin_section('ns3_module_mobility')
|
gjc@3408
|
485 |
ns3_module_mobility.register_functions(root_module)
|
gjc@3408
|
486 |
|
gjc@3408
|
487 |
try:
|
gjc@3408
|
488 |
import ns3_module_mobility__local
|
gjc@3408
|
489 |
except ImportError:
|
gjc@3408
|
490 |
pass
|
gjc@3408
|
491 |
else:
|
gjc@3408
|
492 |
ns3_module_mobility__local.register_functions(root_module)
|
gjc@3408
|
493 |
|
gjc@3408
|
494 |
root_module.end_section('ns3_module_mobility')
|
gjc@3408
|
495 |
root_module.begin_section('ns3_module_common')
|
gjc@3408
|
496 |
ns3_module_common.register_functions(root_module)
|
gjc@3408
|
497 |
|
gjc@3408
|
498 |
try:
|
gjc@3408
|
499 |
import ns3_module_common__local
|
gjc@3408
|
500 |
except ImportError:
|
gjc@3408
|
501 |
pass
|
gjc@3408
|
502 |
else:
|
gjc@3408
|
503 |
ns3_module_common__local.register_functions(root_module)
|
gjc@3408
|
504 |
|
gjc@3408
|
505 |
root_module.end_section('ns3_module_common')
|
gjc@3408
|
506 |
root_module.begin_section('ns3_module_contrib')
|
gjc@3408
|
507 |
ns3_module_contrib.register_functions(root_module)
|
gjc@3408
|
508 |
|
gjc@3408
|
509 |
try:
|
gjc@3408
|
510 |
import ns3_module_contrib__local
|
gjc@3408
|
511 |
except ImportError:
|
gjc@3408
|
512 |
pass
|
gjc@3408
|
513 |
else:
|
gjc@3408
|
514 |
ns3_module_contrib__local.register_functions(root_module)
|
gjc@3408
|
515 |
|
gjc@3408
|
516 |
root_module.end_section('ns3_module_contrib')
|
gjc@3408
|
517 |
root_module.begin_section('ns3_module_node')
|
gjc@3408
|
518 |
ns3_module_node.register_functions(root_module)
|
gjc@3408
|
519 |
|
gjc@3408
|
520 |
try:
|
gjc@3408
|
521 |
import ns3_module_node__local
|
gjc@3408
|
522 |
except ImportError:
|
gjc@3408
|
523 |
pass
|
gjc@3408
|
524 |
else:
|
gjc@3408
|
525 |
ns3_module_node__local.register_functions(root_module)
|
gjc@3408
|
526 |
|
gjc@3408
|
527 |
root_module.end_section('ns3_module_node')
|
gjc@3408
|
528 |
root_module.begin_section('ns3_module_point_to_point')
|
gjc@3408
|
529 |
ns3_module_point_to_point.register_functions(root_module)
|
gjc@3408
|
530 |
|
gjc@3408
|
531 |
try:
|
gjc@3408
|
532 |
import ns3_module_point_to_point__local
|
gjc@3408
|
533 |
except ImportError:
|
gjc@3408
|
534 |
pass
|
gjc@3408
|
535 |
else:
|
gjc@3408
|
536 |
ns3_module_point_to_point__local.register_functions(root_module)
|
gjc@3408
|
537 |
|
gjc@3408
|
538 |
root_module.end_section('ns3_module_point_to_point')
|
gjc@3408
|
539 |
root_module.begin_section('ns3_module_internet_stack')
|
gjc@3408
|
540 |
ns3_module_internet_stack.register_functions(root_module)
|
gjc@3408
|
541 |
|
gjc@3408
|
542 |
try:
|
gjc@3408
|
543 |
import ns3_module_internet_stack__local
|
gjc@3408
|
544 |
except ImportError:
|
gjc@3408
|
545 |
pass
|
gjc@3408
|
546 |
else:
|
gjc@3408
|
547 |
ns3_module_internet_stack__local.register_functions(root_module)
|
gjc@3408
|
548 |
|
gjc@3408
|
549 |
root_module.end_section('ns3_module_internet_stack')
|
gjc@3408
|
550 |
root_module.begin_section('ns3_module_wifi')
|
gjc@3408
|
551 |
ns3_module_wifi.register_functions(root_module)
|
gjc@3408
|
552 |
|
gjc@3408
|
553 |
try:
|
gjc@3408
|
554 |
import ns3_module_wifi__local
|
gjc@3408
|
555 |
except ImportError:
|
gjc@3408
|
556 |
pass
|
gjc@3408
|
557 |
else:
|
gjc@3408
|
558 |
ns3_module_wifi__local.register_functions(root_module)
|
gjc@3408
|
559 |
|
gjc@3408
|
560 |
root_module.end_section('ns3_module_wifi')
|
gjc@3408
|
561 |
root_module.begin_section('ns3_module_csma')
|
gjc@3408
|
562 |
ns3_module_csma.register_functions(root_module)
|
gjc@3408
|
563 |
|
gjc@3408
|
564 |
try:
|
gjc@3408
|
565 |
import ns3_module_csma__local
|
gjc@3408
|
566 |
except ImportError:
|
gjc@3408
|
567 |
pass
|
gjc@3408
|
568 |
else:
|
gjc@3408
|
569 |
ns3_module_csma__local.register_functions(root_module)
|
gjc@3408
|
570 |
|
gjc@3408
|
571 |
root_module.end_section('ns3_module_csma')
|
gjc@3457
|
572 |
root_module.begin_section('ns3_module_bridge')
|
gjc@3457
|
573 |
ns3_module_bridge.register_functions(root_module)
|
gjc@3457
|
574 |
|
gjc@3457
|
575 |
try:
|
gjc@3457
|
576 |
import ns3_module_bridge__local
|
gjc@3457
|
577 |
except ImportError:
|
gjc@3457
|
578 |
pass
|
gjc@3457
|
579 |
else:
|
gjc@3457
|
580 |
ns3_module_bridge__local.register_functions(root_module)
|
gjc@3457
|
581 |
|
gjc@3457
|
582 |
root_module.end_section('ns3_module_bridge')
|
gjc@3408
|
583 |
root_module.begin_section('ns3_module_packet_sink')
|
gjc@3408
|
584 |
ns3_module_packet_sink.register_functions(root_module)
|
gjc@3408
|
585 |
|
gjc@3408
|
586 |
try:
|
gjc@3408
|
587 |
import ns3_module_packet_sink__local
|
gjc@3408
|
588 |
except ImportError:
|
gjc@3408
|
589 |
pass
|
gjc@3408
|
590 |
else:
|
gjc@3408
|
591 |
ns3_module_packet_sink__local.register_functions(root_module)
|
gjc@3408
|
592 |
|
gjc@3408
|
593 |
root_module.end_section('ns3_module_packet_sink')
|
gjc@3408
|
594 |
root_module.begin_section('ns3_module_global_routing')
|
gjc@3408
|
595 |
ns3_module_global_routing.register_functions(root_module)
|
gjc@3408
|
596 |
|
gjc@3408
|
597 |
try:
|
gjc@3408
|
598 |
import ns3_module_global_routing__local
|
gjc@3408
|
599 |
except ImportError:
|
gjc@3408
|
600 |
pass
|
gjc@3408
|
601 |
else:
|
gjc@3408
|
602 |
ns3_module_global_routing__local.register_functions(root_module)
|
gjc@3408
|
603 |
|
gjc@3408
|
604 |
root_module.end_section('ns3_module_global_routing')
|
gjc@3408
|
605 |
root_module.begin_section('ns3_module_onoff')
|
gjc@3408
|
606 |
ns3_module_onoff.register_functions(root_module)
|
gjc@3408
|
607 |
|
gjc@3408
|
608 |
try:
|
gjc@3408
|
609 |
import ns3_module_onoff__local
|
gjc@3408
|
610 |
except ImportError:
|
gjc@3408
|
611 |
pass
|
gjc@3408
|
612 |
else:
|
gjc@3408
|
613 |
ns3_module_onoff__local.register_functions(root_module)
|
gjc@3408
|
614 |
|
gjc@3408
|
615 |
root_module.end_section('ns3_module_onoff')
|
gjc@3408
|
616 |
root_module.begin_section('ns3_module_olsr')
|
gjc@3408
|
617 |
ns3_module_olsr.register_functions(root_module)
|
gjc@3408
|
618 |
|
gjc@3408
|
619 |
try:
|
gjc@3408
|
620 |
import ns3_module_olsr__local
|
gjc@3408
|
621 |
except ImportError:
|
gjc@3408
|
622 |
pass
|
gjc@3408
|
623 |
else:
|
gjc@3408
|
624 |
ns3_module_olsr__local.register_functions(root_module)
|
gjc@3408
|
625 |
|
gjc@3408
|
626 |
root_module.end_section('ns3_module_olsr')
|
gjc@3408
|
627 |
root_module.begin_section('ns3_module_udp_echo')
|
gjc@3408
|
628 |
ns3_module_udp_echo.register_functions(root_module)
|
gjc@3408
|
629 |
|
gjc@3408
|
630 |
try:
|
gjc@3408
|
631 |
import ns3_module_udp_echo__local
|
gjc@3408
|
632 |
except ImportError:
|
gjc@3408
|
633 |
pass
|
gjc@3408
|
634 |
else:
|
gjc@3408
|
635 |
ns3_module_udp_echo__local.register_functions(root_module)
|
gjc@3408
|
636 |
|
gjc@3408
|
637 |
root_module.end_section('ns3_module_udp_echo')
|
gjc@3408
|
638 |
root_module.begin_section('ns3_module_helper')
|
gjc@3408
|
639 |
ns3_module_helper.register_functions(root_module)
|
gjc@3408
|
640 |
|
gjc@3408
|
641 |
try:
|
gjc@3408
|
642 |
import ns3_module_helper__local
|
gjc@3408
|
643 |
except ImportError:
|
gjc@3408
|
644 |
pass
|
gjc@3408
|
645 |
else:
|
gjc@3408
|
646 |
ns3_module_helper__local.register_functions(root_module)
|
gjc@3408
|
647 |
|
gjc@3408
|
648 |
root_module.end_section('ns3_module_helper')
|
gjc@3408
|
649 |
register_functions_ns3_internal(module.get_submodule('internal'), root_module)
|
gjc@3408
|
650 |
register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module)
|
gjc@3408
|
651 |
register_functions_ns3_Config(module.get_submodule('Config'), root_module)
|
gjc@3408
|
652 |
register_functions_ns3_olsr(module.get_submodule('olsr'), root_module)
|
gjc@3408
|
653 |
return
|
gjc@3408
|
654 |
|
gjc@3408
|
655 |
def register_functions_ns3_internal(module, root_module):
|
gjc@3408
|
656 |
return
|
gjc@3408
|
657 |
|
gjc@3408
|
658 |
def register_functions_ns3_TimeStepPrecision(module, root_module):
|
gjc@3408
|
659 |
return
|
gjc@3408
|
660 |
|
gjc@3408
|
661 |
def register_functions_ns3_Config(module, root_module):
|
gjc@3408
|
662 |
return
|
gjc@3408
|
663 |
|
gjc@3408
|
664 |
def register_functions_ns3_olsr(module, root_module):
|
gjc@3408
|
665 |
return
|
gjc@3408
|
666 |
|
gjc@3408
|
667 |
def main():
|
gjc@3408
|
668 |
out = FileCodeSink(sys.stdout)
|
gjc@3408
|
669 |
root_module = module_init()
|
gjc@3408
|
670 |
register_types(root_module)
|
gjc@3408
|
671 |
register_methods(root_module)
|
gjc@3408
|
672 |
register_functions(root_module)
|
gjc@3408
|
673 |
root_module.generate(out)
|
gjc@3408
|
674 |
|
gjc@3408
|
675 |
if __name__ == '__main__':
|
gjc@3408
|
676 |
main()
|
gjc@3408
|
677 |
|