├── docs ├── CNAME ├── showfile.md ├── tutorials │ ├── tictoc │ │ ├── code │ │ │ ├── package.ned │ │ │ ├── TicToc18E.anf │ │ │ ├── tictoc13.msg │ │ │ ├── tictoc14.msg │ │ │ ├── tictoc15.msg │ │ │ ├── tictoc16.msg │ │ │ ├── tictoc17.msg │ │ │ ├── tictoc18.msg │ │ │ ├── tictoc1.ned │ │ │ ├── tictoc6.ned │ │ │ ├── tictoc3.ned │ │ │ ├── tictoc13.ned │ │ │ ├── tictoc14.ned │ │ │ ├── tictoc15.ned │ │ │ ├── tictoc7.ned │ │ │ ├── tictoc8.ned │ │ │ ├── tictoc12.ned │ │ │ ├── tictoc9.ned │ │ │ ├── tictoc16.ned │ │ │ ├── tictoc4.ned │ │ │ ├── tictoc18.ned │ │ │ ├── tictoc10.ned │ │ │ ├── tictoc2.ned │ │ │ ├── tictoc17.ned │ │ │ ├── tictoc11.ned │ │ │ ├── txc2.cc │ │ │ ├── txc5.cc │ │ │ ├── omnetpp.ini │ │ │ ├── txc4.cc │ │ │ ├── tictoc5.ned │ │ │ ├── Tictoc18.anf │ │ │ ├── txc1.cc │ │ │ ├── txc10.cc │ │ │ ├── txc11.cc │ │ │ ├── txc3.cc │ │ │ ├── txc12.cc │ │ │ ├── txc7.cc │ │ │ ├── txc17.cc │ │ │ ├── txc8.cc │ │ │ ├── txc14.cc │ │ │ ├── txc13.cc │ │ │ ├── txc6.cc │ │ │ ├── txc9.cc │ │ │ ├── txc16.cc │ │ │ ├── txc18.cc │ │ │ └── txc15.cc │ │ ├── images │ │ │ ├── mean.png │ │ │ ├── run.png │ │ │ ├── debug.png │ │ │ ├── error.png │ │ │ ├── mean2.png │ │ │ ├── mean3.png │ │ │ ├── step1.png │ │ │ ├── step10.png │ │ │ ├── step17.png │ │ │ ├── step18.png │ │ │ ├── step2a.png │ │ │ ├── step2b.png │ │ │ ├── step2c.png │ │ │ ├── step3.png │ │ │ ├── step6.png │ │ │ ├── step8.png │ │ │ ├── applymean.png │ │ │ ├── dataset.png │ │ │ ├── eventlog.png │ │ │ ├── histogram.png │ │ │ ├── inieditor.png │ │ │ ├── inspector.png │ │ │ ├── nededitor.png │ │ │ ├── palette.png │ │ │ ├── relayout.png │ │ │ ├── runconfig.png │ │ │ ├── scalars.png │ │ │ ├── step13a.png │ │ │ ├── step13b.png │ │ │ ├── step13e.png │ │ │ ├── step14a.png │ │ │ ├── step14b.png │ │ │ ├── step15a.png │ │ │ ├── step15b.png │ │ │ ├── tictoc1_3.gif │ │ │ ├── vectors.png │ │ │ ├── vectors2.png │ │ │ ├── avghopcount.png │ │ │ ├── newproject.png │ │ │ ├── runconfig2.png │ │ │ ├── select_plot.png │ │ │ ├── selectplot2.png │ │ │ ├── stacktrace.png │ │ │ ├── statistics.png │ │ │ ├── avgnumpackets.png │ │ │ ├── debugnextevent.png │ │ │ ├── displaylegend.png │ │ │ ├── editlinechart.png │ │ │ ├── editlinechart2.png │ │ │ ├── hopcountchart.png │ │ │ ├── launchdialog.png │ │ │ ├── numberofnodes.png │ │ │ ├── open_details.png │ │ │ └── open_graphical_view.png │ │ ├── conclusion.md │ │ ├── index.md │ │ └── part6.md │ ├── cloud │ │ ├── images │ │ │ ├── opp_docker.png │ │ │ └── screenshots │ │ │ │ ├── 00_console.png │ │ │ │ ├── 1010_queue.png │ │ │ │ ├── 10_region.png │ │ │ │ ├── 170_runtask.png │ │ │ │ ├── 180_doruntask.png │ │ │ │ ├── 20_select_ecs.png │ │ │ │ ├── 239_backtoecs.png │ │ │ │ ├── 330_nextstep.png │ │ │ │ ├── 340_nextstep.png │ │ │ │ ├── 350_nextstep.png │ │ │ │ ├── 80_openport.png │ │ │ │ ├── 1000_dashboard.png │ │ │ │ ├── 10_region.thumb.jpg │ │ │ │ ├── 110_clusterdone.png │ │ │ │ ├── 150_portmapping.png │ │ │ │ ├── 190_taskcreated.png │ │ │ │ ├── 200_taskpending.png │ │ │ │ ├── 210_taskrunning.png │ │ │ │ ├── 230_instanceip.png │ │ │ │ ├── 40_skipexamples.png │ │ │ │ ├── 60_clustername.png │ │ │ │ ├── 90_clickcreate.png │ │ │ │ ├── 00_console.thumb.jpg │ │ │ │ ├── 1010_queue.thumb.jpg │ │ │ │ ├── 120_createtaskdef.png │ │ │ │ ├── 140_containername.png │ │ │ │ ├── 160_createtaskdef.png │ │ │ │ ├── 170_runtask.thumb.jpg │ │ │ │ ├── 2010_scaletozero.png │ │ │ │ ├── 2020_deletecluster.png │ │ │ │ ├── 2030_reallydelete.png │ │ │ │ ├── 240_anothertaskdef.png │ │ │ │ ├── 250_addcontainer.png │ │ │ │ ├── 270_workercommand.png │ │ │ │ ├── 290_backtoclusters.png │ │ │ │ ├── 300_selectcluster.png │ │ │ │ ├── 310_createservice.png │ │ │ │ ├── 320_serviceconfig.png │ │ │ │ ├── 330_nextstep.thumb.jpg │ │ │ │ ├── 340_nextstep.thumb.jpg │ │ │ │ ├── 350_nextstep.thumb.jpg │ │ │ │ ├── 370_servicecreated.png │ │ │ │ ├── 50_createcluster.png │ │ │ │ ├── 70_instanceconfig.png │ │ │ │ ├── 80_openport.thumb.jpg │ │ │ │ ├── 00_billingdashboard.png │ │ │ │ ├── 1000_dashboard.thumb.jpg │ │ │ │ ├── 180_doruntask.thumb.jpg │ │ │ │ ├── 2000_scaleinstances.png │ │ │ │ ├── 20_select_ecs.thumb.jpg │ │ │ │ ├── 230_instanceip.thumb.jpg │ │ │ │ ├── 239_backtoecs.thumb.jpg │ │ │ │ ├── 260_workerimagename.png │ │ │ │ ├── 360_docreateservice.png │ │ │ │ ├── 60_clustername.thumb.jpg │ │ │ │ ├── 90_clickcreate.thumb.jpg │ │ │ │ ├── 110_clusterdone.thumb.jpg │ │ │ │ ├── 120_createtaskdef.thumb.jpg │ │ │ │ ├── 130_workertaskdefname.png │ │ │ │ ├── 140_containername.thumb.jpg │ │ │ │ ├── 150_portmapping.thumb.jpg │ │ │ │ ├── 160_createtaskdef.thumb.jpg │ │ │ │ ├── 190_taskcreated.thumb.jpg │ │ │ │ ├── 200_taskpending.thumb.jpg │ │ │ │ ├── 2010_scaletozero.thumb.jpg │ │ │ │ ├── 2030_reallydelete.thumb.jpg │ │ │ │ ├── 210_taskrunning.thumb.jpg │ │ │ │ ├── 220_containerinstance.png │ │ │ │ ├── 250_addcontainer.thumb.jpg │ │ │ │ ├── 270_workercommand.thumb.jpg │ │ │ │ ├── 280_createworkertaskdef.png │ │ │ │ ├── 300_selectcluster.thumb.jpg │ │ │ │ ├── 30_getting_started_ecs.png │ │ │ │ ├── 310_createservice.thumb.jpg │ │ │ │ ├── 320_serviceconfig.thumb.jpg │ │ │ │ ├── 380_servicetaskspending.png │ │ │ │ ├── 390_servicetasksrunning.png │ │ │ │ ├── 40_skipexamples.thumb.jpg │ │ │ │ ├── 50_createcluster.thumb.jpg │ │ │ │ ├── 70_instanceconfig.thumb.jpg │ │ │ │ ├── 00_billingdashboard.thumb.jpg │ │ │ │ ├── 100_clustercreateprogress.png │ │ │ │ ├── 2000_scaleinstances.thumb.jpg │ │ │ │ ├── 2020_deletecluster.thumb.jpg │ │ │ │ ├── 240_anothertaskdef.thumb.jpg │ │ │ │ ├── 260_workerimagename.thumb.jpg │ │ │ │ ├── 290_backtoclusters.thumb.jpg │ │ │ │ ├── 360_docreateservice.thumb.jpg │ │ │ │ ├── 370_servicecreated.thumb.jpg │ │ │ │ ├── 130_workertaskdefname.thumb.jpg │ │ │ │ ├── 220_containerinstance.thumb.jpg │ │ │ │ ├── 30_getting_started_ecs.thumb.jpg │ │ │ │ ├── 280_createworkertaskdef.thumb.jpg │ │ │ │ ├── 380_servicetaskspending.thumb.jpg │ │ │ │ ├── 390_servicetasksrunning.thumb.jpg │ │ │ │ ├── 100_clustercreateprogress.thumb.jpg │ │ │ │ └── generate_thumbnails.sh │ │ ├── code │ │ │ ├── simple_worker.py │ │ │ ├── Dockerfile-inet │ │ │ ├── Dockerfile-simple │ │ │ ├── opp_worker.py │ │ │ ├── worker.py │ │ │ ├── utils.py │ │ │ ├── Dockerfile-opp │ │ │ ├── docker-compose.yaml │ │ │ ├── Dockerfile │ │ │ ├── Dockerfile-mongo │ │ │ ├── worker_mongo.py │ │ │ ├── client.py │ │ │ └── client-mongo.py │ │ ├── index.md │ │ ├── page5.md │ │ └── page2.md │ ├── pandas │ │ ├── generate │ │ └── mkdocs-markdown.tpl │ └── swarm │ │ ├── code │ │ ├── Dockerfile-distcc-server │ │ ├── Dockerfile-inet-worker │ │ ├── docker-compose.yml │ │ └── docker-for-aws-policy.json │ │ └── index.md ├── 404.md ├── api │ └── index.md ├── javascripts │ ├── rainbow-dockerfile.js │ ├── rainbow-yaml.js │ ├── rainbow-ini.js │ ├── rainbow.linenumbers.min.js │ ├── rainbow-ned.js │ ├── rainbow-html.js │ └── quoting.js ├── index.md ├── stylesheets │ ├── omnetpp-docs.css │ ├── rainbow.linenumbers.theme.css │ ├── rainbow.css │ └── jupyter.css └── intro.md ├── .gitignore ├── mkdocs_build ├── mkdocs_deploy ├── mkdocs_serve ├── material ├── main.html ├── partials │ ├── nav.html │ └── footer.html └── showfile.html ├── README.md └── mkdocs.yml /docs/CNAME: -------------------------------------------------------------------------------- 1 | docs.omnetpp.org -------------------------------------------------------------------------------- /docs/showfile.md: -------------------------------------------------------------------------------- 1 | template: showfile.html 2 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/package.ned: -------------------------------------------------------------------------------- 1 | // this sample simulation is part of OMNeT++ 2 | @license(omnetpp); 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .qtenvrc 2 | .tkenvrc 3 | .tkenvlog 4 | .cmdenv-log 5 | **/results/* 6 | _site 7 | .jekyll-metadata 8 | -------------------------------------------------------------------------------- /docs/404.md: -------------------------------------------------------------------------------- 1 | The page you requested doesn't exist. Better luck next time! 2 | 3 | [Go back to the front page.](/index.md) 4 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/mean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/mean.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/run.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/debug.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/error.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/mean2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/mean2.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/mean3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/mean3.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step1.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step10.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step17.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step18.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step2a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step2a.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step2b.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step2c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step2c.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step3.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step6.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step8.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/opp_docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/opp_docker.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/applymean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/applymean.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/dataset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/dataset.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/eventlog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/eventlog.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/histogram.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/inieditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/inieditor.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/inspector.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/nededitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/nededitor.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/palette.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/relayout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/relayout.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/runconfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/runconfig.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/scalars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/scalars.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step13a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step13a.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step13b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step13b.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step13e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step13e.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step14a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step14a.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step14b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step14b.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step15a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step15a.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/step15b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/step15b.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/tictoc1_3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/tictoc1_3.gif -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/vectors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/vectors.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/vectors2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/vectors2.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/avghopcount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/avghopcount.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/newproject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/newproject.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/runconfig2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/runconfig2.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/select_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/select_plot.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/selectplot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/selectplot2.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/stacktrace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/stacktrace.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/statistics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/statistics.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/avgnumpackets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/avgnumpackets.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/debugnextevent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/debugnextevent.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/displaylegend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/displaylegend.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/editlinechart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/editlinechart.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/editlinechart2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/editlinechart2.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/hopcountchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/hopcountchart.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/launchdialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/launchdialog.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/numberofnodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/numberofnodes.png -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/open_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/open_details.png -------------------------------------------------------------------------------- /mkdocs_build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # docker pull squidfunk/mkdocs-material 4 | 5 | cd $(dirname $0) 6 | docker run --rm -it -v $(pwd):/docs squidfunk/mkdocs-material build 7 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/images/open_graphical_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/tictoc/images/open_graphical_view.png -------------------------------------------------------------------------------- /mkdocs_deploy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # docker pull squidfunk/mkdocs-material 4 | 5 | cd $(dirname $0) 6 | docker run --rm -it -v $(pwd):/docs squidfunk/mkdocs-material gh-deploy 7 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/00_console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/00_console.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/1010_queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/1010_queue.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/10_region.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/10_region.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/170_runtask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/170_runtask.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/180_doruntask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/180_doruntask.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/20_select_ecs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/20_select_ecs.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/239_backtoecs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/239_backtoecs.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/330_nextstep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/330_nextstep.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/340_nextstep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/340_nextstep.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/350_nextstep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/350_nextstep.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/80_openport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/80_openport.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/1000_dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/1000_dashboard.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/10_region.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/10_region.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/110_clusterdone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/110_clusterdone.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/150_portmapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/150_portmapping.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/190_taskcreated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/190_taskcreated.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/200_taskpending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/200_taskpending.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/210_taskrunning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/210_taskrunning.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/230_instanceip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/230_instanceip.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/40_skipexamples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/40_skipexamples.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/60_clustername.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/60_clustername.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/90_clickcreate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/90_clickcreate.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/00_console.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/00_console.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/1010_queue.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/1010_queue.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/120_createtaskdef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/120_createtaskdef.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/140_containername.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/140_containername.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/160_createtaskdef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/160_createtaskdef.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/170_runtask.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/170_runtask.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2010_scaletozero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2010_scaletozero.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2020_deletecluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2020_deletecluster.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2030_reallydelete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2030_reallydelete.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/240_anothertaskdef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/240_anothertaskdef.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/250_addcontainer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/250_addcontainer.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/270_workercommand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/270_workercommand.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/290_backtoclusters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/290_backtoclusters.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/300_selectcluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/300_selectcluster.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/310_createservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/310_createservice.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/320_serviceconfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/320_serviceconfig.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/330_nextstep.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/330_nextstep.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/340_nextstep.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/340_nextstep.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/350_nextstep.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/350_nextstep.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/370_servicecreated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/370_servicecreated.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/50_createcluster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/50_createcluster.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/70_instanceconfig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/70_instanceconfig.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/80_openport.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/80_openport.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/00_billingdashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/00_billingdashboard.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/1000_dashboard.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/1000_dashboard.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/180_doruntask.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/180_doruntask.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2000_scaleinstances.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2000_scaleinstances.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/20_select_ecs.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/20_select_ecs.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/230_instanceip.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/230_instanceip.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/239_backtoecs.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/239_backtoecs.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/260_workerimagename.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/260_workerimagename.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/360_docreateservice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/360_docreateservice.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/60_clustername.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/60_clustername.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/90_clickcreate.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/90_clickcreate.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/pandas/generate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install: pip3 install notedown 3 | notedown ResultAnalysisUsingPython.md --match fenced --run --render --template mkdocs-markdown.tpl > index.md 4 | 5 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/110_clusterdone.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/110_clusterdone.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/120_createtaskdef.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/120_createtaskdef.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/130_workertaskdefname.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/130_workertaskdefname.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/140_containername.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/140_containername.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/150_portmapping.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/150_portmapping.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/160_createtaskdef.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/160_createtaskdef.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/190_taskcreated.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/190_taskcreated.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/200_taskpending.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/200_taskpending.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2010_scaletozero.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2010_scaletozero.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2030_reallydelete.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2030_reallydelete.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/210_taskrunning.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/210_taskrunning.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/220_containerinstance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/220_containerinstance.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/250_addcontainer.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/250_addcontainer.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/270_workercommand.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/270_workercommand.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/280_createworkertaskdef.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/280_createworkertaskdef.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/300_selectcluster.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/300_selectcluster.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/30_getting_started_ecs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/30_getting_started_ecs.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/310_createservice.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/310_createservice.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/320_serviceconfig.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/320_serviceconfig.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/380_servicetaskspending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/380_servicetaskspending.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/390_servicetasksrunning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/390_servicetasksrunning.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/40_skipexamples.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/40_skipexamples.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/50_createcluster.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/50_createcluster.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/70_instanceconfig.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/70_instanceconfig.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/00_billingdashboard.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/00_billingdashboard.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/100_clustercreateprogress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/100_clustercreateprogress.png -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2000_scaleinstances.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2000_scaleinstances.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/2020_deletecluster.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/2020_deletecluster.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/240_anothertaskdef.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/240_anothertaskdef.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/260_workerimagename.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/260_workerimagename.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/290_backtoclusters.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/290_backtoclusters.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/360_docreateservice.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/360_docreateservice.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/370_servicecreated.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/370_servicecreated.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/130_workertaskdefname.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/130_workertaskdefname.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/220_containerinstance.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/220_containerinstance.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/30_getting_started_ecs.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/30_getting_started_ecs.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/280_createworkertaskdef.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/280_createworkertaskdef.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/380_servicetaskspending.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/380_servicetaskspending.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/390_servicetasksrunning.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/390_servicetasksrunning.thumb.jpg -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/100_clustercreateprogress.thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Transport-Protocol/omnetpp-tutorials/master/docs/tutorials/cloud/images/screenshots/100_clustercreateprogress.thumb.jpg -------------------------------------------------------------------------------- /docs/api/index.md: -------------------------------------------------------------------------------- 1 | # API Reference 2 | 3 | - [Simulator API](https://omnetpp.org/doc/omnetpp/api) 4 | - [Parallel Simulation API](https://omnetpp.org/doc/omnetpp/parsim-api) 5 | - [NEDXML API](https://omnetpp.org/doc/omnetpp/nedxml-api) 6 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/simple_worker.py: -------------------------------------------------------------------------------- 1 | import os, subprocess 2 | 3 | def greet(name): 4 | hostname = subprocess.check_output("hostname").decode("utf-8")[:-1] 5 | return "Hello, {}! I'm {}#{}.".format(name, hostname, os.getppid()) 6 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/Dockerfile-inet: -------------------------------------------------------------------------------- 1 | FROM oppworker 2 | 3 | RUN apt-get update && apt-get install git -y 4 | 5 | RUN git clone --recursive https://github.com/inet-framework/inet.git 6 | 7 | WORKDIR inet 8 | RUN make makefiles && make MODE=release 9 | WORKDIR /opt/ 10 | 11 | ENV PATH $PATH:/opt/inet/src/ 12 | -------------------------------------------------------------------------------- /mkdocs_serve: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # docker pull squidfunk/mkdocs-material 4 | 5 | cd $(dirname $0) 6 | docker run --rm -it -p 8000:8000 -v $(pwd):/docs squidfunk/mkdocs-material 7 | 8 | # docker run --rm -it -v $(pwd):/docs squidfunk/mkdocs-material build 9 | # docker run --rm -it -v $(pwd):/docs squidfunk/mkdocs-material gh-deploy 10 | -------------------------------------------------------------------------------- /docs/javascripts/rainbow-dockerfile.js: -------------------------------------------------------------------------------- 1 | Rainbow.extend('dockerfile', [ 2 | { 3 | matches: { 4 | 1: 'dockerfile-command', 5 | 2: 'dockerfile-command-head', 6 | 3: 'dockerfile-command-tail', 7 | }, 8 | pattern: /^([A-Z]+| +)(\s+[./a-z]\S+)?(.*)$/gm 9 | }, 10 | { 11 | name: 'comment', 12 | pattern: /\#[\s\S]*?$/gm 13 | }, 14 | ]); 15 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/images/screenshots/generate_thumbnails.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in *.png 4 | do 5 | # The images will be displayed at 160x90 size max, but the browser might be 6 | # zoomed on HiDPI displays and on mobile, so let's do 1.5x resolution. 7 | # This only increases the total size from 168k to 320k (at this moment), and is less ugly. 8 | convert $i -resize 240x135 ${i/.png/.thumb.jpg} 9 | done 10 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/TicToc18E.anf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc13.msg: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | message TicTocMsg13 12 | { 13 | int source; 14 | int destination; 15 | int hopCount = 0; 16 | } 17 | 18 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/Dockerfile-simple: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN apt-get update -y && apt-get install python3-minimal python3-pip -y 4 | 5 | RUN pip3 install --upgrade pip 6 | RUN pip3 install rq 7 | 8 | # This is necessary to make Click in rq happy. 9 | # see: http://click.pocoo.org/5/python3/#python-3-surrogate-handling 10 | ENV LC_ALL C.UTF-8 11 | ENV LANG C.UTF-8 12 | 13 | COPY simple_worker.py /opt/ 14 | WORKDIR /opt/ 15 | 16 | ENTRYPOINT ["rq", "worker"] 17 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/conclusion.md: -------------------------------------------------------------------------------- 1 | next_page_disabled: true 2 | 3 | # Closing words 4 | 5 | ## Congratulations! 6 | 7 | You have successfully completed this tutorial! You have gained a good overview 8 | and the basic skills to work with OMNeT++, from writing simulations to analyzing 9 | results. To go to the next level, we recommend you to read the *Simulation Manual* 10 | and skim through the *User Guide*. 11 | 12 | Comments and suggestions regarding this tutorial will be very much appreciated. -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc14.msg: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | // 13 | // Same as TicTocMsg13 14 | // 15 | message TicTocMsg14 16 | { 17 | int source; 18 | int destination; 19 | int hopCount = 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc15.msg: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | // 13 | // Same as TicTocMsg13 14 | // 15 | message TicTocMsg15 16 | { 17 | int source; 18 | int destination; 19 | int hopCount = 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc16.msg: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | // 13 | // Same as TicTocMsg13 14 | // 15 | message TicTocMsg16 16 | { 17 | int source; 18 | int destination; 19 | int hopCount = 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc17.msg: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | // 13 | // Same as TicTocMsg13 14 | // 15 | message TicTocMsg17 16 | { 17 | int source; 18 | int destination; 19 | int hopCount = 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc18.msg: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | // 13 | // Same as TicTocMsg13 14 | // 15 | message TicTocMsg18 16 | { 17 | int source; 18 | int destination; 19 | int hopCount = 0; 20 | } 21 | 22 | -------------------------------------------------------------------------------- /docs/javascripts/rainbow-yaml.js: -------------------------------------------------------------------------------- 1 | Rainbow.extend('yaml', [ 2 | { 3 | name: 'yaml', 4 | matches: { 5 | 1: { 6 | language: 'yaml' 7 | } 8 | }, 9 | pattern: /\$\(([\s\S]*?)\)/gm 10 | }, 11 | { 12 | name: 'string', 13 | pattern: /('|")[\s\S]*?\1/gm 14 | }, 15 | { 16 | name: 'literal', 17 | pattern: /true|false|yes|no|null/gm 18 | }, 19 | { 20 | name: 'attribute', 21 | pattern: /[ \\-]?([ '"]?)*[a-zA-Z_][\w\-]*\1:( |$)/gm 22 | }, 23 | ]); 24 | -------------------------------------------------------------------------------- /docs/tutorials/swarm/code/Dockerfile-distcc-server: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN apt-get update -y && apt-get install -y git autoconf libiberty-dev build-essential python3-minimal python3-dev 4 | 5 | WORKDIR /opt/ 6 | 7 | RUN git clone https://github.com/distcc/distcc.git 8 | 9 | WORKDIR distcc 10 | 11 | RUN ./autogen.sh && ./configure && make -j $(nproc) && make install 12 | 13 | WORKDIR /opt/ 14 | 15 | RUN useradd -ms /bin/bash distcc 16 | 17 | # need to launch from a shell to expand $(nproc) 18 | ENTRYPOINT ["/bin/bash", "-c", "distccd --allow 0.0.0.0/0 --listen 0.0.0.0 -j $(nproc) --no-detach --log-level debug --log-stderr --verbose"] 19 | -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | # OMNeT++ Tutorials 2 | 3 | - [TicToc](tutorials/tictoc/index.md). An introductory tutorial that guides you through building and working with 4 | an example simulation model. 5 | - [Result Analysis with Python](tutorials/pandas/index.md). This tutorial will walk you through the initial steps of 6 | using Python for analysing simulation results, and shows how to do some of the most common tasks. 7 | - [Running Simulation Campaigns in the Cloud](tutorials/cloud/index.md). Concepts, ideas and a solution draft 8 | for harnessing the power of computing clouds for running simulation campaigns. 9 | - [Running INET Simulation Campaigns on AWS](tutorials/swarm/index.md). Presents a minimal but powerful toolset 10 | for running INET simulations on Amazon's cloud platform. 11 | -------------------------------------------------------------------------------- /docs/javascripts/rainbow-ini.js: -------------------------------------------------------------------------------- 1 | Rainbow.extend('ini', [ 2 | { 3 | name: 'ini', 4 | matches: { 5 | 1: { 6 | language: 'ini' 7 | } 8 | }, 9 | pattern: /\$\(([\s\S]*?)\)/gm 10 | }, 11 | { 12 | matches: { 13 | 2: 'string' 14 | }, 15 | pattern: /(\(|\s|\[|\=)(('|")[\s\S]*?(\3))/gm 16 | }, 17 | { 18 | name: 'comment', 19 | pattern: /\#[\s\S]*?$/gm 20 | }, 21 | { 22 | name: 'config', 23 | pattern: /\[Config.*?\]/gm 24 | }, 25 | { 26 | name: 'config', 27 | pattern: /\[General\]/gm 28 | }, 29 | { 30 | matches: { 31 | 1: 'keyword' 32 | }, 33 | pattern: /\b(include)(?=\b)/g 34 | } 35 | ]); -------------------------------------------------------------------------------- /docs/stylesheets/omnetpp-docs.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | p.thumbnails { 4 | margin: 0; 5 | text-align: center; 6 | } 7 | 8 | img.thumbnail { 9 | cursor: zoom-in; 10 | 11 | max-width: 160px; 12 | max-height: 90px; 13 | 14 | display: inline; 15 | 16 | padding: 0; 17 | margin: 5px 5px; 18 | border-radius: 4px; 19 | border: 1px solid #dddddd; 20 | transition: border 2s ease-in-out; 21 | } 22 | 23 | div.fullscreenimgshade { 24 | cursor: zoom-out; 25 | position: fixed; 26 | left: 0; 27 | right: 0; 28 | top: 0; 29 | bottom: 0; 30 | z-index: 6969; 31 | background: rgba(0,0,0,.5); 32 | 33 | display: flex; 34 | align-items: center; 35 | justify-content: center; 36 | } 37 | 38 | img.fullscreenimg { 39 | width: auto; 40 | height: auto; 41 | max-width: 95%; 42 | max-height: 95%; 43 | border-radius: 4px; 44 | } 45 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc1.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | simple Txc1 13 | { 14 | gates: 15 | input in; 16 | output out; 17 | } 18 | 19 | // 20 | // Two instances (tic and toc) of Txc1 connected both ways. 21 | // Tic and toc will pass messages to one another. 22 | // 23 | network Tictoc1 24 | { 25 | submodules: 26 | tic: Txc1; 27 | toc: Txc1; 28 | connections: 29 | tic.out --> { delay = 100ms; } --> toc.in; 30 | tic.in <-- { delay = 100ms; } <-- toc.out; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /docs/stylesheets/rainbow.linenumbers.theme.css: -------------------------------------------------------------------------------- 1 | pre { 2 | padding: 0; 3 | font-family: 'Monaco', 'Source Code Pro', monospace; 4 | font-size: 1em; 5 | } 6 | code.rainbow { 7 | border-spacing: 0; 8 | border-collapse: collapse; 9 | background-color: transparent; 10 | box-shadow: none; 11 | } 12 | .rainbow .line:hover { 13 | background-color: #fbfaef; 14 | } 15 | .rainbow .line:hover .line-number { 16 | background-color: #ebedec; 17 | } 18 | .rainbow .line .line-number { 19 | text-align: right; 20 | background-color: #eeeeee; 21 | padding-left: 0.8em; 22 | padding-right: 0.8em; 23 | font-family: courier new; 24 | font-weight: bold; 25 | } 26 | .rainbow .line .line-number:before { 27 | content: attr(data-line-number); 28 | } 29 | .rainbow .line .line-code { 30 | padding-left: 1em; 31 | width: 100%; 32 | } 33 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/opp_worker.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import os 3 | import shutil 4 | import utils 5 | 6 | 7 | MODEL_DIR = "/tmp/model/" 8 | 9 | 10 | def run_simulation(source_zip, executable, arguments): 11 | 12 | # housekeeping 13 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 14 | os.makedirs(MODEL_DIR) 15 | os.chdir(MODEL_DIR) 16 | 17 | # unzip source_zip 18 | utils.unzip_bytes(source_zip) 19 | 20 | # run make, first clean just to be sure 21 | subprocess.call(["make", "clean"]) 22 | subprocess.call(["make", "MODE=release"]) 23 | 24 | # execute binary with args 25 | subprocess.call([executable] + arguments) 26 | 27 | # zip results 28 | results_zip = utils.zip_directory("results") 29 | 30 | # cleaning up 31 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 32 | 33 | # return zip 34 | return results_zip 35 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/worker.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import os 3 | import shutil 4 | import utils 5 | 6 | 7 | MODEL_DIR = "/tmp/model/" 8 | 9 | 10 | def run_simulation(source_zip, executable, arguments): 11 | 12 | # housekeeping 13 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 14 | os.makedirs(MODEL_DIR) 15 | os.chdir(MODEL_DIR) 16 | 17 | # unzip source_zip 18 | utils.unzip_bytes(source_zip) 19 | 20 | # run make, first clean just to be sure 21 | subprocess.call(["make", "clean"]) 22 | subprocess.call(["make", "MODE=release"]) 23 | 24 | # execute binary with args 25 | subprocess.call([executable] + arguments) 26 | 27 | # zip results 28 | results_zip = utils.zip_directory("results") 29 | 30 | # cleaning up 31 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 32 | 33 | # return zip 34 | return results_zip 35 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc6.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Txc6 12 | { 13 | parameters: 14 | @display("i=block/routing"); 15 | gates: 16 | input in; 17 | output out; 18 | } 19 | 20 | network Tictoc6 21 | { 22 | submodules: 23 | tic: Txc6 { 24 | parameters: 25 | @display("i=,cyan"); 26 | } 27 | toc: Txc6 { 28 | parameters: 29 | @display("i=,gold"); 30 | } 31 | connections: 32 | tic.out --> { delay = 100ms; } --> toc.in; 33 | tic.in <-- { delay = 100ms; } <-- toc.out; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc3.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Txc3 12 | { 13 | parameters: 14 | @display("i=block/routing"); 15 | gates: 16 | input in; 17 | output out; 18 | } 19 | 20 | // 21 | // Same as Tictoc2. 22 | // 23 | network Tictoc3 24 | { 25 | submodules: 26 | tic: Txc3 { 27 | parameters: 28 | @display("i=,cyan"); 29 | } 30 | toc: Txc3 { 31 | parameters: 32 | @display("i=,gold"); 33 | } 34 | connections: 35 | tic.out --> { delay = 100ms; } --> toc.in; 36 | tic.in <-- { delay = 100ms; } <-- toc.out; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc13.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | simple Txc13 11 | { 12 | parameters: 13 | @display("i=block/routing"); 14 | gates: 15 | inout gate[]; 16 | } 17 | 18 | network Tictoc13 19 | { 20 | types: 21 | channel Channel extends ned.DelayChannel { 22 | delay = 100ms; 23 | } 24 | submodules: 25 | tic[6]: Txc13; 26 | connections: 27 | tic[0].gate++ <--> Channel <--> tic[1].gate++; 28 | tic[1].gate++ <--> Channel <--> tic[2].gate++; 29 | tic[1].gate++ <--> Channel <--> tic[4].gate++; 30 | tic[3].gate++ <--> Channel <--> tic[4].gate++; 31 | tic[4].gate++ <--> Channel <--> tic[5].gate++; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc14.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | simple Txc14 11 | { 12 | parameters: 13 | @display("i=block/routing"); 14 | gates: 15 | inout gate[]; 16 | } 17 | 18 | network Tictoc14 19 | { 20 | types: 21 | channel Channel extends ned.DelayChannel { 22 | delay = 100ms; 23 | } 24 | submodules: 25 | tic[6]: Txc14; 26 | connections: 27 | tic[0].gate++ <--> Channel <--> tic[1].gate++; 28 | tic[1].gate++ <--> Channel <--> tic[2].gate++; 29 | tic[1].gate++ <--> Channel <--> tic[4].gate++; 30 | tic[3].gate++ <--> Channel <--> tic[4].gate++; 31 | tic[4].gate++ <--> Channel <--> tic[5].gate++; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc15.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | simple Txc15 11 | { 12 | parameters: 13 | @display("i=block/routing"); 14 | gates: 15 | inout gate[]; 16 | } 17 | 18 | network Tictoc15 19 | { 20 | types: 21 | channel Channel extends ned.DelayChannel { 22 | delay = 100ms; 23 | } 24 | submodules: 25 | tic[6]: Txc15; 26 | connections: 27 | tic[0].gate++ <--> Channel <--> tic[1].gate++; 28 | tic[1].gate++ <--> Channel <--> tic[2].gate++; 29 | tic[1].gate++ <--> Channel <--> tic[4].gate++; 30 | tic[3].gate++ <--> Channel <--> tic[4].gate++; 31 | tic[4].gate++ <--> Channel <--> tic[5].gate++; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc7.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Txc7 12 | { 13 | parameters: 14 | volatile double delayTime @unit(s); // delay before sending back message 15 | @display("i=block/routing"); 16 | gates: 17 | input in; 18 | output out; 19 | } 20 | 21 | network Tictoc7 22 | { 23 | submodules: 24 | tic: Txc7 { 25 | parameters: 26 | @display("i=,cyan"); 27 | } 28 | toc: Txc7 { 29 | parameters: 30 | @display("i=,gold"); 31 | } 32 | connections: 33 | tic.out --> { delay = 100ms; } --> toc.in; 34 | tic.in <-- { delay = 100ms; } <-- toc.out; 35 | } 36 | 37 | -------------------------------------------------------------------------------- /docs/stylesheets/rainbow.css: -------------------------------------------------------------------------------- 1 | 2 | .snippet { overflow-x: auto; } 3 | pre .comment { color:#998 } 4 | pre .config { color:#0086B3 } 5 | pre .tag, pre .tag-name { color:navy } 6 | pre .keyword, pre .css-property, pre .vendor-fix, pre .sass, pre .class, pre .id, pre .css-value, pre .entity.function, pre .storage.function { font-weight:bold } 7 | pre .css-property, pre .css-value,pre .vendor-fix, pre .support.namespace { color:#333 } 8 | pre .constant.numeric, pre .keyword.unit, pre .hex-color { font-weight:normal;color:#099 } 9 | pre .constant.symbol { color:#900; } 10 | pre .entity.class { color:#458 } 11 | pre .entity.id, pre .entity.function { color:#900 } 12 | pre .attribute, pre .variable { color:teal } 13 | pre .string, pre .support.value { font-weight:normal;color:#24970c } 14 | pre .regexp { color:#009926 } 15 | 16 | pre .dockerfile-command { color:#004693 } 17 | pre .dockerfile-command-head { color:#930020 } 18 | pre .dockerfile-command-tail { color:#446300 } 19 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/utils.py: -------------------------------------------------------------------------------- 1 | import io 2 | import zipfile 3 | import os 4 | 5 | 6 | class QuietBytes(bytes): 7 | def __str__(self): 8 | return str(len(self)) + " bytes" 9 | 10 | def __repr__(self): 11 | return str(len(self)) + " bytes" 12 | 13 | 14 | def unzip_bytes(zip_bytes): 15 | with io.BytesIO(zip_bytes) as bytestream: 16 | with zipfile.ZipFile(bytestream, "r") as zipf: 17 | 18 | zipf.extractall(".") 19 | 20 | 21 | def zip_directory(directory, exclude_dirs=[]): 22 | with io.BytesIO() as bytestream: 23 | with zipfile.ZipFile(bytestream, "w") as zipf: 24 | 25 | for root, dirs, files in os.walk(directory): 26 | dirs[:] = [d for d in dirs if d not in exclude_dirs] 27 | 28 | for f in files: 29 | zipf.write(os.path.join(root, f)) 30 | 31 | bytestream.seek(0) 32 | zipped = QuietBytes(bytestream.read()) 33 | 34 | return zipped 35 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/Dockerfile-opp: -------------------------------------------------------------------------------- 1 | FROM simpleworker 2 | 3 | RUN apt-get update -y && apt-get install build-essential bison flex libxml2-dev zlib1g-dev python-minimal wget -y 4 | 5 | RUN wget --progress=dot:giga https://bitbucket.org/torokati44/omnetpp-docker/raw/c3074bba928e3679210af817a4b3e9203f7af1a1/omnetpp-5.1.1-src-core.tgz 6 | RUN tar xf omnetpp-5.1.1-src-core.tgz && rm omnetpp-5.1.1-src-core.tgz 7 | 8 | ENV PATH /opt/omnetpp-5.1.1/bin:$PATH 9 | 10 | WORKDIR omnetpp-5.1.1 11 | RUN ./configure WITH_TKENV=no WITH_QTENV=no WITH_OSG=no WITH_OSGEARTH=no 12 | RUN make MODE=release 13 | WORKDIR /opt/ 14 | 15 | # These are here just to speed up recompiling the same model code. 16 | # In fact, they should be merged into the apt-get install and ENV 17 | # lines above to reduce image size, and avoid problems, but I think 18 | # it's clearer this way. 19 | RUN apt-get install ccache -y 20 | ENV PATH /usr/lib/ccache:$PATH 21 | 22 | COPY utils.py /opt/ 23 | COPY opp_worker.py /opt/ 24 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/index.md: -------------------------------------------------------------------------------- 1 | previous_page_disabled: true 2 | 3 | # Introduction 4 | 5 | This tutorial guides you through building and working 6 | with an example simulation model, showing you along the way some 7 | of the commonly used OMNeT++ features. 8 | 9 | The tutorial is based on the Tictoc example simulation, which you 10 | can find in the `samples/tictoc` directory of your 11 | OMNeT++ installation, so you can try out immediately how 12 | the examples work. However, you'll find the tutorial much more useful 13 | if you actually carry out the steps described here. 14 | We assume that you have a good C++ knowledge, and you are in general 15 | familiar with C/C++ development (editing source files, compiling, debugging etc.) 16 | To make the examples easier to follow, all source code in here is 17 | cross-linked to the OMNeT++ API documentation. 18 | 19 | This document and the TicToc model are an expanded version of 20 | the original TicToc tutorial from Ahmet Sekercioglu (Monash University). 21 | 22 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc8.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Tic8 12 | { 13 | parameters: 14 | @display("i=block/routing"); 15 | gates: 16 | input in; 17 | output out; 18 | } 19 | 20 | simple Toc8 21 | { 22 | parameters: 23 | @display("i=block/process"); 24 | gates: 25 | input in; 26 | output out; 27 | } 28 | 29 | network Tictoc8 30 | { 31 | submodules: 32 | tic: Tic8 { 33 | parameters: 34 | @display("i=,cyan"); 35 | } 36 | toc: Toc8 { 37 | parameters: 38 | @display("i=,gold"); 39 | } 40 | connections: 41 | tic.out --> { delay = 100ms; } --> toc.in; 42 | tic.in <-- { delay = 100ms; } <-- toc.out; 43 | } 44 | 45 | -------------------------------------------------------------------------------- /material/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block libs %} 3 | {{ super() }} 4 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc12.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Txc12 12 | { 13 | parameters: 14 | @display("i=block/routing"); 15 | gates: 16 | inout gate[]; // declare two way connections 17 | } 18 | 19 | // using two way connections to further simplify the network definition 20 | network Tictoc12 21 | { 22 | types: 23 | channel Channel extends ned.DelayChannel { 24 | delay = 100ms; 25 | } 26 | submodules: 27 | tic[6]: Txc12; 28 | connections: 29 | tic[0].gate++ <--> Channel <--> tic[1].gate++; 30 | tic[1].gate++ <--> Channel <--> tic[2].gate++; 31 | tic[1].gate++ <--> Channel <--> tic[4].gate++; 32 | tic[3].gate++ <--> Channel <--> tic[4].gate++; 33 | tic[4].gate++ <--> Channel <--> tic[5].gate++; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc9.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Tic9 12 | { 13 | parameters: 14 | @display("i=block/routing"); 15 | gates: 16 | input in; 17 | output out; 18 | } 19 | 20 | simple Toc9 21 | { 22 | parameters: 23 | @display("i=block/process"); 24 | gates: 25 | input in; 26 | output out; 27 | } 28 | 29 | // 30 | // Same as Tictoc8. 31 | // 32 | network Tictoc9 33 | { 34 | submodules: 35 | tic: Tic9 { 36 | parameters: 37 | @display("i=,cyan"); 38 | } 39 | toc: Toc9 { 40 | parameters: 41 | @display("i=,gold"); 42 | } 43 | connections: 44 | tic.out --> { delay = 100ms; } --> toc.in; 45 | tic.in <-- { delay = 100ms; } <-- toc.out; 46 | } 47 | 48 | -------------------------------------------------------------------------------- /material/partials/nav.html: -------------------------------------------------------------------------------- 1 | 31 | -------------------------------------------------------------------------------- /docs/javascripts/rainbow.linenumbers.min.js: -------------------------------------------------------------------------------- 1 | window.Rainbow&&(window.Rainbow.linenumbers=function(m){function k(a){if(a.nodeType===Node.TEXT_NODE){a=a.nodeValue.split("\n");for(var b=[],c=0;c Channel <--> tic[1].gate++; 32 | tic[1].gate++ <--> Channel <--> tic[2].gate++; 33 | tic[1].gate++ <--> Channel <--> tic[4].gate++; 34 | tic[3].gate++ <--> Channel <--> tic[4].gate++; 35 | tic[4].gate++ <--> Channel <--> tic[5].gate++; 36 | } 37 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc4.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Txc4 12 | { 13 | parameters: 14 | bool sendMsgOnInit = default(false); // whether the module should send out a message on initialization 15 | int limit = default(2); // another parameter with a default value 16 | @display("i=block/routing"); 17 | gates: 18 | input in; 19 | output out; 20 | } 21 | 22 | // 23 | // Adding module parameters. 24 | // 25 | network Tictoc4 26 | { 27 | submodules: 28 | tic: Txc4 { 29 | parameters: 30 | sendMsgOnInit = true; 31 | @display("i=,cyan"); 32 | } 33 | toc: Txc4 { 34 | parameters: 35 | sendMsgOnInit = false; 36 | @display("i=,gold"); 37 | } 38 | connections: 39 | tic.out --> { delay = 100ms; } --> toc.in; 40 | tic.in <-- { delay = 100ms; } <-- toc.out; 41 | } 42 | 43 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc18.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | simple Txc18 extends Txc16 11 | { 12 | } 13 | 14 | network TicToc18 15 | { 16 | parameters: 17 | int numCentralNodes = default(2); 18 | types: 19 | channel Channel extends ned.DelayChannel { 20 | delay = 100ms; 21 | } 22 | submodules: 23 | tic[numCentralNodes+4]: Txc18; 24 | connections: 25 | // connect the 2 nodes in one side to the central nodes 26 | tic[0].gate++ <--> Channel <--> tic[2].gate++; 27 | tic[1].gate++ <--> Channel <--> tic[2].gate++; 28 | // connect the central nodes together 29 | for i=2..numCentralNodes+1 { 30 | tic[i].gate++ <--> Channel <--> tic[i+1].gate++; 31 | } 32 | // connect the 2 nodes on the other side to the central nodes 33 | tic[numCentralNodes+2].gate++ <--> Channel <--> tic[numCentralNodes+1].gate++; 34 | tic[numCentralNodes+3].gate++ <--> Channel <--> tic[numCentralNodes+1].gate++; 35 | } 36 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc10.ned: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // This file is part of an OMNeT++/OMNEST simulation example. 4 | // 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | simple Txc10 13 | { 14 | parameters: 15 | @display("i=block/routing"); 16 | gates: 17 | input in[]; // declare in[] and out[] to be vector gates 18 | output out[]; 19 | } 20 | 21 | network Tictoc10 22 | { 23 | submodules: 24 | tic[6]: Txc10; 25 | connections: 26 | tic[0].out++ --> { delay = 100ms; } --> tic[1].in++; 27 | tic[0].in++ <-- { delay = 100ms; } <-- tic[1].out++; 28 | 29 | tic[1].out++ --> { delay = 100ms; } --> tic[2].in++; 30 | tic[1].in++ <-- { delay = 100ms; } <-- tic[2].out++; 31 | 32 | tic[1].out++ --> { delay = 100ms; } --> tic[4].in++; 33 | tic[1].in++ <-- { delay = 100ms; } <-- tic[4].out++; 34 | 35 | tic[3].out++ --> { delay = 100ms; } --> tic[4].in++; 36 | tic[3].in++ <-- { delay = 100ms; } <-- tic[4].out++; 37 | 38 | tic[4].out++ --> { delay = 100ms; } --> tic[5].in++; 39 | tic[4].in++ <-- { delay = 100ms; } <-- tic[5].out++; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | redis: 4 | image: redis 5 | ports: 6 | - "6379:6379" 7 | networks: 8 | interlink: 9 | deploy: 10 | placement: 11 | constraints: [node.role == manager] 12 | 13 | worker: 14 | image: username/simpleworker 15 | depends_on: 16 | - redis 17 | networks: 18 | - interlink 19 | deploy: 20 | placement: 21 | constraints: [node.role == worker] 22 | mode: replicated 23 | replicas: 1 24 | restart_policy: 25 | condition: on-failure 26 | delay: 10s 27 | max_attempts: 3 28 | window: 120s 29 | 30 | visualizer: 31 | image: dockersamples/visualizer:stable 32 | ports: 33 | - "8080:8080" 34 | volumes: 35 | - "/var/run/docker.sock:/var/run/docker.sock" 36 | deploy: 37 | placement: 38 | constraints: [node.role == manager] 39 | 40 | dashboard: 41 | image: godber/rq-dashboard 42 | depends_on: 43 | - redis 44 | networks: 45 | - interlink 46 | ports: 47 | - "9181:9181" 48 | depends_on: 49 | - redis-server 50 | command: rq-dashboard -u redis://redis 51 | deploy: 52 | placement: 53 | constraints: [node.role == manager] 54 | 55 | networks: 56 | interlink: 57 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc2.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | 12 | // 13 | // Here we make the model look a bit prettier in the GUI. We assign the 14 | // "block/routing" icon to the simple module. All submodules of type 15 | // Txc2 will use this icon by default 16 | // 17 | simple Txc2 18 | { 19 | parameters: 20 | @display("i=block/routing"); // add a default icon 21 | gates: 22 | input in; 23 | output out; 24 | } 25 | 26 | // 27 | // Make the two module look a bit different with colorization effect. 28 | // Use cyan for `tic', and yellow for `toc'. 29 | // 30 | network Tictoc2 31 | { 32 | submodules: 33 | tic: Txc2 { 34 | parameters: 35 | @display("i=,cyan"); // do not change the icon (first arg of i=) just colorize it 36 | } 37 | toc: Txc2 { 38 | parameters: 39 | @display("i=,gold"); // here too 40 | } 41 | connections: 42 | tic.out --> { delay = 100ms; } --> toc.in; 43 | tic.in <-- { delay = 100ms; } <-- toc.out; 44 | } 45 | 46 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc17.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga, Rudolf Hornig 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | simple Txc17 11 | { 12 | parameters: 13 | @signal[arrival](type="long"); 14 | @statistic[hopCount](title="hop count"; source="arrival"; record=vector,stats; interpolationmode=none); 15 | 16 | @display("i=block/routing"); 17 | gates: 18 | inout gate[]; 19 | } 20 | 21 | network Tictoc17 22 | { 23 | parameters: 24 | @figure[description](type=text; pos=5,20; font=,,bold; 25 | text="Random routing example - displaying last hop count"); 26 | @figure[lasthopcount](type=text; pos=5,35; text="last hopCount: N/A"); 27 | types: 28 | channel Channel extends ned.DelayChannel { 29 | delay = 100ms; 30 | } 31 | submodules: 32 | tic[6]: Txc17; 33 | connections: 34 | tic[0].gate++ <--> Channel <--> tic[1].gate++; 35 | tic[1].gate++ <--> Channel <--> tic[2].gate++; 36 | tic[1].gate++ <--> Channel <--> tic[4].gate++; 37 | tic[3].gate++ <--> Channel <--> tic[4].gate++; 38 | tic[4].gate++ <--> Channel <--> tic[5].gate++; 39 | } -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | 4 | RUN apt-get update -y && apt-get install -y python3-minimal python3-pip \ 5 | build-essential bison flex libxml2-dev zlib1g-dev python-minimal wget 6 | 7 | 8 | RUN pip3 install --upgrade pip && pip3 install rq 9 | 10 | # These are necessary to make Click in rq happy. 11 | # See: http://click.pocoo.org/5/python3/#python-3-surrogate-handling 12 | ENV LC_ALL C.UTF-8 13 | ENV LANG C.UTF-8 14 | 15 | 16 | COPY utils.py /opt/ 17 | COPY worker.py /opt/ 18 | 19 | 20 | WORKDIR /opt/ 21 | 22 | RUN wget https://omnetpp.org/omnetpp/send/30-omnet-releases/2312-omnetpp-5-1-1-core \ 23 | --referer=https://omnetpp.org/omnetpp -O omnetpp-5.1.1-src-core.tgz --progress=dot:giga 24 | RUN tar xf omnetpp-5.1.1-src-core.tgz && rm omnetpp-5.1.1-src-core.tgz 25 | 26 | 27 | ENV PATH /opt/omnetpp-5.1.1/bin:$PATH 28 | 29 | WORKDIR omnetpp-5.1.1 30 | RUN ./configure WITH_TKENV=no WITH_QTENV=no WITH_OSG=no WITH_OSGEARTH=no 31 | RUN make MODE=release -j $(nproc) 32 | WORKDIR /opt/ 33 | 34 | 35 | # These are here just to speed up recompiling the same model code. 36 | # In fact, they should be merged into the apt-get install and ENV 37 | # lines above to reduce image size, and avoid problems, but I think 38 | # it's clearer this way. 39 | RUN apt-get install ccache -y 40 | ENV PATH /usr/lib/ccache:$PATH 41 | 42 | 43 | ENTRYPOINT ["rq", "worker", "--results-ttl", "60"] 44 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc11.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | 11 | simple Txc11 12 | { 13 | parameters: 14 | @display("i=block/routing"); 15 | gates: 16 | input in[]; // declare in[] and out[] to be vector gates 17 | output out[]; 18 | } 19 | 20 | 21 | // 22 | // Using local channel type definition to reduce the redundancy 23 | // of connection definitions. 24 | // 25 | network Tictoc11 26 | { 27 | types: 28 | channel Channel extends ned.DelayChannel { 29 | delay = 100ms; 30 | } 31 | submodules: 32 | tic[6]: Txc11; 33 | connections: 34 | tic[0].out++ --> Channel --> tic[1].in++; 35 | tic[0].in++ <-- Channel <-- tic[1].out++; 36 | 37 | tic[1].out++ --> Channel --> tic[2].in++; 38 | tic[1].in++ <-- Channel <-- tic[2].out++; 39 | 40 | tic[1].out++ --> Channel --> tic[4].in++; 41 | tic[1].in++ <-- Channel <-- tic[4].out++; 42 | 43 | tic[3].out++ --> Channel --> tic[4].in++; 44 | tic[3].in++ <-- Channel <-- tic[4].out++; 45 | 46 | tic[4].out++ --> Channel --> tic[5].in++; 47 | tic[4].in++ <-- Channel <-- tic[5].out++; 48 | } 49 | 50 | -------------------------------------------------------------------------------- /docs/javascripts/rainbow-ned.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Shell patterns 3 | * 4 | * @author Matthew King 5 | * @author Craig Campbell 6 | */ 7 | Rainbow.extend('ned', [ 8 | /** 9 | * This handles the case where subshells contain quotes. 10 | * For example: `"$(resolve_link "$name" || true)"`. 11 | * 12 | * Caveat: This really should match balanced parentheses, but cannot. 13 | * @see http://stackoverflow.com/questions/133601/can-regular-expressions-be-used-to-match-nested-patterns 14 | */ 15 | { 16 | name: 'ned', 17 | matches: { 18 | 1: { 19 | language: 'ned' 20 | } 21 | }, 22 | pattern: /\$\(([\s\S]*?)\)/gm 23 | }, 24 | { 25 | matches: { 26 | 2: 'string' 27 | }, 28 | pattern: /(\(|\s|\[|\=)(('|")[\s\S]*?(\3))/gm 29 | }, 30 | { 31 | name: 'constant.symbol', 32 | pattern: /@[a-zA-Z0-9_]+/g 33 | }, 34 | { 35 | name: 'comment', 36 | pattern: /\/\/[\s\S]*?$/gm 37 | }, 38 | { 39 | matches: { 40 | 1: 'keyword' 41 | }, 42 | pattern: /\b(allowunconnected|bool|channel|channelinterface|connections|const|default|double|extends|false|for|gates|if|import|index|inout|input|int|like|module|moduleinterface|network|output|package|parameters|property|simple|sizeof|string|submodules|this|true|typename|types|volatile|xml|xmldoc)(?=\b)/g 43 | } 44 | ]); -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc2.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * In this class we add some debug messages to Txc1. When you run the 18 | * simulation in the OMNeT++ GUI Tkenv, the output will appear in 19 | * the main text window, and you can also open separate output windows 20 | * for `tic' and `toc'. 21 | */ 22 | class Txc2 : public cSimpleModule 23 | { 24 | protected: 25 | virtual void initialize() override; 26 | virtual void handleMessage(cMessage *msg) override; 27 | }; 28 | 29 | Define_Module(Txc2); 30 | 31 | void Txc2::initialize() 32 | { 33 | if (strcmp("tic", getName()) == 0) { 34 | // The `ev' object works like `cout' in C++. 35 | EV << "Sending initial message\n"; 36 | cMessage *msg = new cMessage("tictocMsg"); 37 | send(msg, "out"); 38 | } 39 | } 40 | 41 | void Txc2::handleMessage(cMessage *msg) 42 | { 43 | // msg->getName() is name of the msg object, here it will be "tictocMsg". 44 | EV << "Received message `" << msg->getName() << "', sending it out again\n"; 45 | send(msg, "out"); 46 | } 47 | 48 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/Dockerfile-mongo: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | 4 | RUN apt-get update -y && apt-get install -y python3-minimal python3-pip \ 5 | build-essential bison flex libxml2-dev zlib1g-dev python-minimal wget 6 | 7 | 8 | RUN pip3 install --upgrade pip && pip3 install rq 9 | 10 | # These are necessary to make Click in rq happy. 11 | # See: http://click.pocoo.org/5/python3/#python-3-surrogate-handling 12 | ENV LC_ALL C.UTF-8 13 | ENV LANG C.UTF-8 14 | 15 | 16 | COPY utils.py /opt/ 17 | COPY worker.py /opt/ 18 | 19 | 20 | WORKDIR /opt/ 21 | 22 | RUN wget https://omnetpp.org/omnetpp/send/30-omnet-releases/2312-omnetpp-5-1-1-core \ 23 | --referer=https://omnetpp.org/omnetpp -O omnetpp-5.1.1-src-core.tgz --progress=dot:giga 24 | RUN tar xf omnetpp-5.1.1-src-core.tgz && rm omnetpp-5.1.1-src-core.tgz 25 | 26 | 27 | ENV PATH /opt/omnetpp-5.1.1/bin:$PATH 28 | 29 | WORKDIR omnetpp-5.1.1 30 | RUN ./configure WITH_TKENV=no WITH_QTENV=no WITH_OSG=no WITH_OSGEARTH=no 31 | RUN make MODE=release -j $(nproc) 32 | WORKDIR /opt/ 33 | 34 | 35 | # These are here just to speed up recompiling the same model code. 36 | # In fact, they should be merged into the apt-get install and ENV 37 | # lines above to reduce image size, and avoid problems, but I think 38 | # it's clearer this way. 39 | RUN apt-get install ccache -y 40 | ENV PATH /usr/lib/ccache:$PATH 41 | 42 | 43 | COPY worker_mongo.py /opt/ 44 | RUN pip3 install pymongo 45 | 46 | 47 | ENTRYPOINT ["rq", "worker", "--results-ttl", "60"] 48 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc5.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * Same as Txc4. 18 | */ 19 | class Txc5 : public cSimpleModule 20 | { 21 | private: 22 | int counter; 23 | 24 | protected: 25 | virtual void initialize() override; 26 | virtual void handleMessage(cMessage *msg) override; 27 | }; 28 | 29 | Define_Module(Txc5); 30 | 31 | void Txc5::initialize() 32 | { 33 | // Initialize the counter with the "limit" module parameter, declared 34 | // in the NED file (tictoc4.ned). 35 | counter = par("limit"); 36 | 37 | // we no longer depend on the name of the module to decide 38 | // whether to send an initial message 39 | if (par("sendMsgOnInit").boolValue() == true) { 40 | EV << "Sending initial message\n"; 41 | cMessage *msg = new cMessage("tictocMsg"); 42 | send(msg, "out"); 43 | } 44 | } 45 | 46 | void Txc5::handleMessage(cMessage *msg) 47 | { 48 | counter--; 49 | if (counter == 0) { 50 | EV << getName() << "'s counter reached zero, deleting message\n"; 51 | delete msg; 52 | } 53 | else { 54 | EV << getName() << "'s counter is " << counter << ", sending back message\n"; 55 | send(msg, "out"); 56 | } 57 | } 58 | 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | About OMNeT++ Tutorials 2 | ======================= 3 | 4 | This repository contains a GitHub Pages based web site that contains tutorials 5 | for OMNeT++. The site is made available online at https://tutorials.omnetpp.org. 6 | 7 | Web pages in the repo are in Markdown format (.md). One way to view 8 | them in the browser is to install a Markdown plugin into the browser; 9 | there are such plugins both for Chrome and for Firefox. Another way 10 | is to run the Jekyll-based GitHub Pages infrastructure on your local 11 | system, and connect to it from your browser -- this is the recommended 12 | way if you'd like to contribute. 13 | 14 | To install a local GitHub Pages development environment: 15 | 16 | First, make sure you have a working Docker environment. If you are 17 | on Ubuntu, DO NOT INSTALL Docker from the default repository, as it 18 | is out of date. Rather, follow the instructions on docker.com, 19 | https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ 20 | 21 | Then, add yourself into the docker group. That will allow you to run 22 | docker commands without sudo. (Replace YOU with your login name.) 23 | Note that you may need to log out and log in again for the changes 24 | to take effect. 25 | 26 | $ sudo usermod -a -G docker YOU 27 | 28 | Then, pull the preconfigured GitHub Pages docker image: 29 | 30 | $ docker pull madduci/docker-github-pages 31 | 32 | Then run the jekyll server with the following command: 33 | 34 | $ ./start_local_server 35 | 36 | Open your browser on http://localhost:4000/ 37 | 38 | In case of problems, contact us. 39 | 40 | -- 41 | Andras Varga 42 | 43 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/omnetpp.ini: -------------------------------------------------------------------------------- 1 | # This file is shared by all tictoc simulations. 2 | # Lines beginning with `#' are comments 3 | 4 | [General] 5 | # nothing here 6 | 7 | [Config Tictoc1] 8 | network = Tictoc1 9 | 10 | [Config Tictoc2] 11 | network = Tictoc2 12 | 13 | [Config Tictoc3] 14 | network = Tictoc3 15 | 16 | [Config Tictoc4] 17 | network = Tictoc4 18 | Tictoc4.toc.limit = 5 19 | 20 | [Config Tictoc5] 21 | network = Tictoc5 22 | **.limit = 5 23 | 24 | [Config Tictoc6] 25 | network = Tictoc6 26 | 27 | [Config Tictoc7] 28 | network = Tictoc7 29 | # argument to exponential() is the mean; truncnormal() returns values from 30 | # the normal distribution truncated to nonnegative values 31 | Tictoc7.tic.delayTime = exponential(3s) 32 | Tictoc7.toc.delayTime = truncnormal(3s,1s) 33 | 34 | [Config Tictoc8] 35 | network = Tictoc8 36 | 37 | [Config Tictoc9] 38 | network = Tictoc9 39 | 40 | [Config Tictoc10] 41 | network = Tictoc10 42 | 43 | [Config Tictoc11] 44 | network = Tictoc11 45 | 46 | [Config Tictoc12] 47 | network = Tictoc12 48 | 49 | [Config Tictoc13] 50 | network = Tictoc13 51 | 52 | [Config Tictoc14] 53 | network = Tictoc14 54 | 55 | [Config Tictoc15] 56 | network = Tictoc15 57 | record-eventlog = true 58 | 59 | [Config Tictoc16] 60 | network = Tictoc16 61 | **.tic[1].hopCount.result-recording-modes = +histogram 62 | **.tic[0..2].hopCount.result-recording-modes = -vector 63 | 64 | [Config Tictoc17] 65 | network = Tictoc17 66 | 67 | [Config TicToc18] 68 | network = TicToc18 69 | sim-time-limit = 250000s 70 | **.tic[*].hopCount.result-recording-modes = +vector 71 | *.numCentralNodes = ${N=2..100 step 2} 72 | repeat = 4 73 | 74 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc4.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * In this step you'll learn how to add input parameters to the simulation: 18 | * we'll turn the "magic number" 10 into a parameter. 19 | */ 20 | class Txc4 : public cSimpleModule 21 | { 22 | private: 23 | int counter; 24 | 25 | protected: 26 | virtual void initialize() override; 27 | virtual void handleMessage(cMessage *msg) override; 28 | }; 29 | 30 | Define_Module(Txc4); 31 | 32 | void Txc4::initialize() 33 | { 34 | // Initialize the counter with the "limit" module parameter, declared 35 | // in the NED file (tictoc4.ned). 36 | counter = par("limit"); 37 | 38 | // we no longer depend on the name of the module to decide 39 | // whether to send an initial message 40 | if (par("sendMsgOnInit").boolValue() == true) { 41 | EV << "Sending initial message\n"; 42 | cMessage *msg = new cMessage("tictocMsg"); 43 | send(msg, "out"); 44 | } 45 | } 46 | 47 | void Txc4::handleMessage(cMessage *msg) 48 | { 49 | counter--; 50 | if (counter == 0) { 51 | EV << getName() << "'s counter reached zero, deleting message\n"; 52 | delete msg; 53 | } 54 | else { 55 | EV << getName() << "'s counter is " << counter << ", sending back message\n"; 56 | send(msg, "out"); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/worker_mongo.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import os 3 | import shutil 4 | import rq 5 | 6 | import pymongo 7 | import gridfs 8 | 9 | import utils 10 | 11 | 12 | MODEL_DIR = "/tmp/model/" 13 | 14 | def build_model(mongo_host, source_id): 15 | client = pymongo.MongoClient(mongo_host) 16 | gfs = gridfs.GridFS(client.opp) 17 | 18 | source_zip = gfs.get(source_id).read() 19 | 20 | # housekeeping 21 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 22 | os.makedirs(MODEL_DIR) 23 | os.chdir(MODEL_DIR) 24 | 25 | # unzip source_zip 26 | utils.unzip_bytes(source_zip) 27 | 28 | # run make, first clean just to be sure 29 | subprocess.call(["make", "clean"]) 30 | subprocess.call(["make", "MODE=release"]) 31 | 32 | # zip built model 33 | binary_zip = utils.zip_directory(".") 34 | 35 | # cleaning up 36 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 37 | 38 | job_id = rq.get_current_job().get_id() 39 | 40 | gfs.put(binary_zip, _id=job_id) 41 | 42 | def run_simulation(mongo_host, binary_id, executable, arguments): 43 | client = pymongo.MongoClient(mongo_host) 44 | gfs = gridfs.GridFS(client.opp) 45 | 46 | binary_zip = gfs.get(binary_id).read() 47 | 48 | # housekeeping 49 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 50 | os.makedirs(MODEL_DIR) 51 | os.chdir(MODEL_DIR) 52 | 53 | # unzip binary_zip 54 | utils.unzip_bytes(binary_zip) 55 | 56 | subprocess.call(["chmod", "+x", executable]) # eh 57 | 58 | # execute binary with args 59 | subprocess.call([executable] + arguments) 60 | 61 | # zip results 62 | results_zip = utils.zip_directory("results") 63 | 64 | # cleaning up 65 | shutil.rmtree(MODEL_DIR, ignore_errors=True) 66 | 67 | job_id = rq.get_current_job().get_id() 68 | 69 | gfs.put(results_zip, _id=job_id) 70 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/tictoc5.ned: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | // 11 | // Same as Txc4. This module will be the base of the Tic and Toc types. 12 | // 13 | simple Txc5 14 | { 15 | parameters: 16 | bool sendMsgOnInit = default(false); 17 | int limit = default(2); 18 | @display("i=block/routing"); 19 | gates: 20 | input in; 21 | output out; 22 | } 23 | 24 | // 25 | // Specialize the module by defining parameters. We could have left the whole body 26 | // empty, because the default value of the sendMsgOnInit parameter is false anyway. 27 | // Note that the limit parameter is still unbound here. 28 | // 29 | simple Tic5 extends Txc5 30 | { 31 | parameters: 32 | @display("i=,cyan"); 33 | sendMsgOnInit = true; // Tic modules should send a message on init 34 | } 35 | 36 | // 37 | // Specialize the module by defining parameters. We could have left the whole body 38 | // empty, because the default value of the sendMsgOnInit parameter is false anyway. 39 | // Note that the limit parameter is still unbound here. 40 | // 41 | simple Toc5 extends Txc5 42 | { 43 | parameters: 44 | @display("i=,gold"); 45 | sendMsgOnInit = false; // Toc modules should NOT send a message on init 46 | } 47 | 48 | // 49 | // Adding module parameters. 50 | // 51 | network Tictoc5 52 | { 53 | submodules: 54 | tic: Tic5; // the limit parameter is still unbound here. We will get it from the ini file 55 | toc: Toc5; 56 | connections: 57 | tic.out --> { delay = 100ms; } --> toc.in; 58 | tic.in <-- { delay = 100ms; } <-- toc.out; 59 | } 60 | 61 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/Tictoc18.anf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /material/showfile.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | {% block libs %} 3 | {{ super() }} 4 | 34 | {% endblock %} 35 | 36 | {% block content %} 37 |

