Skip to content

Commit

Permalink
Fixed a bug in the mobility example.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornig committed Aug 28, 2009
1 parent b81d331 commit 2a75cda
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/adhoc/mobility/MobileNet.ned
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ network MobileNet
submodules:
host[numHosts]: PlainMobilityHost {
parameters:
@display("r=,,#707070");
@display("p=300,300;r=,,#707070");
}
channelcontrol: ChannelControl {
parameters:
Expand Down
3 changes: 3 additions & 0 deletions examples/adhoc/mobility/PlainMobilityHost.ned
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module PlainMobilityHost
@node();
string mobilityType;
@display("i=device/pocketpc_s");
gates:
input radioIn @directIn;
submodules:
notificationBoard: NotificationBoard {
parameters:
Expand All @@ -44,5 +46,6 @@ module PlainMobilityHost
parameters:
@display("p=132,141");
}
connections allowunconnected:
}

10 changes: 10 additions & 0 deletions examples/adhoc/mobility/omnetpp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ tkenv-plugin-path = ../../../etc/plugins
**.host*.mobility.y = -1
**.scenarioManager.script = xmldoc("empty.xml")

[Config NullMobility]
*.numHosts = 2
**.host*.mobilityType = "NullMobility"
# place it at a fixed position
**.host[0].mobility.x = 50
**.host[0].mobility.y = 200
# the second node is using the display string position (or placed randomly if position is not present in display string)
**.host[1].mobility.x = -1
**.host[1].mobility.y = -1

[Config LinearMobility]
**.host*.mobilityType = "LinearMobility"
**.host*.mobility.speed = 50mps
Expand Down

0 comments on commit 2a75cda

Please sign in to comment.