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