123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- package inet.examples.wireless.ratecontrol;
- import inet.applications.ethernet.EtherAppCli;
- import inet.common.queue.Sink;
- import inet.environment.common.PhysicalEnvironment;
- import inet.linklayer.ieee80211.Ieee80211Nic;
- import inet.mobility.single.RectangleMobility;
- import inet.physicallayer.ieee80211.packetlevel.Ieee80211ScalarRadioMedium;
- module SinkClient
- {
- parameters:
- @networkNode();
- @labels(node);
- @display("i=device/cellphone");
- *.interfaceTableModule = default("");
- gates:
- input radioIn @directIn;
- submodules:
- sink: Sink {
- parameters:
- @display("p=169,124");
- }
- wlan: Ieee80211Nic {
- parameters:
- @display("p=89,225;q=queue");
- mgmtType = default("Ieee80211MgmtAdhoc");
- }
- mobility: RectangleMobility {
- parameters:
- @display("p=71,121");
- }
- connections allowunconnected:
- radioIn --> { @display("m=s"); } --> wlan.radioIn;
- wlan.upperLayerOut --> sink.in++;
- }
- module Client
- {
- parameters:
- @display("i=device/wifilaptop");
- @networkNode();
- *.interfaceTableModule = "";
- gates:
- input radioIn @directIn;
- submodules:
- cli: EtherAppCli {
- parameters:
- registerSAP = false;
- @display("b=40,24;p=180,60,col");
- }
- wlan: Ieee80211Nic {
- parameters:
- @display("p=112,134;q=queue");
- mgmtType = default("Ieee80211MgmtAdhoc");
- }
- mobility: RectangleMobility {
- parameters:
- @display("p=50,141");
- }
- connections allowunconnected:
- wlan.radioIn <-- radioIn;
- cli.out --> wlan.upperLayerIn;
- }
- network RateControlTest
- {
- parameters:
- int numCli;
- @display("b=297,203;bgb=1300,460");
- submodules:
- cliHost[numCli]: Client {
- parameters:
- @display("r=,,#707070");
- }
- sinkClient: SinkClient {
- parameters:
- @display("p=200,200;r=,,#707070");
- }
- physicalEnvironment: PhysicalEnvironment {
- parameters:
- @display("p=50,50");
- }
- radioMedium: Ieee80211ScalarRadioMedium {
- parameters:
- @display("p=61,46");
- }
- }
|