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