项目作者: iamhyc

项目描述 :
A NS3 topology generator for massive nodes, by Star-of-Star topology
高级语言: C++
项目地址: git://github.com/iamhyc/hybrid-virtual-routing-ns3.git
创建时间: 2018-03-01T01:51:45Z
项目社区:https://github.com/iamhyc/hybrid-virtual-routing-ns3

开源协议:

下载


NS3 Simulation

hybrid-virtual-routing, for VLC-RF Backended Wi-Fi Relay Network

Tech-Tag: ns3 rapidjson root-tree

Framework

  • describe the network from-top-to-bottom in JSON format, self-recursive and iterable

  • Demo

    1. graph TB
    2. subgraph GroupB
    3. A1[Router1]-.VLC.->B1_0[Relay_1_0]
    4. B1_0-.WiFi.->A1
    5. A1-.VLC.->B1_1[Relay_1_1]
    6. B1_1-.WiFi.->A1
    7. end
    8. subgraph GroupA
    9. A0[Router0]-.VLC.->B0_0[Relay_0_0]
    10. B0_0-.WiFi.->A0
    11. A0-.VLC.->B0_1[Relay_0_1]
    12. B0_1-.WiFi.->A0
    13. end
    14. B0_0---C0[UE Group]
    15. B0_1---C1[UE Group]
    16. B1_0---C2[UE Group]
    17. B1_1---C3[UE Group]

Howto

  1. build ns3 following official tutorial;

  2. ln -s <this-repo-full-path> <your-ns3-full-path>/examples/main

  3. add following code in your ~/.zshrc or ~/.bashrc :

    1. # Waf section
    2. WAF_PATH=<your-ns3-full-path>
    3. WAF_EDITOR=<your-prefered-editor>
    4. export PATH=$WAF_PATH:$PATH
    5. function wafls() {
    6. ls $WAF_PATH/$1 ${${*}#${1}}
    7. }
    8. function wafcd() {
    9. cd $WAF_PATH/$1 ${${*}#${1}}
    10. }
    11. function wafed() {
    12. $WAF_EDITOR $WAF_PATH/$1 ${${*}#${1}}
    13. }
    14. function wafbuild() {
    15. local pwd_tmp=$PWD
    16. cd $WAF_PATH && ./waf
    17. cd $pwd_tmp
    18. }
    19. function wafrun() {
    20. local pwd_tmp=$PWD
    21. cd $WAF_PATH && waf --run $*
    22. cd $pwd_tmp
    23. }
    24. function wafgdb() {
    25. local pwd_tmp=$PWD
    26. cd $WAF_PATH && waf --run $1 --command-template="gdb ${${*}#${1}}"
    27. cd $pwd_tmp
    28. }
    29. function wafpcap_mv() {
    30. rm -rf ./$1-\*.pcap && mv -f $WAF_PATH/$1-*.pcap ./$1-pcap/
    31. }

    source the configuration file

  4. wafrun main to run the main simulation

Todo

  • Network JSON Parse
  • Static Routing Strategy
  • Performance Analysis Callback
  • Wi-Fi Collision Container