Skip to content
Permalink
Browse files

fix(samples): making samples work with unetstack3

  • Loading branch information...
notthetup authored and mchitre committed Sep 15, 2019
1 parent 3f84261 commit 0a5a39e162d04723a76dcf3263b4b41d764511f4
@@ -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
}
@@ -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.
@@ -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
@@ -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"
}
}
@@ -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"
}
}
@@ -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"
}
}
@@ -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()
}
}
@@ -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"
@@ -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.
You can’t perform that action at this time.