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