📄 readme
字号:
Format of scenario files------------------------A scenario file can include several scenarios, denoted by '[' <scenario name> ']'For instance with two scenario 'scenar1' and 'scenar2': [scenar1] ... description of scenario 'scenar1' ... [scenar2] ... description of scenario 'scenar2' ...By default, without '[ ... ]' declaration scenario name is 'default'The scenarion itself is a sequence of links, separated by ',' or ' ' or ';'An interface node is denoted by either: - notation 1: <node identifier><iface identifier> as in 'A0' (interface '0' of node 'A' which is node '0') (A = 0, B = 1, etc... ) - notation 2: N<node identifier>I<iface identifier> [XXX:not implemented yet] as in 'N0I0' (interface '0' of node '0' == same as 'A0')* Anything after '#' is a comment and ignored* A link is denoted by two interface nodes, and between them,one of symbols '<->', '<-', '->' depending whether the linkis symmetrical or not. example: A0 <-> B0* Configuration of a node is written by node_name followed by @(<configuration>). example: A@( willingness 3 ; hello-interval 1 )* A link going up and down is written by appending [<up_time>:<down_time>] ; down_time is empty, if the link never goes down: example: A0 -> B0 (10.0:30) A0 <-> B0 (5.0:) Note: overlapping of links is not computed, so having declared the same link twice leads to bogus scenario * A point to check consistency of the network is written with "at" followed by the time of the check inside parenthesis and whether a check should be actually performed (or just output the data) example: at(10.0, check) at(10.0)---------------------------------------------------------------------------# Example of scenario file:[one-link]A0 <-> B0 [two-link]A0 <-> B0 ; B0 <-> C0at(30.0, check)[three-link]A0 <-> B0 ; C0 <-> D0B0 <-> C0at(30.0, check)[four-link]D(willingness 0)A0 <-> B0 ; C0 <-> D0B0 <-> C0 ; D0 <-> E0at(30.0, check)[one-link-up-down]A0 <-> B0 (100.0:200.0)at(50.0, check)at(150.0, check)at(250.0, check)[one-link-again]N0I0 <-> N1I0[one-link-ter]N30(hello-interval 1 ; tc-interval 1)N30I0 <-> N40I0===========================================================================(in directory ${OOLSRDIR}/tools)runSimul.py converts the simulation file to an internal format:<max identifier of node+1> <nb nodes> <nb links> <nb checkpoints> <node idx> <max identifier of node interface> <configuration string> .... # <nb nodes> times <node idx> <max identifier of node interface> <configuration string><src node idx> <src iface idx> <dst node idx> <dst iface> <time> <isUp> ... # <nb links> times<src node idx> <src iface idx> <dst node idx> <dst iface> <time> <isUp><check point time> <should_check> ... # <nb checkpoints> times<check point time> <should_check>---------------------------------------------------------------------------* "python runSimul.py <scenario fileName>" does the following - create a ./tmp directory (in ${OOLSRDIR}/tools) - create a ./tmp/<scenario fileName basename> (without path, and without ".scenario" suffix) - For each scenario <scenario name> inside the file (default is "default"), . create a directory ./tmp/<scenario fileName basename>/<scenario name> . this directory is denoted ${SCENARIODIR} in the following lines . put the scenario into file ${SCENARIODIR}/scenario . runs the program 'simul_static_plugee' with parameters simul_static_plugee --topology ${SCENARIODIR}/scenario \ --output ${SCENARIODIR}/output . as a result: ${SCENARIODIR}/ok should be created if the program ran succesfully ${SCENARIODIR}/output should hold the values . the file ${SCENARIODIR}/output is analyzed by the checker at checkpoints output to see whether the results are consistent ===> Bonus: DEBUGGING <=== . you can go in ${SCENARIODIR} and run the script 'emacsgdb.sh' to run the debugger on the scenario. Type 'run' (it uses files ${SCENARIODIR}/.rungdb.el and ${SCENARIODIR}/.gdbinit)---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -