Skip to content

Commit

Permalink
fix(samples): making samples work with unetstack3
Browse files Browse the repository at this point in the history
  • Loading branch information
notthetup authored and mchitre committed Oct 4, 2019
1 parent 3f84261 commit 0a5a39e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions archive/samples/baseband/ofdmsim.groovy
Expand Up @@ -48,6 +48,6 @@ ofdmStack = { container ->

// run the simulation forever
simulate {
node '1', remote: 1101, address: 1, location: [ 0.km, 0.km, -15.m], shell: CONSOLE, web:'/:8101', stack: ofdmStack
node '2', remote: 1102, address: 2, location: [ 1.km, 0.km, -15.m], shell: 5102, web:'/:8102', stack: ofdmStack
node '1', remote: 1101, address: 1, location: [ 0.km, 0.km, -15.m], shell: CONSOLE, web:8101, stack: ofdmStack
node '2', remote: 1102, address: 2, location: [ 1.km, 0.km, -15.m], shell: 5102, web:8102, stack: ofdmStack
}
4 changes: 2 additions & 2 deletions archive/samples/mac/mac-test-rt.groovy
Expand Up @@ -13,7 +13,7 @@ println '''
You can interact with node 1 through :
- http://localhost:8101 (web interface)
- http://localhost:8081 (web interface)
- console shell (command line)
Press stop button (web interface), ^D (command line) to exit.
Expand All @@ -34,7 +34,7 @@ simulate {
}

// define simulation nodes
node "1", location: [rnd(-500.m, 500.m), rnd(-500.m, 500.m), rnd(-20.m, 0)], stack: myStack, shell: CONSOLE, web:"/:8081"
node "1", location: [rnd(-500.m, 500.m), rnd(-500.m, 500.m), rnd(-20.m, 0)], stack: myStack, shell: CONSOLE, web:8081
node "2", location: [rnd(-500.m, 500.m), rnd(-500.m, 500.m), rnd(-20.m, 0)], stack: myStack
node "3", location: [rnd(-500.m, 500.m), rnd(-500.m, 500.m), rnd(-20.m, 0)], stack: myStack
node "4", location: [rnd(-500.m, 500.m), rnd(-500.m, 500.m), rnd(-20.m, 0)], stack: myStack
Expand Down
3 changes: 1 addition & 2 deletions archive/samples/mission2012/mission2012-sim.groovy
Expand Up @@ -48,7 +48,6 @@ channel = [ model: Mission2012Channel ]
// run the simulation forever
simulate {
Mission2012Channel.nodes.each { addr ->
node "$addr", location: Mission2012Channel.nodeLocation[addr],
shell: (5100+addr), web:"/:${8100+addr}", stack: "$home/etc/setup.groovy"
node "$addr", location: Mission2012Channel.nodeLocation[addr], shell: (5100+addr), web:(8100+addr), stack: "$home/etc/setup.groovy"
}
}
2 changes: 1 addition & 1 deletion archive/samples/mission2013/mission2013-sim.groovy
Expand Up @@ -52,6 +52,6 @@ channel = [ model: Mission2013a ]
simulate {
Mission2013a.nodes.each { addr ->
node "$addr", location: Mission2013a.nodeLocation[addr], remote: (1100+addr),
shell: (5100+addr), web:"/:${8100+addr}", stack: "$home/etc/setup.groovy"
shell: (5100+addr), web:(8100+addr), stack: "$home/etc/setup.groovy"
}
}
2 changes: 1 addition & 1 deletion archive/samples/mission2013/mission2013b-sim.groovy
Expand Up @@ -51,6 +51,6 @@ channel = [ model: Mission2013b ]
simulate {
Mission2013b.nodes.each { addr ->
node "$addr", location: Mission2013b.nodeLocation[addr],
shell: (5100+addr), web:"/:${8100+addr}", stack: "$home/etc/setup.groovy"
shell: (5100+addr), web:(8100+addr), stack: "$home/etc/setup.groovy"
}
}
2 changes: 1 addition & 1 deletion archive/samples/param/param-demo.groovy
Expand Up @@ -33,7 +33,7 @@ Press stop button (web interface), ^D (command line) to exit.

// run the simulation forever
simulate {
node '1', address: 1, shell: CONSOLE, web:'/:8101', stack: { container ->
node '1', address: 1, shell: CONSOLE, web:8101, stack: { container ->
container.add 'myAgent', new MyAgent()
}
}
2 changes: 1 addition & 1 deletion archive/samples/ping/ping-sim.groovy
Expand Up @@ -35,7 +35,7 @@ platform = RealTimePlatform

// run simulation forever
simulate {
node '1', address: 1, location: [0, 0, 0], shell: CONSOLE, web:'/:8101', stack: { container ->
node '1', address: 1, location: [0, 0, 0], shell: CONSOLE, web:8101, stack: { container ->
container.add 'ping', new PingDaemon()
container.shell.addInitrc "${script.parent}/fshrc.groovy"
container.websh.addInitrc "${script.parent}/fshrc.groovy"
Expand Down
6 changes: 3 additions & 3 deletions archive/samples/rt/3-node-network.groovy
Expand Up @@ -43,7 +43,7 @@ platform = RealTimePlatform // use real-time mode

// run the simulation forever
simulate {
node '1', remote: 1101, address: 1, location: [ 0.km, 0.km, -15.m], shell: true, web:'/:8101', stack: "$home/etc/setup"
node '2', remote: 1102, address: 2, location: [ 1.km, 0.km, -15.m], shell: 5102, web:'/:8102', stack: "$home/etc/setup"
node '3', remote: 1103, address: 3, location: [-1.km, 0.km, -15.m], shell: 5103, web:'/:8103', stack: "$home/etc/setup"
node '1', remote: 1101, address: 1, location: [ 0.km, 0.km, -15.m], shell: true, web:8101, stack: "$home/etc/setup"
node '2', remote: 1102, address: 2, location: [ 1.km, 0.km, -15.m], shell: 5102, web:8102, stack: "$home/etc/setup"
node '3', remote: 1103, address: 3, location: [-1.km, 0.km, -15.m], shell: 5103, web:8103, stack: "$home/etc/setup"
}

0 comments on commit 0a5a39e

Please sign in to comment.