Skip to content

Instantly share code, notes, and snippets.

@ymirpl
Created February 25, 2012 11:48
Show Gist options
  • Save ymirpl/1908042 to your computer and use it in GitHub Desktop.
Save ymirpl/1908042 to your computer and use it in GitHub Desktop.
PPPInterfaceWithDLULThruputMeter
package inet.linklayer.ppp;
import inet.base.PppGAL;
import inet.networklayer.queue.OutputQueue;
//
// \PPP interface. Complements the PPP module with an output queue
// for QoS and RED support.
//
// @see PPPInterfaceNoQueue
//
module PPPInterfaceWithDLULThruputMeter
{
parameters:
string queueType = default("DropTailQueue");
@display("i=block/ifcard;bgb=148,263");
gates:
input netwIn;
output netwOut;
inout phys;
submodules:
queue: <queueType> like OutputQueue {
parameters:
@display("p=47,87;q=l2queue");
}
ppp: PPP {
parameters:
queueModule = "queue";
txQueueLimit = 1; // queue sends one packet at a time
@display("p=108,199");
}
thruputMeterUL: ThruputMeter {
@display("p=47,140");
}
thruputMeterDL: ThruputMeter {
@display("p=120,81");
}
pppGAL: PppGAL {
@display("p=93,30");
}
connections:
netwIn --> { @display("m=n"); } --> queue.in;
queue.out --> thruputMeterUL.in;
thruputMeterUL.out --> ppp.netwIn;
netwOut <-- thruputMeterDL.out;
thruputMeterDL.in <-- { @display("m=n"); } <-- ppp.netwOut;
phys <--> { @display("m=s"); } <--> ppp.phys;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment