From 2a75cda17980bbd6ecc671b1b1c3d4e58c5f5bf9 Mon Sep 17 00:00:00 2001 From: Rudolf Hornig Date: Fri, 28 Aug 2009 12:48:40 +0200 Subject: [PATCH] Fixed a bug in the mobility example. --- examples/adhoc/mobility/MobileNet.ned | 2 +- examples/adhoc/mobility/PlainMobilityHost.ned | 3 +++ examples/adhoc/mobility/omnetpp.ini | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/adhoc/mobility/MobileNet.ned b/examples/adhoc/mobility/MobileNet.ned index 2b7be51c3d8..dbe124afed2 100644 --- a/examples/adhoc/mobility/MobileNet.ned +++ b/examples/adhoc/mobility/MobileNet.ned @@ -34,7 +34,7 @@ network MobileNet submodules: host[numHosts]: PlainMobilityHost { parameters: - @display("r=,,#707070"); + @display("p=300,300;r=,,#707070"); } channelcontrol: ChannelControl { parameters: diff --git a/examples/adhoc/mobility/PlainMobilityHost.ned b/examples/adhoc/mobility/PlainMobilityHost.ned index f00583ce1a7..f5ec4fe7435 100644 --- a/examples/adhoc/mobility/PlainMobilityHost.ned +++ b/examples/adhoc/mobility/PlainMobilityHost.ned @@ -35,6 +35,8 @@ module PlainMobilityHost @node(); string mobilityType; @display("i=device/pocketpc_s"); + gates: + input radioIn @directIn; submodules: notificationBoard: NotificationBoard { parameters: @@ -44,5 +46,6 @@ module PlainMobilityHost parameters: @display("p=132,141"); } + connections allowunconnected: } diff --git a/examples/adhoc/mobility/omnetpp.ini b/examples/adhoc/mobility/omnetpp.ini index 2c74c8ed502..84ab59f7598 100644 --- a/examples/adhoc/mobility/omnetpp.ini +++ b/examples/adhoc/mobility/omnetpp.ini @@ -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