Source File Loading...

38 |
Loading...
39 | {% endblock %} -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc1.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * Derive the Txc1 class from cSimpleModule. In the Tictoc1 network, 18 | * both the `tic' and `toc' modules are Txc1 objects, created by OMNeT++ 19 | * at the beginning of the simulation. 20 | */ 21 | class Txc1 : public cSimpleModule 22 | { 23 | protected: 24 | // The following redefined virtual function holds the algorithm. 25 | virtual void initialize() override; 26 | virtual void handleMessage(cMessage *msg) override; 27 | }; 28 | 29 | // The module class needs to be registered with OMNeT++ 30 | Define_Module(Txc1); 31 | 32 | void Txc1::initialize() 33 | { 34 | // Initialize is called at the beginning of the simulation. 35 | // To bootstrap the tic-toc-tic-toc process, one of the modules needs 36 | // to send the first message. Let this be `tic'. 37 | 38 | // Am I Tic or Toc? 39 | if (strcmp("tic", getName()) == 0) { 40 | // create and send first message on gate "out". "tictocMsg" is an 41 | // arbitrary string which will be the name of the message object. 42 | cMessage *msg = new cMessage("tictocMsg"); 43 | send(msg, "out"); 44 | } 45 | } 46 | 47 | void Txc1::handleMessage(cMessage *msg) 48 | { 49 | // The handleMessage() method is called whenever a message arrives 50 | // at the module. Here, we just send it to the other module, through 51 | // gate `out'. Because both `tic' and `toc' does the same, the message 52 | // will bounce between the two. 53 | send(msg, "out"); // send out the message 54 | } 55 | 56 | -------------------------------------------------------------------------------- /docs/intro.md: -------------------------------------------------------------------------------- 1 | previous_page_disabled: true 2 | next_page_disabled: true 3 | 4 | # What is OMNeT++? 5 | 6 | OMNeT++ is an extensible, modular, component-based C++ simulation library and framework, primarily for building network simulators. "Network" is meant in a broader sense that includes wired and wireless communication networks, on-chip networks, queueing networks, and so on. Domain-specific functionality such as support for sensor networks, wireless ad-hoc networks, Internet protocols, performance modeling, photonic networks, etc., is provided by model frameworks, developed as independent projects. OMNeT++ offers an Eclipse-based IDE, a graphical runtime environment, and a host of other tools. There are extensions for real-time simulation, network emulation, database integration, SystemC integration, and several other functions. 7 | 8 | Although OMNeT++ is not a network simulator itself, it has gained widespread popularity as a network simulation platform in the scientific community as well as in industrial settings, and building up a large user community. 9 | 10 | OMNeT++ provides a component architecture for models. Components (modules) are programmed in C++, then assembled into larger components and models using a high-level language (NED). Reusability of models comes for free. OMNeT++ has extensive GUI support, and due to its modular architecture, the simulation kernel (and models) can be embedded easily into your applications. 11 | 12 | ## Components 13 | 14 | - simulation kernel library 15 | - NED topology description language 16 | - OMNeT++ IDE based on the Eclipse platform 17 | - GUI for simulation execution, links into simulation executable (Qtenv) 18 | - command-line user interface for simulation execution (Cmdenv) 19 | - utilities (makefile creation tool, etc.) 20 | - documentation, sample simulations, etc. 21 | 22 | ## Platforms 23 | 24 | - OMNeT++ runs on Windows, Linux, macOS, and other Unix-like systems. 25 | - The OMNeT++ IDE requires 64-bit Windows, Linux, or macOS. 26 | -------------------------------------------------------------------------------- /docs/tutorials/pandas/mkdocs-markdown.tpl: -------------------------------------------------------------------------------- 1 | previous_page_disabled: true 2 | next_page_disabled: true 3 | 4 | {% extends 'display_priority.tpl' %} 5 | 6 | 7 | {% block in_prompt %} 8 |
In[{{ cell.execution_count }}]:
9 | {% endblock in_prompt %} 10 | 11 | {% block output_prompt %} 12 |
Out[{{ cell.execution_count }}]:
13 | {%- endblock output_prompt %} 14 | 15 | {% block input %} 16 | ```python 17 | {{ cell.source}} 18 | ``` 19 | {% endblock input %} 20 | 21 | {% block outputs %} 22 | {{ super () }} 23 | {% endblock outputs %} 24 | 25 | {% block error %} 26 | {{ super() }} 27 | {% endblock error %} 28 | 29 | {% block traceback_line %} 30 | {{ line | indent | strip_ansi }} 31 | {% endblock traceback_line %} 32 | 33 | {% block execute_result %} 34 | 35 | {% block data_priority scoped %} 36 | {{ super() }} 37 | {% endblock %} 38 | {% endblock execute_result %} 39 | 40 | {% block stream %} 41 | {{ output.text | indent }} 42 | {% endblock stream %} 43 | 44 | {% block data_svg %} 45 | ![svg]({{ output.metadata.filenames['image/svg+xml'] | path2url }}) 46 | {% endblock data_svg %} 47 | 48 | {% block data_png %} 49 | ![png]({{ output.data | data2uri(data_type='png') }}) 50 | {% endblock data_png %} 51 | 52 | {% block data_jpg %} 53 | ![jpeg]({{ output.metadata.filenames['image/jpeg'] | path2url }}) 54 | {% endblock data_jpg %} 55 | 56 | {% block data_latex %} 57 | {{ output.data['text/latex'] }} 58 | {% endblock data_latex %} 59 | 60 | {% block data_html scoped %} 61 |
62 | {{ output.data['text/html'] }} 63 |
64 | {% endblock data_html %} 65 | 66 | {% block data_markdown scoped %} 67 | {{ output.data['text/markdown'] }} 68 | {% endblock data_markdown %} 69 | 70 | {% block data_text scoped %} 71 | {{ output.data['text/plain'] | indent }} 72 | {% endblock data_text %} 73 | 74 | {% block markdowncell scoped %} 75 | {{ cell.source }} 76 | {% endblock markdowncell %} 77 | 78 | {% block unknowncell scoped %} 79 | unknown type {{ cell.type }} 80 | {% endblock unknowncell %} 81 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc10.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace omnetpp; 16 | 17 | /** 18 | * Let's make it more interesting by using several (n) `tic' modules, 19 | * and connecting every module to every other. For now, let's keep it 20 | * simple what they do: module 0 generates a message, and the others 21 | * keep tossing it around in random directions until it arrives at 22 | * module 3. 23 | */ 24 | class Txc10 : public cSimpleModule 25 | { 26 | protected: 27 | virtual void forwardMessage(cMessage *msg); 28 | virtual void initialize() override; 29 | virtual void handleMessage(cMessage *msg) override; 30 | }; 31 | 32 | Define_Module(Txc10); 33 | 34 | void Txc10::initialize() 35 | { 36 | if (getIndex() == 0) { 37 | // Boot the process scheduling the initial message as a self-message. 38 | char msgname[20]; 39 | sprintf(msgname, "tic-%d", getIndex()); 40 | cMessage *msg = new cMessage(msgname); 41 | scheduleAt(0.0, msg); 42 | } 43 | } 44 | 45 | void Txc10::handleMessage(cMessage *msg) 46 | { 47 | if (getIndex() == 3) { 48 | // Message arrived. 49 | EV << "Message " << msg << " arrived.\n"; 50 | delete msg; 51 | } 52 | else { 53 | // We need to forward the message. 54 | forwardMessage(msg); 55 | } 56 | } 57 | 58 | void Txc10::forwardMessage(cMessage *msg) 59 | { 60 | // In this example, we just pick a random gate to send it on. 61 | // We draw a random number between 0 and the size of gate `out[]'. 62 | int n = gateSize("out"); 63 | int k = intuniform(0, n-1); 64 | 65 | EV << "Forwarding message " << msg << " on port out[" << k << "]\n"; 66 | send(msg, "out", k); 67 | } 68 | 69 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc11.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace omnetpp; 16 | 17 | /** 18 | * Let's make it more interesting by using several (n) `tic' modules, 19 | * and connecting every module to every other. For now, let's keep it 20 | * simple what they do: module 0 generates a message, and the others 21 | * keep tossing it around in random directions until it arrives at 22 | * module 2. 23 | */ 24 | class Txc11 : public cSimpleModule 25 | { 26 | protected: 27 | virtual void forwardMessage(cMessage *msg); 28 | virtual void initialize() override; 29 | virtual void handleMessage(cMessage *msg) override; 30 | }; 31 | 32 | Define_Module(Txc11); 33 | 34 | void Txc11::initialize() 35 | { 36 | if (getIndex() == 0) { 37 | // Boot the process scheduling the initial message as a self-message. 38 | char msgname[20]; 39 | sprintf(msgname, "tic-%d", getIndex()); 40 | cMessage *msg = new cMessage(msgname); 41 | scheduleAt(0.0, msg); 42 | } 43 | } 44 | 45 | void Txc11::handleMessage(cMessage *msg) 46 | { 47 | if (getIndex() == 3) { 48 | // Message arrived. 49 | EV << "Message " << msg << " arrived.\n"; 50 | delete msg; 51 | } 52 | else { 53 | // We need to forward the message. 54 | forwardMessage(msg); 55 | } 56 | } 57 | 58 | void Txc11::forwardMessage(cMessage *msg) 59 | { 60 | // In this example, we just pick a random gate to send it on. 61 | // We draw a random number between 0 and the size of gate `out[]'. 62 | int n = gateSize("out"); 63 | int k = intuniform(0, n-1); 64 | 65 | EV << "Forwarding message " << msg << " on port out[" << k << "]\n"; 66 | send(msg, "out", k); 67 | } 68 | 69 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc3.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * In this class we add a counter, and delete the message after ten exchanges. 18 | */ 19 | class Txc3 : public cSimpleModule 20 | { 21 | private: 22 | int counter; // Note the counter here 23 | 24 | protected: 25 | virtual void initialize() override; 26 | virtual void handleMessage(cMessage *msg) override; 27 | }; 28 | 29 | Define_Module(Txc3); 30 | 31 | void Txc3::initialize() 32 | { 33 | // Initialize counter to ten. We'll decrement it every time and delete 34 | // the message when it reaches zero. 35 | counter = 10; 36 | 37 | // The WATCH() statement below will let you examine the variable under 38 | // Tkenv. After doing a few steps in the simulation, double-click either 39 | // `tic' or `toc', select the Contents tab in the dialog that pops up, 40 | // and you'll find "counter" in the list. 41 | WATCH(counter); 42 | 43 | if (strcmp("tic", getName()) == 0) { 44 | EV << "Sending initial message\n"; 45 | cMessage *msg = new cMessage("tictocMsg"); 46 | send(msg, "out"); 47 | } 48 | } 49 | 50 | void Txc3::handleMessage(cMessage *msg) 51 | { 52 | // Increment counter and check value. 53 | counter--; 54 | if (counter == 0) { 55 | // If counter is zero, delete message. If you run the model, you'll 56 | // find that the simulation will stop at this point with the message 57 | // "no more events". 58 | EV << getName() << "'s counter reached zero, deleting message\n"; 59 | delete msg; 60 | } 61 | else { 62 | EV << getName() << "'s counter is " << counter << ", sending back message\n"; 63 | send(msg, "out"); 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /docs/tutorials/swarm/code/Dockerfile-inet-worker: -------------------------------------------------------------------------------- 1 | FROM torokati44/distcc-server:latest 2 | 3 | RUN apt-get update -y && apt-get install -y python3-minimal python3-pip \ 4 | build-essential bison flex libxml2-dev zlib1g-dev python-minimal wget git 5 | 6 | RUN pip3 install --upgrade pip && pip3 install rq 7 | 8 | # These are necessary to make Click in rq happy. 9 | # See: http://click.pocoo.org/5/python3/#python-3-surrogate-handling 10 | ENV LC_ALL C.UTF-8 11 | ENV LANG C.UTF-8 12 | 13 | WORKDIR /opt/ 14 | 15 | RUN wget https://omnetpp.org/omnetpp/send/30-omnet-releases/2319-omnetpp-5-2-core \ 16 | --referer=https://omnetpp.org/omnetpp -O omnetpp-5.2-src-core.tgz --progress=dot:giga \ 17 | && tar xf omnetpp-5.2-src-core.tgz && rm omnetpp-5.2-src-core.tgz 18 | 19 | # cloning inet here, so we can apply the patch needed for INET 4.0 (which is in the integration branch) 20 | RUN git clone --recursive --branch integration https://github.com/inet-framework/inet.git /opt/projects/inet-framework/inet/ 21 | WORKDIR /opt/projects/inet-framework/inet/ 22 | 23 | # needed for git so we can switch branches and stuff... 24 | RUN git config --global user.email "anon@example.com" && git config --global user.name "Anonymous" 25 | 26 | # creating a new branch just so we don't mess up the integration reference 27 | RUN git checkout -b local/work 28 | 29 | WORKDIR /opt/omnetpp-5.2 30 | 31 | # applying the patch required for INET 4 32 | RUN patch -p1 -i /opt/projects/inet-framework/inet/misc/patch/inet-4.0-omnetpp-5.1_or_5.2.patch 33 | 34 | ENV PATH /opt/omnetpp-5.2/bin:$PATH 35 | 36 | # removing -march=native -mtune=native from cflags 37 | RUN echo "CFLAGS_RELEASE='-O3 -DNDEBUG=1'" >> configure.user 38 | 39 | RUN ./configure WITH_TKENV=no WITH_QTENV=no WITH_OSG=no WITH_OSGEARTH=no 40 | RUN make MODE=release -j $(nproc) 41 | 42 | 43 | RUN apt-get install ccache -y 44 | ENV PATH /usr/lib/ccache:$PATH 45 | 46 | # enabling distcc 47 | ENV CCACHE_PREFIX distcc 48 | 49 | # putting ccache on the host 50 | ENV CCACHE_DIR /host-cache/inet-ccache 51 | 52 | WORKDIR /opt/ 53 | 54 | RUN pip3 install pymongo flock 55 | 56 | COPY inet_worker.py /opt/ 57 | 58 | ENTRYPOINT ["nice", "rq", "worker"] 59 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc12.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace omnetpp; 16 | 17 | /** 18 | * Let's make it more interesting by using several (n) `tic' modules, 19 | * and connecting every module to every other. For now, let's keep it 20 | * simple what they do: module 0 generates a message, and the others 21 | * keep tossing it around in random directions until it arrives at 22 | * module 2. 23 | */ 24 | class Txc12 : public cSimpleModule 25 | { 26 | protected: 27 | virtual void forwardMessage(cMessage *msg); 28 | virtual void initialize() override; 29 | virtual void handleMessage(cMessage *msg) override; 30 | }; 31 | 32 | Define_Module(Txc12); 33 | 34 | void Txc12::initialize() 35 | { 36 | if (getIndex() == 0) { 37 | // Boot the process scheduling the initial message as a self-message. 38 | char msgname[20]; 39 | sprintf(msgname, "tic-%d", getIndex()); 40 | cMessage *msg = new cMessage(msgname); 41 | scheduleAt(0.0, msg); 42 | } 43 | } 44 | 45 | void Txc12::handleMessage(cMessage *msg) 46 | { 47 | if (getIndex() == 3) { 48 | // Message arrived. 49 | EV << "Message " << msg << " arrived.\n"; 50 | delete msg; 51 | } 52 | else { 53 | // We need to forward the message. 54 | forwardMessage(msg); 55 | } 56 | } 57 | 58 | void Txc12::forwardMessage(cMessage *msg) 59 | { 60 | // In this example, we just pick a random gate to send it on. 61 | // We draw a random number between 0 and the size of gate `gate[]'. 62 | int n = gateSize("gate"); 63 | int k = intuniform(0, n-1); 64 | 65 | EV << "Forwarding message " << msg << " on gate[" << k << "]\n"; 66 | // $o and $i suffix is used to identify the input/output part of a two way gate 67 | send(msg, "gate$o", k); 68 | } 69 | 70 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/index.md: -------------------------------------------------------------------------------- 1 | previous_page_disabled: true 2 | 3 | # Introduction 4 | 5 | The goal of the tutorial is to give you an insight on how to start harnessing 6 | the power of computing clouds for running simulation campaigns in order to 7 | reduce the time it takes for them to complete. We will focus on using Amazon's 8 | AWS, but the process can be easily ported to other cloud service providers. 9 | 10 | ## Motivation 11 | 12 | Simulation is a CPU-intensive task. A simulation campaign may easily consist of 13 | hundreds or thousands of simulation runs, and can easily exceed the capacity of 14 | computing resources usually available to the researcher. 15 | 16 | Nowadays, CPU power is available in abundance in the cloud for anyone, at very 17 | affordable prices. There are numerous cloud computing services (Amazon AWS, 18 | Microsoft Azure, DigitalOcean, Google Cloud Platform, etc.). These services, 19 | following an easy registration, allow the user to run their own code on a high 20 | number of CPUs, at a surprisingly low price. For example, one hour of usage of 21 | an 8-core CPU with 32 GiB RAM costs about $0.50 on AWS at the time of writing. 22 | There is also a free trial, which grants the user one year of CPU time for free. 23 | 24 | Simulation campaigns are often trivially parallelizable. Given enough CPUs, the 25 | whole campaign may complete in the time it takes for the longest run to finish. 26 | In this tutorial, we show you how to harness the power of computing clouds to 27 | dramatically speed up your simulation campaigns. The gain will not only save you 28 | time, but it may also allow you to expand the scope or increase the depth of 29 | your research, and come to new discoveries. 30 | 31 | ## Structure of this Tutorial 32 | 33 | In the first part of this tutorial we will explain the basics of cloud services, 34 | get you familiar with the concepts of the most commonly used container 35 | technology, Docker, and introduce job queues. 36 | 37 | In the second part, we present a concrete solution that allows you to upload 38 | and execute simulations in AWS. The process should be regarded as a starting 39 | point which illustrates the concept, and can serve as a base for future, more 40 | sophisticated solutions. 41 | -------------------------------------------------------------------------------- /docs/tutorials/swarm/index.md: -------------------------------------------------------------------------------- 1 | previous_page_disabled: true 2 | 3 | ## Introduction 4 | 5 | 6 | This tutorial will show you how to utilize AWS, Amazon's cloud computing service, 7 | for running INET simulation campaigns. Following registration and minimal configuration 8 | on the AWS management interface, you'll be able to use a command-line tool 9 | for running simulations on AWS much like you'd run simulations locally. Our tool 10 | transparently takes care of submitting the simulation jobs to AWS, orchestrates 11 | their execution, and downloads the result files into the same local `results/` 12 | folder where the locally running simulation would create them. 13 | 14 | Your simulation project needs to be published on GitHub, because AWS cloud 15 | nodes retrieve the source code of the simulation by checking it out from GitHub. 16 | The tool currently has some hardcoded assumptions about the project, so it only 17 | works with INET and INET forks. Work is underway to make the tool generic 18 | enough to run any simulation. 19 | 20 | Running the simulation on a cloud service incurs some overhead (retrieving the source of the 21 | simulation on cloud nodes, building it, distributing the binaries to all processors, 22 | and finally downloading the results to your own computer), so your simulation campaign 23 | needs to be large enough to benefit from cloud computing: it needs to consist of 24 | several simulation runs, and each run should be longer than at least a couple seconds 25 | (real time). 26 | 27 | Although AWS offers a Free Tier for trial purposes, the requirements for running 28 | INET simulations unfortunately exceeds the resource constraints of the Free Tier. 29 | However, AWS usage is very affordable (expect prices of around 1 USD for one hour of uptime), 30 | so it is still well worth it if you have simulation campaigns that take too 31 | long to complete on your locally available computing resources. 32 | (We are not affiliated with Amazon.) 33 | 34 | This solution utilizes Docker Swarm, and a couple of other services and technologies. 35 | In addition to scripts that manage the tasks closely associated with running simulations 36 | remotely, we also provide a command-line tool to make the management of the Swarm on AWS 37 | easier. 38 | 39 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc7.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * In this step we'll introduce random numbers. We change the delay from 1s 18 | * to a random value which can be set from the NED file or from omnetpp.ini. 19 | * In addition, we'll "lose" (delete) the packet with a small probability. 20 | */ 21 | class Txc7 : public cSimpleModule 22 | { 23 | private: 24 | cMessage *event; 25 | cMessage *tictocMsg; 26 | 27 | public: 28 | Txc7(); 29 | virtual ~Txc7(); 30 | 31 | protected: 32 | virtual void initialize() override; 33 | virtual void handleMessage(cMessage *msg) override; 34 | }; 35 | 36 | Define_Module(Txc7); 37 | 38 | Txc7::Txc7() 39 | { 40 | event = tictocMsg = nullptr; 41 | } 42 | 43 | Txc7::~Txc7() 44 | { 45 | cancelAndDelete(event); 46 | delete tictocMsg; 47 | } 48 | 49 | void Txc7::initialize() 50 | { 51 | event = new cMessage("event"); 52 | tictocMsg = nullptr; 53 | 54 | if (strcmp("tic", getName()) == 0) { 55 | EV << "Scheduling first send to t=5.0s\n"; 56 | scheduleAt(5.0, event); 57 | tictocMsg = new cMessage("tictocMsg"); 58 | } 59 | } 60 | 61 | void Txc7::handleMessage(cMessage *msg) 62 | { 63 | if (msg == event) { 64 | EV << "Wait period is over, sending back message\n"; 65 | send(tictocMsg, "out"); 66 | tictocMsg = nullptr; 67 | } 68 | else { 69 | // "Lose" the message with 0.1 probability: 70 | if (uniform(0, 1) < 0.1) { 71 | EV << "\"Losing\" message\n"; 72 | delete msg; 73 | } 74 | else { 75 | // The "delayTime" module parameter can be set to values like 76 | // "exponential(5)" (tictoc7.ned, omnetpp.ini), and then here 77 | // we'll get a different delay every time. 78 | simtime_t delay = par("delayTime"); 79 | 80 | EV << "Message arrived, starting to wait " << delay << " secs...\n"; 81 | tictocMsg = msg; 82 | scheduleAt(simTime()+delay, event); 83 | } 84 | } 85 | } 86 | 87 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/client.py: -------------------------------------------------------------------------------- 1 | import time 2 | import argparse 3 | import subprocess 4 | import re 5 | 6 | from rq import Queue 7 | from redis import Redis 8 | 9 | import utils 10 | import worker 11 | 12 | def get_runs_from_filter(configuration, runfilter): 13 | runs = [] 14 | 15 | output = subprocess.check_output(["opp_run", "-q", "runnumbers", 16 | "-c", configuration, "-r", runfilter]).decode("utf-8") 17 | match = re.search(r"Run numbers: ([\d ]+)", output) 18 | runs = match.group(1).split() 19 | 20 | return runs 21 | 22 | 23 | parser = argparse.ArgumentParser() 24 | 25 | parser.add_argument('executable', type=str, help='the Simulation program') 26 | parser.add_argument('-c', metavar='configuration', dest='configuration', 27 | type=str, required=True, help='the Configuration to run') 28 | parser.add_argument('-r', metavar='runfilter', dest='runfilter', type=str, 29 | required=False, default='', help='the Run Filter selecting the runs') 30 | parser.add_argument('--redis-host', metavar='addr', dest='redis_host', 31 | type=str, required=False, default="localhost", 32 | help="""the address of the Redis server to use 33 | (default: localhost)""") 34 | 35 | args = parser.parse_args() 36 | 37 | 38 | print("Connecting to Redis at '" + args.redis_host + "'...") 39 | 40 | redis_conn = Redis(host=args.redis_host) # Tell RQ what Redis connection to use 41 | q = Queue(connection=redis_conn) # no args implies the default queue 42 | 43 | runs = get_runs_from_filter(args.configuration, args.runfilter) 44 | print("Matched runs: " + ", ".join(runs)) 45 | 46 | model_source_zip = utils.zip_directory(".", exclude_dirs=["results", "frames", "out"]) 47 | print("Size of sources: " + str(len(model_source_zip)) + "B") 48 | 49 | jobs = [] 50 | 51 | print("Enqueueing " + str(len(runs)) + " jobs...") 52 | for r in runs: 53 | j = q.enqueue(worker.run_simulation, model_source_zip, 54 | args.executable, ["-c", args.configuration, "-r", r]) 55 | j.meta['runnumber'] = r 56 | j.save_meta() 57 | jobs.append(j) 58 | 59 | print("Waiting for results...") 60 | 61 | while jobs: 62 | for j in jobs[:]: 63 | result = j.result 64 | if result is not None: 65 | print("Job for Run #" + j.meta["runnumber"] + " finished!") 66 | print("Size of results: " + str(len(result))) 67 | utils.unzip_bytes(result) 68 | jobs.remove(j) 69 | 70 | time.sleep(0.1) 71 | 72 | print("All done, bye!") 73 | -------------------------------------------------------------------------------- /material/partials/footer.html: -------------------------------------------------------------------------------- 1 | {% import "partials/language.html" as lang with context %} 2 | 59 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc17.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "tictoc17_m.h" 5 | 6 | using namespace omnetpp; 7 | 8 | class Txc17 : public cSimpleModule 9 | { 10 | private: 11 | simsignal_t arrivalSignal; 12 | 13 | protected: 14 | virtual TicTocMsg17 *generateMessage(); 15 | virtual void forwardMessage(TicTocMsg17 *msg); 16 | virtual void initialize() override; 17 | virtual void handleMessage(cMessage *msg) override; 18 | }; 19 | 20 | Define_Module(Txc17); 21 | 22 | void Txc17::initialize() 23 | { 24 | arrivalSignal = registerSignal("arrival"); 25 | // Module 0 sends the first message 26 | if (getIndex() == 0) { 27 | // Boot the process scheduling the initial message as a self-message. 28 | TicTocMsg17 *msg = generateMessage(); 29 | scheduleAt(0.0, msg); 30 | } 31 | } 32 | 33 | void Txc17::handleMessage(cMessage *msg) 34 | { 35 | TicTocMsg17 *ttmsg = check_and_cast(msg); 36 | 37 | if (ttmsg->getDestination() == getIndex()) { 38 | // Message arrived 39 | int hopcount = ttmsg->getHopCount(); 40 | // send a signal 41 | emit(arrivalSignal, hopcount); 42 | 43 | if (hasGUI()) { 44 | char label[50]; 45 | // Write last hop count to string 46 | sprintf(label, "last hopCount = %d", hopcount); 47 | // Get pointer to figure 48 | cCanvas *canvas = getParentModule()->getCanvas(); 49 | cTextFigure *textFigure = check_and_cast(canvas->getFigure("lasthopcount")); 50 | // Update figure text 51 | textFigure->setText(label); 52 | } 53 | 54 | EV << "Message " << ttmsg << " arrived after " << hopcount << " hops.\n"; 55 | bubble("ARRIVED, starting new one!"); 56 | 57 | delete ttmsg; 58 | 59 | // Generate another one. 60 | EV << "Generating another message: "; 61 | TicTocMsg17 *newmsg = generateMessage(); 62 | EV << newmsg << endl; 63 | forwardMessage(newmsg); 64 | } 65 | else { 66 | // We need to forward the message. 67 | forwardMessage(ttmsg); 68 | } 69 | } 70 | 71 | TicTocMsg17 *Txc17::generateMessage() 72 | { 73 | // Produce source and destination addresses. 74 | int src = getIndex(); 75 | int n = getVectorSize(); 76 | int dest = intuniform(0, n-2); 77 | if (dest >= src) 78 | dest++; 79 | 80 | char msgname[20]; 81 | sprintf(msgname, "tic-%d-to-%d", src, dest); 82 | 83 | // Create message object and set source and destination field. 84 | TicTocMsg17 *msg = new TicTocMsg17(msgname); 85 | msg->setSource(src); 86 | msg->setDestination(dest); 87 | return msg; 88 | } 89 | 90 | void Txc17::forwardMessage(TicTocMsg17 *msg) 91 | { 92 | // Increment hop count. 93 | msg->setHopCount(msg->getHopCount()+1); 94 | 95 | // Same routing as before: random gate. 96 | int n = gateSize("gate"); 97 | int k = intuniform(0, n-1); 98 | 99 | EV << "Forwarding message " << msg << " on gate[" << k << "]\n"; 100 | send(msg, "gate$o", k); 101 | } 102 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/code/client-mongo.py: -------------------------------------------------------------------------------- 1 | import time 2 | import argparse 3 | import subprocess 4 | import re 5 | 6 | from rq import Queue 7 | from redis import Redis 8 | 9 | import utils 10 | import worker_mongo 11 | 12 | import pymongo 13 | import gridfs 14 | 15 | def get_runs_from_filter(configuration, runfilter): 16 | runs = [] 17 | 18 | output = subprocess.check_output(["opp_run", "-q", "runnumbers", 19 | "-c", configuration, "-r", runfilter]).decode("utf-8") 20 | match = re.search(r"Run numbers: ([\d ]+)", output) 21 | runs = match.group(1).split() 22 | 23 | return runs 24 | 25 | 26 | parser = argparse.ArgumentParser() 27 | 28 | parser.add_argument('executable', type=str, help='the Simulation program') 29 | parser.add_argument('-c', metavar='configuration', dest='configuration', 30 | type=str, required=True, help='the Configuration to run') 31 | parser.add_argument('-r', metavar='runfilter', dest='runfilter', type=str, 32 | required=False, default='', help='the Run Filter selecting the runs') 33 | parser.add_argument('--redis-host', metavar='addr', dest='redis_host', 34 | type=str, required=False, default="localhost", 35 | help="""the address of the Redis server to use 36 | (default: localhost)""") 37 | parser.add_argument('--mongo-host', metavar='addr', dest='mongo_host', 38 | type=str, required=False, default="localhost", 39 | help="""the address of the MongoDB server to use 40 | (default: localhost)""") 41 | 42 | args = parser.parse_args() 43 | 44 | 45 | print("Connecting to Redis at '" + args.redis_host + "'...") 46 | 47 | redis_conn = Redis(host=args.redis_host) # Tell RQ what Redis connection to use 48 | q = Queue(connection=redis_conn) # no args implies the default queue 49 | 50 | gfs = gridfs.GridFS(pymongo.MongoClient(args.mongo_host).opp) 51 | 52 | runs = get_runs_from_filter(args.configuration, args.runfilter) 53 | print("Matched runs: " + ", ".join(runs)) 54 | 55 | model_source_zip = utils.zip_directory(".", exclude_dirs=["results", "frames", "out"]) 56 | print("Size of sources: " + str(len(model_source_zip)) + "B") 57 | 58 | try: 59 | gfs.delete("model_source") # eh 60 | except: 61 | pass 62 | 63 | gfs.put(model_source_zip, _id="model_source") 64 | 65 | build_job = q.enqueue(worker_mongo.build_model, args.mongo_host, "model_source") 66 | 67 | jobs = [] 68 | 69 | print("Enqueueing " + str(len(runs)) + " jobs...") 70 | for r in runs: 71 | j = q.enqueue(worker_mongo.run_simulation, args.mongo_host, build_job.get_id(), 72 | args.executable, ["-c", args.configuration, "-r", r], depends_on=build_job) 73 | j.meta['runnumber'] = r 74 | j.save_meta() 75 | jobs.append(j) 76 | 77 | print("Waiting for results...") 78 | 79 | while jobs: 80 | for j in jobs[:]: 81 | if j.is_finished: 82 | print("Job for Run #" + j.meta["runnumber"] + " finished!") 83 | result = gfs.get(j.get_id()).read() 84 | #print("Size of results: " + str(len(result))) 85 | utils.unzip_bytes(result) 86 | jobs.remove(j) 87 | 88 | time.sleep(0.1) 89 | 90 | print("All done, bye!") 91 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc8.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * Let us take a step back, and remove random delaying from the code. 18 | * We'll leave in, however, losing the packet with a small probability. 19 | * And, we'll we do something very common in telecommunication networks: 20 | * if the packet doesn't arrive within a certain period, we'll assume it 21 | * was lost and create another one. The timeout will be handled using 22 | * (what else?) a self-message. 23 | */ 24 | class Tic8 : public cSimpleModule 25 | { 26 | private: 27 | simtime_t timeout; // timeout 28 | cMessage *timeoutEvent; // holds pointer to the timeout self-message 29 | 30 | public: 31 | Tic8(); 32 | virtual ~Tic8(); 33 | 34 | protected: 35 | virtual void initialize() override; 36 | virtual void handleMessage(cMessage *msg) override; 37 | }; 38 | 39 | Define_Module(Tic8); 40 | 41 | Tic8::Tic8() 42 | { 43 | timeoutEvent = nullptr; 44 | } 45 | 46 | Tic8::~Tic8() 47 | { 48 | cancelAndDelete(timeoutEvent); 49 | } 50 | 51 | void Tic8::initialize() 52 | { 53 | // Initialize variables. 54 | timeout = 1.0; 55 | timeoutEvent = new cMessage("timeoutEvent"); 56 | 57 | // Generate and send initial message. 58 | EV << "Sending initial message\n"; 59 | cMessage *msg = new cMessage("tictocMsg"); 60 | send(msg, "out"); 61 | scheduleAt(simTime()+timeout, timeoutEvent); 62 | } 63 | 64 | void Tic8::handleMessage(cMessage *msg) 65 | { 66 | if (msg == timeoutEvent) { 67 | // If we receive the timeout event, that means the packet hasn't 68 | // arrived in time and we have to re-send it. 69 | EV << "Timeout expired, resending message and restarting timer\n"; 70 | cMessage *newMsg = new cMessage("tictocMsg"); 71 | send(newMsg, "out"); 72 | scheduleAt(simTime()+timeout, timeoutEvent); 73 | } 74 | else { // message arrived 75 | // Acknowledgement received -- delete the received message and cancel 76 | // the timeout event. 77 | EV << "Timer cancelled.\n"; 78 | cancelEvent(timeoutEvent); 79 | delete msg; 80 | 81 | // Ready to send another one. 82 | cMessage *newMsg = new cMessage("tictocMsg"); 83 | send(newMsg, "out"); 84 | scheduleAt(simTime()+timeout, timeoutEvent); 85 | } 86 | } 87 | 88 | /** 89 | * Sends back an acknowledgement -- or not. 90 | */ 91 | class Toc8 : public cSimpleModule 92 | { 93 | protected: 94 | virtual void handleMessage(cMessage *msg) override; 95 | }; 96 | 97 | Define_Module(Toc8); 98 | 99 | void Toc8::handleMessage(cMessage *msg) 100 | { 101 | if (uniform(0, 1) < 0.1) { 102 | EV << "\"Losing\" message.\n"; 103 | bubble("message lost"); // making animation more informative... 104 | delete msg; 105 | } 106 | else { 107 | EV << "Sending back same message as acknowledgement.\n"; 108 | send(msg, "out"); 109 | } 110 | } 111 | 112 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc14.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | #include "tictoc14_m.h" 15 | 16 | using namespace omnetpp; 17 | 18 | /** 19 | * In this step we keep track of how many messages we send and received, 20 | * and display it above the icon. 21 | */ 22 | class Txc14 : public cSimpleModule 23 | { 24 | private: 25 | long numSent; 26 | long numReceived; 27 | 28 | protected: 29 | virtual TicTocMsg14 *generateMessage(); 30 | virtual void forwardMessage(TicTocMsg14 *msg); 31 | virtual void refreshDisplay() const override; 32 | 33 | virtual void initialize() override; 34 | virtual void handleMessage(cMessage *msg) override; 35 | }; 36 | 37 | Define_Module(Txc14); 38 | 39 | void Txc14::initialize() 40 | { 41 | // Initialize variables 42 | numSent = 0; 43 | numReceived = 0; 44 | WATCH(numSent); 45 | WATCH(numReceived); 46 | 47 | // Module 0 sends the first message 48 | if (getIndex() == 0) { 49 | // Boot the process scheduling the initial message as a self-message. 50 | TicTocMsg14 *msg = generateMessage(); 51 | numSent++; 52 | scheduleAt(0.0, msg); 53 | } 54 | } 55 | 56 | void Txc14::handleMessage(cMessage *msg) 57 | { 58 | TicTocMsg14 *ttmsg = check_and_cast(msg); 59 | 60 | if (ttmsg->getDestination() == getIndex()) { 61 | // Message arrived 62 | int hopcount = ttmsg->getHopCount(); 63 | EV << "Message " << ttmsg << " arrived after " << hopcount << " hops.\n"; 64 | numReceived++; 65 | delete ttmsg; 66 | bubble("ARRIVED, starting new one!"); 67 | 68 | // Generate another one. 69 | EV << "Generating another message: "; 70 | TicTocMsg14 *newmsg = generateMessage(); 71 | EV << newmsg << endl; 72 | forwardMessage(newmsg); 73 | numSent++; 74 | } 75 | else { 76 | // We need to forward the message. 77 | forwardMessage(ttmsg); 78 | } 79 | } 80 | 81 | TicTocMsg14 *Txc14::generateMessage() 82 | { 83 | // Produce source and destination addresses. 84 | int src = getIndex(); // our module index 85 | int n = getVectorSize(); // module vector size 86 | int dest = intuniform(0, n-2); 87 | if (dest >= src) 88 | dest++; 89 | 90 | char msgname[20]; 91 | sprintf(msgname, "tic-%d-to-%d", src, dest); 92 | 93 | // Create message object and set source and destination field. 94 | TicTocMsg14 *msg = new TicTocMsg14(msgname); 95 | msg->setSource(src); 96 | msg->setDestination(dest); 97 | return msg; 98 | } 99 | 100 | void Txc14::forwardMessage(TicTocMsg14 *msg) 101 | { 102 | // Increment hop count. 103 | msg->setHopCount(msg->getHopCount()+1); 104 | 105 | // Same routing as before: random gate. 106 | int n = gateSize("gate"); 107 | int k = intuniform(0, n-1); 108 | 109 | EV << "Forwarding message " << msg << " on gate[" << k << "]\n"; 110 | send(msg, "gate$o", k); 111 | } 112 | 113 | void Txc14::refreshDisplay() const 114 | { 115 | char buf[40]; 116 | sprintf(buf, "rcvd: %ld sent: %ld", numReceived, numSent); 117 | getDisplayString().setTagArg("t", 0, buf); 118 | } 119 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | # Project information 2 | site_name: OMNeT++ Tutorials 3 | site_description: Docmentation for the OMNeT++ Simulator 4 | site_author: OMNeT++ Team 5 | site_url: https://docs.omnetpp.org/ 6 | 7 | # Repository 8 | repo_name: omnetpp/omnetpp-docs 9 | repo_url: https://github.com/omnetpp/omnetpp-docs 10 | 11 | # Copyright 12 | copyright: 'Copyright © 2017 OpenSim Ltd.' 13 | 14 | theme: material 15 | # Theme directory 16 | theme_dir: material 17 | 18 | extra_css: 19 | - 'stylesheets/omnetpp-docs.css' 20 | - 'stylesheets/rainbow.css' 21 | - 'stylesheets/rainbow.linenumbers.theme.css' 22 | - 'stylesheets/jupyter.css' 23 | 24 | extra_javascript: 25 | - 'javascripts/jquery-3.2.1.min.js' 26 | - 'javascripts/quoting.js' 27 | - 'javascripts/rainbow-custom.min.js' 28 | - 'javascripts/rainbow.linenumbers.min.js' 29 | - 'javascripts/rainbow-ini.js' 30 | - 'javascripts/rainbow-ned.js' 31 | - 'javascripts/rainbow-yaml.js' 32 | - 'javascripts/rainbow-dockerfile.js' 33 | - 'javascripts/rainbow-html.js' 34 | 35 | # Options 36 | extra: 37 | feature: 38 | tabs: false 39 | palette: 40 | primary: indigo 41 | accent: indigo 42 | social: 43 | - type: globe 44 | link: http://omnetpp.org 45 | - type: github-alt 46 | link: https://github.com/omnetpp/omnetpp-docs 47 | - type: twitter 48 | link: https://twitter.com/omnetpp 49 | 50 | # Extensions 51 | markdown_extensions: 52 | - markdown.extensions.admonition 53 | - markdown.extensions.codehilite(guess_lang=true) 54 | - markdown.extensions.attr_list 55 | - markdown.extensions.def_list 56 | - markdown.extensions.footnotes 57 | - markdown.extensions.meta 58 | - markdown.extensions.toc(permalink=true) 59 | - pymdownx.arithmatex 60 | - pymdownx.betterem(smart_enable=all) 61 | - pymdownx.caret 62 | - pymdownx.critic 63 | - pymdownx.details 64 | - pymdownx.emoji: 65 | emoji_generator: !!python/name:pymdownx.emoji.to_svg 66 | - pymdownx.inlinehilite 67 | - pymdownx.magiclink 68 | - pymdownx.mark 69 | - pymdownx.smartsymbols 70 | - pymdownx.superfences 71 | - pymdownx.tasklist(custom_checkbox=true) 72 | - pymdownx.tilde 73 | 74 | # Page tree 75 | pages: 76 | - Overview: index.md 77 | - Learn OMNeT++ with TicToc: 78 | - Introduction: tutorials/tictoc/index.md 79 | - Getting Started: tutorials/tictoc/part1.md 80 | - Running the Simulation: tutorials/tictoc/part2.md 81 | - Enhancing the 2-node TicToc: tutorials/tictoc/part3.md 82 | - Turning it Into a Real Network: tutorials/tictoc/part4.md 83 | - Adding Statistics Collection: tutorials/tictoc/part5.md 84 | - Visualizing the Results: tutorials/tictoc/part6.md 85 | - Parameter Studies: tutorials/tictoc/part7.md 86 | - Closing words: tutorials/tictoc/conclusion.md 87 | - Result Analysis with Python: tutorials/pandas/index.md 88 | - Introduction into Running Simulations in the Cloud: 89 | - Introduction: tutorials/cloud/index.md 90 | - Concepts: tutorials/cloud/page1.md 91 | - Implementation: tutorials/cloud/page2.md 92 | - Deploying on AWS: tutorials/cloud/page4.md 93 | - Trying It Out: tutorials/cloud/page5.md 94 | - Examining the Code: tutorials/cloud/page6.md 95 | - Potential Improvements, Alternatives: tutorials/cloud/page7.md 96 | - Running INET Simulation Campaigns on AWS: 97 | - Motivation: tutorials/swarm/index.md 98 | - Installation and Usage: tutorials/swarm/page1.md 99 | - How it Works: tutorials/swarm/page2.md 100 | - _Source Browser_: showfile.md 101 | 102 | # Google Analytics 103 | google_analytics: ['UA-240922-2', 'docs.omnetpp.org'] 104 | -------------------------------------------------------------------------------- /docs/tutorials/swarm/code/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.2" 2 | 3 | services: 4 | 5 | redis: 6 | image: redis 7 | networks: 8 | interlink: 9 | ports: 10 | - "6379:6379" 11 | deploy: 12 | resources: 13 | reservations: 14 | cpus: "0.25" 15 | placement: 16 | constraints: [node.role == manager] 17 | 18 | 19 | mongo: 20 | image: mongo 21 | networks: 22 | interlink: 23 | ports: 24 | - "27017:27017" 25 | deploy: 26 | resources: 27 | reservations: 28 | cpus: "0.25" 29 | placement: 30 | constraints: [node.role == manager] 31 | 32 | 33 | builder: 34 | image: torokati44/inet-worker 35 | networks: 36 | interlink: 37 | buildnet: 38 | ipv4_address: 13.37.42.254 39 | depends_on: 40 | - redis 41 | - mongo 42 | hostname: builder-{{.Node.Hostname}}-{{.Task.Slot}} # this only works on Docker 17.10 and up 43 | command: build -u redis://redis 44 | environment: 45 | # we use a lot of potential addresses, the offline/unavailable ones will be skipped automatically 46 | # and we set 10 slots for each of them, the local servers will limit the actual number of concurrently running jobs 47 | DISTCC_HOSTS: "13.37.42.1/10,lzo 13.37.42.2/10,lzo 13.37.42.3/10,lzo 13.37.42.4/10,lzo 13.37.42.5/10,lzo 13.37.42.6/10,lzo 13.37.42.7/10,lzo 13.37.42.8/10,lzo" 48 | deploy: 49 | placement: # always on the same node to take advantage of a persistent ccache dir on the host 50 | constraints: [node.role == manager] 51 | restart_policy: 52 | condition: on-failure 53 | delay: 2s 54 | max_attempts: 5 55 | window: 30s 56 | 57 | 58 | runner: 59 | image: torokati44/inet-worker 60 | networks: 61 | interlink: 62 | depends_on: 63 | - redis 64 | - mongo 65 | command: run -u redis://redis 66 | hostname: runner-{{.Node.Hostname}}-{{.Task.Slot}} # this only works on Docker 17.10 and up 67 | deploy: 68 | # placement: 69 | # constraints: [node.role != manager] 70 | resources: 71 | reservations: 72 | cpus: "0.99" # keeping 1 core free on every host. Useful for the manager to run the redis/mongo servers, and the client to run the client. the workers have no issue anyway, because rq is nice-d. 73 | mode: replicated 74 | replicas: 100 75 | restart_policy: 76 | condition: on-failure 77 | delay: 2s 78 | max_attempts: 5 79 | window: 30s 80 | volumes: 81 | - type: bind 82 | source: /var/cache 83 | target: /host-cache 84 | 85 | 86 | visualizer: 87 | image: dockersamples/visualizer 88 | networks: 89 | interlink: 90 | ports: 91 | - "8080:8080" 92 | volumes: 93 | - "/var/run/docker.sock:/var/run/docker.sock" 94 | deploy: 95 | placement: 96 | constraints: [node.role == manager] 97 | 98 | 99 | dashboard: 100 | image: torokati44/rq-dashboard 101 | networks: 102 | interlink: 103 | command: rq-dashboard -H redis 104 | ports: 105 | - "9181:9181" 106 | depends_on: 107 | - redis 108 | deploy: 109 | placement: 110 | constraints: [node.role == manager] 111 | 112 | 113 | distcc: 114 | image: torokati44/distcc-server 115 | networks: 116 | buildnet: 117 | deploy: 118 | mode: global 119 | # placement: 120 | # constraints: [node.role != manager] 121 | 122 | 123 | networks: 124 | 125 | interlink: 126 | attachable: true 127 | 128 | buildnet: 129 | attachable: true 130 | ipam: 131 | config: 132 | - subnet: 13.37.42.0/24 133 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/part6.md: -------------------------------------------------------------------------------- 1 | # Part 6 - Visualizing the Results With the IDE 2 | 3 | ## 6.1 Visualizing output scalars and vectors 4 | 5 | The OMNeT++ IDE can help you to analyze your results. It supports filtering, 6 | processing and displaying vector and scalar data, and can display histograms, too. 7 | The following diagrams have been created with the Result Analysis tool of the IDE. 8 | 9 | The `results` directory in the project folder contains .vec and .sca files, which are the files that store the results in vector and scalar form, respectively. 10 | Vectors record data values as a function of time, while scalars typically record aggregate values at the end of the simulation. 11 | To open the Result Analysis tool, double click on either the .vec or the .sca files in the OMNeT++ IDE. Both files will be loaded by the Result Analysis tool. 12 | You can find the `Browse Data` tab at the bottom of the Result Analysis tool panel. Here you can browse results by type by switching the various tabs 13 | at the top of the tool panel, ie. Scalars, Vectors, or Histograms. By default, all results of a result type are displayed. You can filter them by the module filter 14 | to view all or some of the individual modules, or the statistic name filter to display different types of statistics, ie. mean, max, min, standard deviation, etc. 15 | You can select some or all of the individual results by highlighting them. If you select multiple results, they will be plotted on one chart. Right click and select Plot to display the figures. 16 | 17 | 18 | 19 | !!! tip 20 | For further information about the charting and processing capabilities, 21 | please refer to the OMNeT++ Users Guide (you can find it in the `doc` directory of the OMNeT++ installation). 22 | 23 | Our last model records the `hopCount` of a message each time the message 24 | reaches its destination. 25 | To plot these vectors for all nodes, select the 6 nodes in the browse data tab. 26 | Right click and select Plot. 27 | 28 | 29 | 30 | We can change various options about how the data on the chart is displayed. 31 | Right click on the chart background, and select Properties. 32 | This opens the *Edit LineChart* window. 33 | In the *Lines* tab, set *Line type* to *Dots*, and *Symbol Type* to *Dot*. 34 | 35 | 36 | 37 | To add a legend to the chart, select *Display legend* on the *Legend* tab. 38 | 39 | 40 | 41 | The chart looks like the following: 42 | 43 | 44 | 45 | If we apply a `mean` operation we can see how the `hopCount` in the different 46 | nodes converge to an average. 47 | Right-click the chart, and select *Apply -> Mean*. 48 | Again, right-click on the chart background, and select *Properties*. 49 | In the *Lines* tab, set *Line type* to Linear, and *Symbol Type* to None. 50 | The mean is displayed on the following chart. The lines are easier to see this way because they are thinner. 51 | 52 | 53 | 54 | Scalar data can be plotted on bar charts. 55 | The next chart displays the mean and the maximum of the `hopCount` of the messages 56 | for each destination node, based on the scalar data recorded at the end of the simulation. 57 | In the *Browse data* tab, select *Scalars*. Now select `hop count:max` and `hop count:mean` 58 | for all 6 nodes. 59 | 60 | 61 | 62 | 63 | To create a histogram that shows `hopCount`'s distribution, select *Histograms* 64 | on the *Browse data* tab. Select all nodes, and right click *Plot*. 65 | 66 | 67 | 68 | [`cMessage`]: https://omnetpp.org/doc/omnetpp/api/classomnetpp_1_1cMessage.html 69 | 70 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc13.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace omnetpp; 16 | 17 | // Include a generated file: the header file created from tictoc13.msg. 18 | // It contains the definition of the TictocMsg10 class, derived from 19 | // cMessage. 20 | #include "tictoc13_m.h" 21 | 22 | /** 23 | * In this step the destination address is no longer node 2 -- we draw a 24 | * random destination, and we'll add the destination address to the message. 25 | * 26 | * The best way is to subclass cMessage and add destination as a data member. 27 | * Hand-coding the message class is usually tiresome because it contains 28 | * a lot of boilerplate code, so we let OMNeT++ generate the class for us. 29 | * The message class specification is in tictoc13.msg -- tictoc13_m.h 30 | * and .cc will be generated from this file automatically. 31 | * 32 | * To make the model execute longer, after a message arrives to its destination 33 | * the destination node will generate another message with a random destination 34 | * address, and so forth. 35 | */ 36 | class Txc13 : public cSimpleModule 37 | { 38 | protected: 39 | virtual TicTocMsg13 *generateMessage(); 40 | virtual void forwardMessage(TicTocMsg13 *msg); 41 | virtual void initialize() override; 42 | virtual void handleMessage(cMessage *msg) override; 43 | }; 44 | 45 | Define_Module(Txc13); 46 | 47 | void Txc13::initialize() 48 | { 49 | // Module 0 sends the first message 50 | if (getIndex() == 0) { 51 | // Boot the process scheduling the initial message as a self-message. 52 | TicTocMsg13 *msg = generateMessage(); 53 | scheduleAt(0.0, msg); 54 | } 55 | } 56 | 57 | void Txc13::handleMessage(cMessage *msg) 58 | { 59 | TicTocMsg13 *ttmsg = check_and_cast(msg); 60 | 61 | if (ttmsg->getDestination() == getIndex()) { 62 | // Message arrived. 63 | EV << "Message " << ttmsg << " arrived after " << ttmsg->getHopCount() << " hops.\n"; 64 | bubble("ARRIVED, starting new one!"); 65 | delete ttmsg; 66 | 67 | // Generate another one. 68 | EV << "Generating another message: "; 69 | TicTocMsg13 *newmsg = generateMessage(); 70 | EV << newmsg << endl; 71 | forwardMessage(newmsg); 72 | } 73 | else { 74 | // We need to forward the message. 75 | forwardMessage(ttmsg); 76 | } 77 | } 78 | 79 | TicTocMsg13 *Txc13::generateMessage() 80 | { 81 | // Produce source and destination addresses. 82 | int src = getIndex(); // our module index 83 | int n = getVectorSize(); // module vector size 84 | int dest = intuniform(0, n-2); 85 | if (dest >= src) 86 | dest++; 87 | 88 | char msgname[20]; 89 | sprintf(msgname, "tic-%d-to-%d", src, dest); 90 | 91 | // Create message object and set source and destination field. 92 | TicTocMsg13 *msg = new TicTocMsg13(msgname); 93 | msg->setSource(src); 94 | msg->setDestination(dest); 95 | return msg; 96 | } 97 | 98 | void Txc13::forwardMessage(TicTocMsg13 *msg) 99 | { 100 | // Increment hop count. 101 | msg->setHopCount(msg->getHopCount()+1); 102 | 103 | // Same routing as before: random gate. 104 | int n = gateSize("gate"); 105 | int k = intuniform(0, n-1); 106 | 107 | EV << "Forwarding message " << msg << " on gate[" << k << "]\n"; 108 | send(msg, "gate$o", k); 109 | } 110 | 111 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc6.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * In the previous models, `tic' and `toc' immediately sent back the 18 | * received message. Here we'll add some timing: tic and toc will hold the 19 | * message for 1 simulated second before sending it back. In OMNeT++ 20 | * such timing is achieved by the module sending a message to itself. 21 | * Such messages are called self-messages (but only because of the way they 22 | * are used, otherwise they are completely ordinary messages) or events. 23 | * Self-messages can be "sent" with the scheduleAt() function, and you can 24 | * specify when they should arrive back at the module. 25 | * 26 | * We leave out the counter, to keep the source code small. 27 | */ 28 | class Txc6 : public cSimpleModule 29 | { 30 | private: 31 | cMessage *event; // pointer to the event object which we'll use for timing 32 | cMessage *tictocMsg; // variable to remember the message until we send it back 33 | 34 | public: 35 | Txc6(); 36 | virtual ~Txc6(); 37 | 38 | protected: 39 | virtual void initialize() override; 40 | virtual void handleMessage(cMessage *msg) override; 41 | }; 42 | 43 | Define_Module(Txc6); 44 | 45 | Txc6::Txc6() 46 | { 47 | // Set the pointer to nullptr, so that the destructor won't crash 48 | // even if initialize() doesn't get called because of a runtime 49 | // error or user cancellation during the startup process. 50 | event = tictocMsg = nullptr; 51 | } 52 | 53 | Txc6::~Txc6() 54 | { 55 | // Dispose of dynamically allocated the objects 56 | cancelAndDelete(event); 57 | delete tictocMsg; 58 | } 59 | 60 | void Txc6::initialize() 61 | { 62 | // Create the event object we'll use for timing -- just any ordinary message. 63 | event = new cMessage("event"); 64 | 65 | // No tictoc message yet. 66 | tictocMsg = nullptr; 67 | 68 | if (strcmp("tic", getName()) == 0) { 69 | // We don't start right away, but instead send an message to ourselves 70 | // (a "self-message") -- we'll do the first sending when it arrives 71 | // back to us, at t=5.0s simulated time. 72 | EV << "Scheduling first send to t=5.0s\n"; 73 | tictocMsg = new cMessage("tictocMsg"); 74 | scheduleAt(5.0, event); 75 | } 76 | } 77 | 78 | void Txc6::handleMessage(cMessage *msg) 79 | { 80 | // There are several ways of distinguishing messages, for example by message 81 | // kind (an int attribute of cMessage) or by class using dynamic_cast 82 | // (provided you subclass from cMessage). In this code we just check if we 83 | // recognize the pointer, which (if feasible) is the easiest and fastest 84 | // method. 85 | if (msg == event) { 86 | // The self-message arrived, so we can send out tictocMsg and nullptr out 87 | // its pointer so that it doesn't confuse us later. 88 | EV << "Wait period is over, sending back message\n"; 89 | send(tictocMsg, "out"); 90 | tictocMsg = nullptr; 91 | } 92 | else { 93 | // If the message we received is not our self-message, then it must 94 | // be the tic-toc message arriving from our partner. We remember its 95 | // pointer in the tictocMsg variable, then schedule our self-message 96 | // to come back to us in 1s simulated time. 97 | EV << "Message arrived, starting to wait 1 sec...\n"; 98 | tictocMsg = msg; 99 | scheduleAt(simTime()+1.0, event); 100 | } 101 | } 102 | 103 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc9.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003-2015 Andras Varga 5 | // 6 | // This file is distributed WITHOUT ANY WARRANTY. See the file 7 | // `license' for details on this and other legal matters. 8 | // 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace omnetpp; 15 | 16 | /** 17 | * In the previous model we just created another packet if we needed to 18 | * retransmit. This is OK because the packet didn't contain much, but 19 | * in real life it's usually more practical to keep a copy of the original 20 | * packet so that we can re-send it without the need to build it again. 21 | */ 22 | class Tic9 : public cSimpleModule 23 | { 24 | private: 25 | simtime_t timeout; // timeout 26 | cMessage *timeoutEvent; // holds pointer to the timeout self-message 27 | int seq; // message sequence number 28 | cMessage *message; // message that has to be re-sent on timeout 29 | 30 | public: 31 | Tic9(); 32 | virtual ~Tic9(); 33 | 34 | protected: 35 | virtual cMessage *generateNewMessage(); 36 | virtual void sendCopyOf(cMessage *msg); 37 | virtual void initialize() override; 38 | virtual void handleMessage(cMessage *msg) override; 39 | }; 40 | 41 | Define_Module(Tic9); 42 | 43 | Tic9::Tic9() 44 | { 45 | timeoutEvent = message = nullptr; 46 | } 47 | 48 | Tic9::~Tic9() 49 | { 50 | cancelAndDelete(timeoutEvent); 51 | delete message; 52 | } 53 | 54 | void Tic9::initialize() 55 | { 56 | // Initialize variables. 57 | seq = 0; 58 | timeout = 1.0; 59 | timeoutEvent = new cMessage("timeoutEvent"); 60 | 61 | // Generate and send initial message. 62 | EV << "Sending initial message\n"; 63 | message = generateNewMessage(); 64 | sendCopyOf(message); 65 | scheduleAt(simTime()+timeout, timeoutEvent); 66 | } 67 | 68 | void Tic9::handleMessage(cMessage *msg) 69 | { 70 | if (msg == timeoutEvent) { 71 | // If we receive the timeout event, that means the packet hasn't 72 | // arrived in time and we have to re-send it. 73 | EV << "Timeout expired, resending message and restarting timer\n"; 74 | sendCopyOf(message); 75 | scheduleAt(simTime()+timeout, timeoutEvent); 76 | } 77 | else { // message arrived 78 | // Acknowledgement received! 79 | EV << "Received: " << msg->getName() << "\n"; 80 | delete msg; 81 | 82 | // Also delete the stored message and cancel the timeout event. 83 | EV << "Timer cancelled.\n"; 84 | cancelEvent(timeoutEvent); 85 | delete message; 86 | 87 | // Ready to send another one. 88 | message = generateNewMessage(); 89 | sendCopyOf(message); 90 | scheduleAt(simTime()+timeout, timeoutEvent); 91 | } 92 | } 93 | 94 | cMessage *Tic9::generateNewMessage() 95 | { 96 | // Generate a message with a different name every time. 97 | char msgname[20]; 98 | sprintf(msgname, "tic-%d", ++seq); 99 | cMessage *msg = new cMessage(msgname); 100 | return msg; 101 | } 102 | 103 | void Tic9::sendCopyOf(cMessage *msg) 104 | { 105 | // Duplicate message and send the copy. 106 | cMessage *copy = (cMessage *)msg->dup(); 107 | send(copy, "out"); 108 | } 109 | 110 | /** 111 | * Sends back an acknowledgement -- or not. 112 | */ 113 | class Toc9 : public cSimpleModule 114 | { 115 | protected: 116 | virtual void handleMessage(cMessage *msg) override; 117 | }; 118 | 119 | Define_Module(Toc9); 120 | 121 | void Toc9::handleMessage(cMessage *msg) 122 | { 123 | if (uniform(0, 1) < 0.1) { 124 | EV << "\"Losing\" message " << msg << endl; 125 | bubble("message lost"); 126 | delete msg; 127 | } 128 | else { 129 | EV << msg << " received, sending back an acknowledgement.\n"; 130 | delete msg; 131 | send(new cMessage("ack"), "out"); 132 | } 133 | } 134 | 135 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc16.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | #include "tictoc16_m.h" 15 | 16 | using namespace omnetpp; 17 | 18 | /** 19 | * The main problem with the previous step is that we must modify the model's 20 | * code if we want to change what statistics are gathered. Statistic calculation 21 | * is woven deeply into the model code which is hard to modify and understand. 22 | * 23 | * OMNeT++ 4.1 provides a different mechanism called 'signals' that we can use 24 | * to gather statistics. First we have to identify the events where the state 25 | * of the model changes. We can emit signals at these points that carry the value 26 | * of chosen state variables. This way the C++ code only emits signals, but how those 27 | * signals are processed are determined only by the listeners that are attached to them. 28 | * 29 | * The signals the model emits and the listeners that process them can be defined in 30 | * the NED file using the 'signal' and 'statistic' property. 31 | * 32 | * We will gather the same statistics as in the previous step, but notice that we will not need 33 | * any private member variables to calculate these values. We will use only a single signal that 34 | * is emitted when a message arrives and carries the hopcount in the message. 35 | */ 36 | class Txc16 : public cSimpleModule 37 | { 38 | private: 39 | simsignal_t arrivalSignal; 40 | 41 | protected: 42 | virtual TicTocMsg16 *generateMessage(); 43 | virtual void forwardMessage(TicTocMsg16 *msg); 44 | virtual void initialize() override; 45 | virtual void handleMessage(cMessage *msg) override; 46 | }; 47 | 48 | Define_Module(Txc16); 49 | 50 | void Txc16::initialize() 51 | { 52 | arrivalSignal = registerSignal("arrival"); 53 | // Module 0 sends the first message 54 | if (getIndex() == 0) { 55 | // Boot the process scheduling the initial message as a self-message. 56 | TicTocMsg16 *msg = generateMessage(); 57 | scheduleAt(0.0, msg); 58 | } 59 | } 60 | 61 | void Txc16::handleMessage(cMessage *msg) 62 | { 63 | TicTocMsg16 *ttmsg = check_and_cast(msg); 64 | 65 | if (ttmsg->getDestination() == getIndex()) { 66 | // Message arrived 67 | int hopcount = ttmsg->getHopCount(); 68 | // send a signal 69 | emit(arrivalSignal, hopcount); 70 | 71 | EV << "Message " << ttmsg << " arrived after " << hopcount << " hops.\n"; 72 | bubble("ARRIVED, starting new one!"); 73 | 74 | delete ttmsg; 75 | 76 | // Generate another one. 77 | EV << "Generating another message: "; 78 | TicTocMsg16 *newmsg = generateMessage(); 79 | EV << newmsg << endl; 80 | forwardMessage(newmsg); 81 | } 82 | else { 83 | // We need to forward the message. 84 | forwardMessage(ttmsg); 85 | } 86 | } 87 | 88 | TicTocMsg16 *Txc16::generateMessage() 89 | { 90 | // Produce source and destination addresses. 91 | int src = getIndex(); 92 | int n = getVectorSize(); 93 | int dest = intuniform(0, n-2); 94 | if (dest >= src) 95 | dest++; 96 | 97 | char msgname[20]; 98 | sprintf(msgname, "tic-%d-to-%d", src, dest); 99 | 100 | // Create message object and set source and destination field. 101 | TicTocMsg16 *msg = new TicTocMsg16(msgname); 102 | msg->setSource(src); 103 | msg->setDestination(dest); 104 | return msg; 105 | } 106 | 107 | void Txc16::forwardMessage(TicTocMsg16 *msg) 108 | { 109 | // Increment hop count. 110 | msg->setHopCount(msg->getHopCount()+1); 111 | 112 | // Same routing as before: random gate. 113 | int n = gateSize("gate"); 114 | int k = intuniform(0, n-1); 115 | 116 | EV << "Forwarding message " << msg << " on gate[" << k << "]\n"; 117 | send(msg, "gate$o", k); 118 | } 119 | 120 | -------------------------------------------------------------------------------- /docs/tutorials/tictoc/code/txc18.cc: -------------------------------------------------------------------------------- 1 | // 2 | // This file is part of an OMNeT++/OMNEST simulation example. 3 | // 4 | // Copyright (C) 2003 Ahmet Sekercioglu 5 | // Copyright (C) 2003-2015 Andras Varga 6 | // 7 | // This file is distributed WITHOUT ANY WARRANTY. See the file 8 | // `license' for details on this and other legal matters. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | #include "tictoc18_m.h" 15 | 16 | using namespace omnetpp; 17 | 18 | /** 19 | * The main problem with the previous step is that we must modify the model's 20 | * code if we want to change what statistics are gathered. Statistic calculation 21 | * is woven deeply into the model code which is hard to modify and understand. 22 | * 23 | * OMNeT++ 4.1 provides a different mechanism called 'signals' that we can use 24 | * to gather statistics. First we have to identify the events where the state 25 | * of the model changes. We can emit signals at these points that carry the value 26 | * of chosen state variables. This way the C++ code only emits signals, but how those 27 | * signals are processed are determined only by the listeners that are attached to them. 28 | * 29 | * The signals the model emits and the listeners that process them can be defined in 30 | * the NED file using the 'signal' and 'statistic' property. 31 | * 32 | * We will gather the same statistics as in the previous step, but notice that we will not need 33 | * any private member variables to calculate these values. We will use only a single signal that 34 | * is emitted when a message arrives and carries the hopcount in the message. 35 | */ 36 | class Txc18 : public cSimpleModule 37 | { 38 | private: 39 | simsignal_t arrivalSignal; 40 | 41 | protected: 42 | virtual TicTocMsg18 *generateMessage(); 43 | virtual void forwardMessage(TicTocMsg18 *msg); 44 | virtual void initialize() override; 45 | virtual void handleMessage(cMessage *msg) override; 46 | }; 47 | 48 | Define_Module(Txc18); 49 | 50 | void Txc18::initialize() 51 | { 52 | arrivalSignal = registerSignal("arrival"); 53 | // Module 0 sends the first message 54 | if (getIndex() == 0) { 55 | // Boot the process scheduling the initial message as a self-message. 56 | TicTocMsg18 *msg = generateMessage(); 57 | scheduleAt(0.0, msg); 58 | } 59 | } 60 | 61 | void Txc18::handleMessage(cMessage *msg) 62 | { 63 | TicTocMsg18 *ttmsg = check_and_cast(msg); 64 | 65 | if (ttmsg->getDestination() == getIndex()) { 66 | // Message arrived 67 | int hopcount = ttmsg->getHopCount(); 68 | // send a signal 69 | emit(arrivalSignal, hopcount); 70 | 71 | EV << "Message " << ttmsg << " arrived after " << hopcount << " hops.\n"; 72 | bubble("ARRIVED, starting new one!"); 73 | 74 | delete ttmsg; 75 | 76 | // Generate another one. 77 | EV << "Generating another message: "; 78 | TicTocMsg18 *newmsg = generateMessage(); 79 | EV << newmsg << endl; 80 | forwardMessage(newmsg); 81 | } 82 | else { 83 | // We need to forward the message. 84 | forwardMessage(ttmsg); 85 | } 86 | } 87 | 88 | TicTocMsg18 *Txc18::generateMessage() 89 | { 90 | // Produce source and destination addresses. 91 | int src = getIndex(); 92 | int n = getVectorSize(); 93 | int dest = intuniform(0, n-2); 94 | if (dest >= src) 95 | dest++; 96 | 97 | char msgname[20]; 98 | sprintf(msgname, "tic-%d-to-%d", src, dest); 99 | 100 | // Create message object and set source and destination field. 101 | TicTocMsg18 *msg = new TicTocMsg18(msgname); 102 | msg->setSource(src); 103 | msg->setDestination(dest); 104 | return msg; 105 | } 106 | 107 | void Txc18::forwardMessage(TicTocMsg18 *msg) 108 | { 109 | // Increment hop count. 110 | msg->setHopCount(msg->getHopCount()+1); 111 | 112 | // Same routing as before: random gate. 113 | int n = gateSize("gate"); 114 | int k = intuniform(0, n-1); 115 | 116 | EV << "Forwarding message " << msg << " on gate[" << k << "]\n"; 117 | send(msg, "gate$o", k); 118 | } 119 | 120 | -------------------------------------------------------------------------------- /docs/javascripts/rainbow-html.js: -------------------------------------------------------------------------------- 1 | /** 2 | * HTML patterns 3 | * 4 | * @author Craig Campbell 5 | */ 6 | Rainbow.extend('html', [ 7 | { 8 | name: 'source.php.embedded', 9 | matches: { 10 | 1: 'variable.language.php-tag', 11 | 2: { 12 | language: 'php' 13 | }, 14 | 3: 'variable.language.php-tag' 15 | }, 16 | pattern: /(<\?php|<\?=?(?!xml))([\s\S]*?)(\?>)/gm 17 | }, 18 | { 19 | name: 'source.css.embedded', 20 | matches: { 21 | 1: { 22 | matches: { 23 | 1: 'support.tag.style', 24 | 2: [ 25 | { 26 | name: 'entity.tag.style', 27 | pattern: /^style/g 28 | }, 29 | { 30 | name: 'string', 31 | pattern: /('|")(.*?)(\1)/g 32 | }, 33 | { 34 | name: 'entity.tag.style.attribute', 35 | pattern: /(\w+)/g 36 | } 37 | ], 38 | 3: 'support.tag.style' 39 | }, 40 | pattern: /(<\/?)(style.*?)(>)/g 41 | }, 42 | 2: { 43 | language: 'css' 44 | }, 45 | 3: 'support.tag.style', 46 | 4: 'entity.tag.style', 47 | 5: 'support.tag.style' 48 | }, 49 | pattern: /(<style.*?>)([\s\S]*?)(<\/)(style)(>)/gm 50 | }, 51 | { 52 | name: 'source.js.embedded', 53 | matches: { 54 | 1: { 55 | matches: { 56 | 1: 'support.tag.script', 57 | 2: [ 58 | { 59 | name: 'entity.tag.script', 60 | pattern: /^script/g 61 | }, 62 | 63 | { 64 | name: 'string', 65 | pattern: /('|")(.*?)(\1)/g 66 | }, 67 | { 68 | name: 'entity.tag.script.attribute', 69 | pattern: /(\w+)/g 70 | } 71 | ], 72 | 3: 'support.tag.script' 73 | }, 74 | pattern: /(<\/?)(script.*?)(>)/g 75 | }, 76 | 2: { 77 | language: 'javascript' 78 | }, 79 | 3: 'support.tag.script', 80 | 4: 'entity.tag.script', 81 | 5: 'support.tag.script' 82 | }, 83 | pattern: /(<script(?! src).*?>)([\s\S]*?)(<\/)(script)(>)/gm 84 | }, 85 | { 86 | name: 'comment.html', 87 | pattern: /<\!--[\S\s]*?-->/g 88 | }, 89 | { 90 | matches: { 91 | 1: 'support.tag.opening', 92 | 2: 'support.tag.closing' 93 | }, 94 | pattern: /(<)|(\/?\??>)/g 95 | }, 96 | { 97 | name: 'support.tag', 98 | matches: { 99 | 1: 'support.tag', 100 | 2: 'support.tag.special', 101 | 3: 'support.tag-name' 102 | }, 103 | pattern: /(<\??)(\/|\!?)(\w+)/g 104 | }, 105 | { 106 | matches: { 107 | 1: 'support.attribute' 108 | }, 109 | pattern: /([a-z-]+)(?=\=)/gi 110 | }, 111 | { 112 | matches: { 113 | 1: 'support.operator', 114 | 2: 'string.quote', 115 | 3: 'string.value', 116 | 4: 'string.quote' 117 | }, 118 | pattern: /(=)('|")(.*?)(\2)/g 119 | }, 120 | { 121 | matches: { 122 | 1: 'support.operator', 123 | 2: 'support.value' 124 | }, 125 | pattern: /(=)([a-zA-Z\-0-9]*)\b/g 126 | }, 127 | { 128 | matches: { 129 | 1: 'support.attribute' 130 | }, 131 | pattern: /\s([\w-]+)(?=\s|>)(?![\s\S]*<)/g 132 | } 133 | ]); 134 | 135 | Rainbow.addAlias('xml', 'html'); -------------------------------------------------------------------------------- /docs/javascripts/quoting.js: -------------------------------------------------------------------------------- 1 | // 2 | // Allows including a line range of a file from HTML. Example: 3 | // 4 | //

 5 | //
 6 | // "from", "until" are regexes that match substring of a line; "from" is inclusive, "until" is exclusive
 7 | //
 8 | // Returns an object/dictionary/map with two values:
 9 | //   startLine - the line number where the returned snippet begins in the whole text (starting from 1 as usual...)
10 | //   snippet   - the actual matched snippet text
11 | var getLines = function(text, after, from, until, upto, comment) {
12 | 
13 |     let startPattern = from == null ? after : from;
14 |     let isStartInclusive = from != null;
15 | 
16 |     let endPattern = until == null ? upto : until;
17 |     let isEndInclusive = upto != null;
18 | 
19 |     if (startPattern == null) {
20 |         startPattern = "";
21 |         isStartInclusive = true;
22 |     }
23 | 
24 |     if (endPattern == null) {
25 |         endPattern = "[\\s\\S]*";
26 |         isEndInclusive = true;
27 |     }
28 | 
29 |     let re = new RegExp("([\\s\\S]*?)(^.*" + startPattern + ".*$\\n)([\\s\\S]*?)(^.*" + endPattern + ".*$)", "m");
30 | 
31 |     let matches = text.match(re);
32 | 
33 |     // Group 1 is the "preface" - everything before the snippet.
34 |     // Group 2 is the lines enclosing the start marker
35 |     // Group 3 is the snippet "body"
36 |     // Group 4 is the lines enclosing the end marker
37 |     if (matches == null)
38 |         return { startLine: 0, snippet: "!!! No matching lines !!!" };
39 | 
40 |     let preface = isStartInclusive ? matches[1] + matches[2] : matches[1];
41 |     let snippet = (isStartInclusive ? matches[2] : "")
42 |                     + matches[3]
43 |                     + (isEndInclusive ? matches[4] : "");
44 | 
45 |     startLine = preface.split('\n').length;
46 | 
47 |     // trimming trailing whitespace (empty lines)
48 |     snippet = snippet.replace(/\s+$/, '');
49 | 
50 |     if (comment) // [^\S\n] character class is a "double-negative": matches any whitespace, except a newline
51 |         snippet = snippet.replace(new RegExp("[^\\S\\n]*" + comment + ".*$", "mg"), '');
52 | 
53 |     return { startLine: startLine, snippet: snippet };
54 | }
55 | 
56 | var fileLoaded = function(file, data) {
57 |    pres = $('pre[src="' + file + '"]');
58 |    $.each(pres, function(i,pre) {
59 |       excerpt = getLines(data,
60 |                          pre.attributes.after ? pre.attributes.after.value : null,
61 |                          pre.attributes.from ? pre.attributes.from.value : null,
62 |                          pre.attributes.until ? pre.attributes.until.value : null,
63 |                          pre.attributes.upto ? pre.attributes.upto.value : null,
64 |                          pre.attributes.comment ? pre.attributes.comment.value : null);
65 | 
66 |       var language = file.endsWith(".ned") ? "ned" : file.endsWith(".xml") ? "xml"
67 |           : file.endsWith(".ini") ? "ini" : file.endsWith(".py") ? "python"
68 |           : file.endsWith("Dockerfile") ? "dockerfile" : "generic";
69 | 
70 |       // this new element will hold some attributes to aid Rainbow and Rainbow.linenumbers, as well as the snippet content.
71 |       var codeElement = document.createElement('code');
72 |       codeElement.setAttribute('display', 'none'); // so it won't appear unformatted
73 |       codeElement.setAttribute('data-language', language); // used by Rainbow
74 |       codeElement.setAttribute('data-line', excerpt.startLine); // used by Rainbow.linenumbers
75 |       $(codeElement).text(excerpt.snippet); // making sure we escape it
76 |       pre.appendChild(codeElement); // adding the  to the DOM
77 | 
78 |       // And then invoke the highlighter on the containing 
.
79 |       // The Rainbow.linenumbers plugin will replace the  with a .
80 |       Rainbow.color(pre);
81 |    });
82 | };
83 | 
84 | document.addEventListener("DOMContentLoaded", function (event) {
85 |    pres = $('pre[src]');
86 |    files = new Set();
87 |    $.each(pres, function(i,pre) {pre.textContent="Loading...\n"; files.add(pre.attributes.src.value); });
88 | 
89 | 
90 |    files.forEach(function(file) {
91 |       jQuery.ajax({url: file,
92 |                    success: function(data) { fileLoaded(file, data); },
93 |                    dataType: "text" });
94 |    });
95 | });
96 | 


--------------------------------------------------------------------------------
/docs/tutorials/tictoc/code/txc15.cc:
--------------------------------------------------------------------------------
  1 | //
  2 | // This file is part of an OMNeT++/OMNEST simulation example.
  3 | //
  4 | // Copyright (C) 2003 Ahmet Sekercioglu
  5 | // Copyright (C) 2003-2015 Andras Varga
  6 | //
  7 | // This file is distributed WITHOUT ANY WARRANTY. See the file
  8 | // `license' for details on this and other legal matters.
  9 | //
 10 | 
 11 | #include 
 12 | #include 
 13 | #include 
 14 | #include "tictoc15_m.h"
 15 | 
 16 | using namespace omnetpp;
 17 | 
 18 | /**
 19 |  * This model is exciting enough so that we can collect some statistics.
 20 |  * We'll record in output vectors the hop count of every message upon arrival.
 21 |  * Output vectors are written into the omnetpp.vec file and can be visualized
 22 |  * with the Plove program.
 23 |  *
 24 |  * We also collect basic statistics (min, max, mean, std.dev.) and histogram
 25 |  * about the hop count which we'll print out at the end of the simulation.
 26 |  */
 27 | class Txc15 : public cSimpleModule
 28 | {
 29 |   private:
 30 |     long numSent;
 31 |     long numReceived;
 32 |     cLongHistogram hopCountStats;
 33 |     cOutVector hopCountVector;
 34 | 
 35 |   protected:
 36 |     virtual TicTocMsg15 *generateMessage();
 37 |     virtual void forwardMessage(TicTocMsg15 *msg);
 38 |     virtual void initialize() override;
 39 |     virtual void handleMessage(cMessage *msg) override;
 40 | 
 41 |     // The finish() function is called by OMNeT++ at the end of the simulation:
 42 |     virtual void finish() override;
 43 | };
 44 | 
 45 | Define_Module(Txc15);
 46 | 
 47 | void Txc15::initialize()
 48 | {
 49 |     // Initialize variables
 50 |     numSent = 0;
 51 |     numReceived = 0;
 52 |     WATCH(numSent);
 53 |     WATCH(numReceived);
 54 | 
 55 |     hopCountStats.setName("hopCountStats");
 56 |     hopCountStats.setRangeAutoUpper(0, 10, 1.5);
 57 |     hopCountVector.setName("HopCount");
 58 | 
 59 |     // Module 0 sends the first message
 60 |     if (getIndex() == 0) {
 61 |         // Boot the process scheduling the initial message as a self-message.
 62 |         TicTocMsg15 *msg = generateMessage();
 63 |         scheduleAt(0.0, msg);
 64 |     }
 65 | }
 66 | 
 67 | void Txc15::handleMessage(cMessage *msg)
 68 | {
 69 |     TicTocMsg15 *ttmsg = check_and_cast(msg);
 70 | 
 71 |     if (ttmsg->getDestination() == getIndex()) {
 72 |         // Message arrived
 73 |         int hopcount = ttmsg->getHopCount();
 74 |         EV << "Message " << ttmsg << " arrived after " << hopcount << " hops.\n";
 75 |         bubble("ARRIVED, starting new one!");
 76 | 
 77 |         // update statistics.
 78 |         numReceived++;
 79 |         hopCountVector.record(hopcount);
 80 |         hopCountStats.collect(hopcount);
 81 | 
 82 |         delete ttmsg;
 83 | 
 84 |         // Generate another one.
 85 |         EV << "Generating another message: ";
 86 |         TicTocMsg15 *newmsg = generateMessage();
 87 |         EV << newmsg << endl;
 88 |         forwardMessage(newmsg);
 89 |         numSent++;
 90 |     }
 91 |     else {
 92 |         // We need to forward the message.
 93 |         forwardMessage(ttmsg);
 94 |     }
 95 | }
 96 | 
 97 | TicTocMsg15 *Txc15::generateMessage()
 98 | {
 99 |     // Produce source and destination addresses.
100 |     int src = getIndex();
101 |     int n = getVectorSize();
102 |     int dest = intuniform(0, n-2);
103 |     if (dest >= src)
104 |         dest++;
105 | 
106 |     char msgname[20];
107 |     sprintf(msgname, "tic-%d-to-%d", src, dest);
108 | 
109 |     // Create message object and set source and destination field.
110 |     TicTocMsg15 *msg = new TicTocMsg15(msgname);
111 |     msg->setSource(src);
112 |     msg->setDestination(dest);
113 |     return msg;
114 | }
115 | 
116 | void Txc15::forwardMessage(TicTocMsg15 *msg)
117 | {
118 |     // Increment hop count.
119 |     msg->setHopCount(msg->getHopCount()+1);
120 | 
121 |     // Same routing as before: random gate.
122 |     int n = gateSize("gate");
123 |     int k = intuniform(0, n-1);
124 | 
125 |     EV << "Forwarding message " << msg << " on gate[" << k << "]\n";
126 |     send(msg, "gate$o", k);
127 | }
128 | 
129 | void Txc15::finish()
130 | {
131 |     // This function is called by OMNeT++ at the end of the simulation.
132 |     EV << "Sent:     " << numSent << endl;
133 |     EV << "Received: " << numReceived << endl;
134 |     EV << "Hop count, min:    " << hopCountStats.getMin() << endl;
135 |     EV << "Hop count, max:    " << hopCountStats.getMax() << endl;
136 |     EV << "Hop count, mean:   " << hopCountStats.getMean() << endl;
137 |     EV << "Hop count, stddev: " << hopCountStats.getStddev() << endl;
138 | 
139 |     recordScalar("#sent", numSent);
140 |     recordScalar("#received", numReceived);
141 | 
142 |     hopCountStats.recordAs("hop count");
143 | }
144 | 
145 | 


--------------------------------------------------------------------------------
/docs/tutorials/cloud/page5.md:
--------------------------------------------------------------------------------
  1 | # Trying It Out
  2 | 
  3 | ## Configuration
  4 | 
  5 | To try it out, we add a new Configuration to the `routing` sample that comes
  6 | with OMNeT++.
  7 | 
  8 | Append this section to the `omnetpp.ini` file in the `samples/routing` directory:
  9 | 
 10 | 
[Config MeshExperiment]
 11 | network = networks.Mesh
 12 | **.width = ${10..20 step 2}
 13 | **.height = ${10..20 step 2}
 14 | 
 15 | **.destAddresses = "0 2 5 6 9 14 17 18 23 27 29 36 42 52 89 123 150 183 192"
 16 | **.sendIaTime = uniform(100us, 10ms)  # high traffic
 17 | 
 18 | **.vector-recording = false
 19 | sim-time-limit = 10s
 20 | 
21 | 22 | This configuration tries to make each of its runs execute for a significant 23 | amount of time - about a minute each on average - by setting up a large network 24 | with a small packet inter-arrival time and a relatively long simulation time 25 | limit. It also disables vector recording to keep the size of the result files 26 | within the limits of the presented solution. 27 | 28 | ## Execution 29 | 30 | To run it, open a terminal, set up the necessary environment variables using 31 | `setenv`, then change into the directory of the sample: 32 | 33 | ```terminal 34 | $ cd /path/to/omnetpp/ 35 | $ . setenv 36 | $ cd samples/routing 37 | ``` 38 | 39 | Then execute the `client.py` script, substituting the IP address of your Redis 40 | server on AWS: 41 | 42 | ```terminal 43 | $ python3 /path/to/client.py ./routing -c MeshExperiment --redis-host 172.17.1.19 44 | ``` 45 | 46 | You should see all runs submitted to the job queue, and after a while, finishing 47 | them. The results should appear in the `results` directory, just like with local 48 | execution. 49 | 50 | ## Comparison 51 | 52 | You can compare the performance of the cloud solution with that of your own 53 | machine by running the same campaign on both, through the `time` utility: 54 | 55 | ```terminal 56 | $ time python3 /path/to/client.py ./routing -c MeshExperiment --redis-host 172.17.1.19 57 | … 58 | $ time opp_runall ./routing -c MeshExperiment 59 | ``` 60 | 61 | After the output of each command, `time` will print a summary of the execution 62 | times. 63 | 64 | Locally on my computer, using all `8` of its cores, the times were: 65 | 66 | ```terminal 67 | real 4m37.610s 68 | user 25m4.576s 69 | sys 0m0.870s 70 | ``` 71 | 72 | The most interesting from our perspective is the `real` time, as this shows the 73 | amount of wall-clock time it took to run each command. The `user` time is the 74 | net processing time. It is much more than the `real` time, because it is 75 | aggregated across all cores. 76 | 77 | And of the one running on AWS: 78 | 79 | ```terminal 80 | real 4m12.310s 81 | user 0m1.931s 82 | sys 0m1.925s 83 | ``` 84 | 85 | With just `3` single-core workers, the simulation completes faster than running 86 | on `8` local cores. The `user` time is next to negligible in this case, because 87 | my computer spent most of the time idling, waiting for the results to come back. 88 | 89 | 90 | 91 | ## Shutting Down 92 | 93 | 94 | To prevent the aimless and useless exhaustion of your Free Tier resource 95 | allowance (or in the long term, your credit card balance), it is important to 96 | terminate your allocated resources once you are done using them. In our case, 97 | these are the EC2 Instances started by the ECS Cluster. We need to shut these 98 | down, because when calculating their usage, the whole amount of time the 99 | instances are running (or paused, but kept available) is taken into account, 100 | not just the time when they were actually used, doing something useful. 101 | 102 | If you wish to use the Cluster again later, the easiest thing to do is scaling 103 | down the number of underlying EC2 Instances to `0`. This will of course cause 104 | all running tasks to stop, as they no longer have anything to run on. 105 | 106 |

107 | 108 | 109 |

110 | 111 | Alternatively, you can delete the whole Cluster. This will also terminate the 112 | EC2 Instances, but it will delete the `worker` Service as well. 113 | 114 |

115 | 116 | 117 |

118 | 119 | The Task Definitions are not deleted either way, but this is not a problem, 120 | since they can be kept around indefinitely, free of charge. 121 | -------------------------------------------------------------------------------- /docs/tutorials/cloud/page2.md: -------------------------------------------------------------------------------- 1 | # Implementation 2 | 3 | To put all of this together into a working solution, in the rest of this 4 | tutorial, we're going to: 5 | 6 | - Install some necessary software packages on our machine 7 | - Build a Docker image which includes OMNeT++ and the worker code 8 | - Deploy the system on AWS 9 | - Run a simple simulation campaign with it using a custom client 10 | - Take a look at all the code needed to perform the above 11 | 12 | Before you begin, create a new empty folder. Later save all linked source files 13 | from this tutorial in that. 14 | 15 | ## Solution Architecture 16 | 17 | We will create the following architecture for running simulations on AWS: 18 | 19 | We want to use Docker images for easy deployment, so we will use an ECS cluster. 20 | One container will run a Redis-based job queue, and others will be workers. The 21 | workers will need to run simulations, so their image will have OMNeT++ installed 22 | in addition to the RQ worker client. After the worker completes a simulation 23 | run, the results will be stored in the Redis database. 24 | 25 | We will provide a custom tool that submits jobs to the job queue from the user's 26 | computer and downloads the results after simulation completion. 27 | 28 | The final architecture will look like this: 29 | 30 | ![Architectural Graph](images/architecture.svg) 31 | 32 | In the following sections, we will show how to implement this architecture. 33 | We will discuss how to create the Docker images, how to configure the cluster, 34 | how to implement the worker and the end-user client and so on. 35 | 36 | 37 | ## Preparation 38 | 39 | First we need to install a few things on our computer. 40 | 41 | ### OMNeT++ 42 | 43 | Download the archive from the [official website](https://omnetpp.org/omnetpp). 44 | Then follow the [Installation 45 | Guide](https://omnetpp.org/doc/omnetpp/InstallGuide.pdf). 46 | 47 | The `core` version will work fine as well, if you don't need the IDE. 48 | 49 | ### Docker 50 | 51 | Follow the guides on the official website: [for 52 | Ubuntu](https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/) or 53 | [for Fedora](https://docs.docker.com/engine/installation/linux/docker-ce/fedora/). 54 | 55 | Note that even if your distribution has Docker in its own native package 56 | archive, it is most likely an outdated, and you will have to uninstall it first. 57 | 58 | ### Python 3 and pip3 59 | 60 | We will use Python version 3; and pip, which is the recommended tool for 61 | installing packages from the [Python Package Index](https://pypi.python.org/pypi). 62 | Install these using the native package manager of your distribution. 63 | 64 | On Ubuntu: 65 | 66 | ```terminal 67 | $ sudo apt install python3 python3-pip 68 | ``` 69 | 70 | On Fedora: 71 | 72 | ```terminal 73 | $ sudo dnf install python3 python3-pip 74 | ``` 75 | 76 | Then, in any case, upgrade `pip`: 77 | 78 | ```terminal 79 | $ sudo pip3 install --upgrade pip 80 | ``` 81 | 82 | Feel free to use a `virtualenv` for this instead of `sudo` if you're familiar 83 | with the concept. 84 | 85 | ### RQ 86 | 87 | Use `pip` to install the RQ library: 88 | 89 | ```terminal 90 | $ sudo pip3 install rq 91 | ``` 92 | 93 | This will install the `redis` client module as well, as a dependency. 94 | 95 | 96 | ### Getting the Code 97 | 98 | Download the following files into the directory you just created: 99 | 100 | - [utils.py](code/utils.py) - Contains some common utilities used by both `worker.py` and `client.py`. 101 | - [worker.py](code/worker.py) - Contains the code to be executed by the workers as a job. 102 | - [Dockerfile](code/Dockerfile) - Is a recipe to build the Docker image for the workers. 103 | - [client.py](code/client.py) - Is the client-side software to submit the simulations. 104 | 105 | We will take a closer look at their contents in the "Examining the Code" chapter. 106 | 107 | ### Building the Docker Image 108 | 109 | 110 | Building the image is done by issuing the following command in the directory 111 | where the above files can be found: 112 | 113 | ```terminal 114 | $ docker build . -t worker 115 | ``` 116 | 117 | The `Dockerfile` is picked up automatically by name, the build context is the 118 | current directory (`.`), and the resulting image will be named `worker`. 119 | 120 | This will likely take a few minutes to complete. If you see a couple of warnings 121 | written in red, but the process continues, don't worry, this is expected. 122 | 123 | ### Publishing 124 | 125 | Now that we built our image for the worker nodes, we need to make it available 126 | for our AWS Instances by uploading it to Docker Hub. 127 | 128 | First authenticate yourself (in case you haven't already) by typing in your 129 | Docker ID and password after running this command: 130 | 131 | ```terminal 132 | $ docker login 133 | ``` 134 | 135 | Now tag the image "into your repo", substituting your user name (Docker ID), so 136 | Docker knows where to push the image: 137 | 138 | ```terminal 139 | $ docker tag worker username/worker 140 | ``` 141 | 142 | And finally issue the actual push: 143 | 144 | ```terminal 145 | $ docker push username/worker 146 | ``` 147 | 148 | This will upload about 400-500 MB of data, so it can take a while. Once it's 149 | done, your image is available worldwide. You can see it appeared on [Docker 150 | Hub](https://hub.docker.com/). You may even get email notification if it was 151 | successful. 152 | -------------------------------------------------------------------------------- /docs/stylesheets/jupyter.css: -------------------------------------------------------------------------------- 1 | /* code and dataframe outputs */ 2 | .md-typeset .codehilite, .md-typeset .highlight { 3 | margin-top: 0px; 4 | } 5 | 6 | /* image outputs */ 7 | .output-prompt + p { 8 | margin-top: 0px; 9 | } 10 | 11 | div.output-prompt { 12 | color: #C00000; 13 | font-size: smaller; 14 | } 15 | 16 | div.input-prompt { 17 | color: #303F9F; 18 | font-size: smaller; 19 | } 20 | 21 | .output-prompt + div { 22 | overflow-x: auto; 23 | } 24 | 25 | table.dataframe { 26 | margin-left: auto; 27 | margin-right: auto; 28 | border: none transparent; 29 | border-spacing: 0; 30 | font-size: small; 31 | line-height: normal; 32 | } 33 | .dataframe thead { 34 | border-bottom: 1px solid black; 35 | } 36 | 37 | .dataframe tbody tr:nth-child(odd) { 38 | background: #f5f5f5; 39 | } 40 | 41 | .dataframe tr, 42 | .dataframe th, 43 | .dataframe td { 44 | margin: 1em 2em; 45 | } 46 | 47 | .dataframe td, 48 | .dataframe th { 49 | text-align: right; 50 | vertical-align: middle; 51 | padding: 3px 6px; 52 | } 53 | 54 | .dataframe th { 55 | font-weight: bold; 56 | } 57 | 58 | .highlight .hll { background-color: #ffffcc } 59 | .highlight { background: #f8f8f8; } 60 | .highlight .c { color: #408080; font-style: italic } /* Comment */ 61 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 62 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 63 | .highlight .o { color: #666666 } /* Operator */ 64 | .highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ 65 | .highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ 66 | .highlight .cp { color: #BC7A00 } /* Comment.Preproc */ 67 | .highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ 68 | .highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ 69 | .highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ 70 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 71 | .highlight .ge { font-style: italic } /* Generic.Emph */ 72 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 73 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 74 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 75 | .highlight .go { color: #888888 } /* Generic.Output */ 76 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 77 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 78 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 79 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 80 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 81 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 82 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 83 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 84 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 85 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 86 | .highlight .m { color: #666666 } /* Literal.Number */ 87 | .highlight .s { color: #BA2121 } /* Literal.String */ 88 | .highlight .na { color: #7D9029 } /* Name.Attribute */ 89 | .highlight .nb { color: #008000 } /* Name.Builtin */ 90 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 91 | .highlight .no { color: #880000 } /* Name.Constant */ 92 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 93 | .highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ 94 | .highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ 95 | .highlight .nf { color: #0000FF } /* Name.Function */ 96 | .highlight .nl { color: #A0A000 } /* Name.Label */ 97 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 98 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 99 | .highlight .nv { color: #19177C } /* Name.Variable */ 100 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 101 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 102 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 103 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 104 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 105 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 106 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 107 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 108 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 109 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 110 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 111 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 112 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 113 | .highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ 114 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 115 | .highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ 116 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 117 | .highlight .sr { color: #BB6688 } /* Literal.String.Regex */ 118 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 119 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 120 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 121 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 122 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 123 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 124 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 125 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 126 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ 127 | 128 | -------------------------------------------------------------------------------- /docs/tutorials/swarm/code/docker-for-aws-policy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "2012-10-17", 3 | "Statement": [ 4 | { 5 | "Sid": "FullAccessPermissions", 6 | "Effect": "Allow", 7 | "Action": [ 8 | "autoscaling:*", 9 | "cloudformation:*", 10 | "elasticfilesystem:*", 11 | "elasticloadbalancing:*" 12 | ], 13 | "Resource": "*" 14 | }, 15 | { 16 | "Sid": "SelectivePermissions", 17 | "Effect": "Allow", 18 | "Action": [ 19 | "cloudwatch:PutMetricAlarm", 20 | "dynamodb:CreateTable", 21 | "dynamodb:DeleteItem", 22 | "dynamodb:DeleteTable", 23 | "dynamodb:DescribeTable", 24 | "dynamodb:GetItem", 25 | "dynamodb:ListTables", 26 | "dynamodb:PutItem", 27 | "dynamodb:Query", 28 | "dynamodb:UpdateItem", 29 | "dynamodb:UpdateTable", 30 | "ec2:AllocateHosts", 31 | "ec2:AssignPrivateIpAddresses", 32 | "ec2:AssociateRouteTable", 33 | "ec2:AttachInternetGateway", 34 | "ec2:AttachNetworkInterface", 35 | "ec2:AttachVolume", 36 | "ec2:AuthorizeSecurityGroupEgress", 37 | "ec2:AuthorizeSecurityGroupIngress", 38 | "ec2:CreateInternetGateway", 39 | "ec2:CreateKeyPair", 40 | "ec2:CreateNatGateway", 41 | "ec2:CreateNetworkAcl", 42 | "ec2:CreateNetworkAclEntry", 43 | "ec2:CreateNetworkInterface", 44 | "ec2:CreateRoute", 45 | "ec2:CreateRouteTable", 46 | "ec2:CreateSecurityGroup", 47 | "ec2:CreateSubnet", 48 | "ec2:CreateTags", 49 | "ec2:CreateVolume", 50 | "ec2:CreateVpc", 51 | "ec2:DeleteInternetGateway", 52 | "ec2:DeleteNatGateway", 53 | "ec2:DeleteNetworkAcl", 54 | "ec2:DeleteNetworkAclEntry", 55 | "ec2:DeleteNetworkInterface", 56 | "ec2:DeleteRoute", 57 | "ec2:DeleteRouteTable", 58 | "ec2:DeleteSecurityGroup", 59 | "ec2:DeleteSubnet", 60 | "ec2:DeleteTags", 61 | "ec2:DeleteVolume", 62 | "ec2:DeleteVpc", 63 | "ec2:DescribeAccountAttributes", 64 | "ec2:DescribeAvailabilityZones", 65 | "ec2:DescribeHosts", 66 | "ec2:DescribeImageAttribute", 67 | "ec2:DescribeImages", 68 | "ec2:DescribeInstances", 69 | "ec2:DescribeInstanceStatus", 70 | "ec2:DescribeInternetGateways", 71 | "ec2:DescribeKeyPairs", 72 | "ec2:DescribeNetworkInterfaces", 73 | "ec2:DescribeRegions", 74 | "ec2:DescribeRouteTables", 75 | "ec2:DescribeSecurityGroups", 76 | "ec2:DescribeSubnets", 77 | "ec2:DescribeTags", 78 | "ec2:DescribeVolumeAttribute", 79 | "ec2:DescribeVolumes", 80 | "ec2:DescribeVolumeStatus", 81 | "ec2:DescribeVpcAttribute", 82 | "ec2:DescribeVpcs", 83 | "ec2:DetachInternetGateway", 84 | "ec2:DetachNetworkInterface", 85 | "ec2:DetachVolume", 86 | "ec2:DisassociateAddress", 87 | "ec2:DisassociateRouteTable", 88 | "ec2:GetConsoleOutput", 89 | "ec2:GetConsoleScreenshot", 90 | "ec2:ImportKeyPair", 91 | "ec2:ModifyNetworkInterfaceAttribute", 92 | "ec2:ModifySubnetAttribute", 93 | "ec2:ModifyVpcAttribute", 94 | "ec2:RebootInstances", 95 | "ec2:ReleaseAddress", 96 | "ec2:ReleaseHosts", 97 | "ec2:RevokeSecurityGroupEgress", 98 | "ec2:RevokeSecurityGroupIngress", 99 | "ec2:RunInstances", 100 | "ec2:StartInstances", 101 | "ec2:StopInstances", 102 | "ec2:TerminateInstances", 103 | "iam:AddRoleToInstanceProfile", 104 | "iam:CreateInstanceProfile", 105 | "iam:CreateRole", 106 | "iam:DeleteInstanceProfile", 107 | "iam:DeleteRole", 108 | "iam:DeleteRolePolicy", 109 | "iam:GetRole", 110 | "iam:PassRole", 111 | "iam:PutRolePolicy", 112 | "iam:RemoveRoleFromInstanceProfile", 113 | "lambda:CreateFunction", 114 | "lambda:DeleteFunction", 115 | "lambda:GetFunctionConfiguration", 116 | "lambda:InvokeFunction", 117 | "lambda:UpdateFunctionCode", 118 | "lambda:UpdateFunctionConfiguration", 119 | "logs:CreateLogGroup", 120 | "logs:CreateLogStream", 121 | "logs:DeleteLogGroup", 122 | "logs:DeleteLogStream", 123 | "logs:DescribeLogGroups", 124 | "logs:GetLogEvents", 125 | "logs:PutLogEvents", 126 | "logs:PutRetentionPolicy", 127 | "sqs:ChangeMessageVisibility", 128 | "sqs:CreateQueue", 129 | "sqs:DeleteMessage", 130 | "sqs:DeleteQueue", 131 | "sqs:GetQueueAttributes", 132 | "sqs:GetQueueUrl", 133 | "sqs:ListQueues", 134 | "sqs:ReceiveMessage", 135 | "sqs:SendMessage", 136 | "sqs:SetQueueAttributes" 137 | ], 138 | "Resource": "*" 139 | } 140 | ] 141 | } 142 | --------------------------------------------------------------------------------