Package: inet.tutorials.queueing
InputQueueSwitching
network(no description)
Usage diagram
The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| numSources | int | ||
| numSinks | int |
Properties
| Name | Value | Description |
|---|---|---|
| isNetwork |
Unassigned submodule parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| source.displayStringTextFormat | string | "created %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| source.packetNameFormat | string | "%a-%c" |
See directives in module documentation |
| source.packetRepresentation | string | "byteCount" |
Determines the chunk of the packet data |
| source.packetProtocol | string | "unknown" | |
| source.packetLength | int | ||
| source.packetData | int | -1 | |
| source.attachCreationTimeTag | bool | true | |
| source.attachIdentityTag | bool | true | |
| source.attachDirectionTag | bool | true | |
| source.clockModule | string | "" |
Relative path of a module that implements IClock(1,2); optional |
| source.initialProductionOffset | double | -1s |
Initial duration before which packets are not produced. When negative, then produce packet in initialize() |
| source.productionInterval | double |
Elapsed time between subsequent packets pushed to the connected packet consumer |
|
| source.scheduleForAbsoluteTime | bool | true |
When a clock is used, "relative" means that setting the clock will not affect the simulation time of the event |
| sourceTx.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| sourceTx.clockModule | string | "" |
Relative path of a module that implements IClock(1,2); optional |
| sourceTx.datarate | double | ||
| switchRx.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| switchRx.datarate | double | ||
| queue.displayStringTextFormat | string | "contains %p pk (%l) pushed %u\npulled %o removed %r dropped %d" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| queue.packetCapacity | int | -1 |
Maximum number of packets in the queue, no limit by default |
| queue.dataCapacity | int | -1b |
Maximum total length of packets in the queue, no limit by default |
| queue.dropperClass | string | "" |
Determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class |
| queue.comparatorClass | string | "" |
Determines the order of packets in the queue, insertion order by default; the parameter must be the name of a C++ class which implements the IPacketComparatorFunction C++ interface and is registered via Register_Class |
| queue.bufferModule | string | "" |
Relative module path to the IPacketBuffer module used by this queue, implicit buffer by default |
| server.displayStringTextFormat | string | "served %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| server.serveSchedulingPriority | int | -1 |
Specifies the FES scheduling priority for the extra event that is pulling the packet, -1 means no extra event |
| join.displayStringTextFormat | string | "passed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| join.forwardServiceRegistration | bool | true | |
| join.forwardProtocolRegistration | bool | true | |
| classifier.displayStringTextFormat | string | "classified %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| classifier.reverseOrder | bool | false | |
| classifier.defaultGateIndex | int | 0 |
Default gate index if no matching labels are found |
| classifier.packetFilters | object |
Array of packet filter expressions |
|
| switchTx.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| switchTx.clockModule | string | "" |
Relative path of a module that implements IClock(1,2); optional |
| switchTx.datarate | double | ||
| sinkRx.displayStringTextFormat | string | "processed %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| sinkRx.datarate | double | ||
| sink.displayStringTextFormat | string | "received %p pk (%l)" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
| sink.clockModule | string | "" |
Relative path of a module that implements IClock(1,2); optional |
| sink.initialConsumptionOffset | double | 0s |
Initial duration before which packets are not consumed |
| sink.consumptionInterval | double | 0s |
Elapsed time between subsequent packets allowed to be pushed by the connected packet producer, 0 means any number of packets can be pushed at the same simulation time |
| sink.scheduleForAbsoluteTime | bool | true |
When a clock is used, "relative" means that setting the clock will not affect the simulation time of the event |
Source code
network InputQueueSwitching { parameters: int numSources; int numSinks; submodules: source[numSources]: ActivePacketSource { @display("p=100,150,col,150"); } sourceTx[numSources]: PacketTransmitter { @display("p=300,150,col,150"); } switchRx[numSources]: PacketReceiver { @display("p=500,150,col,150"); } queue[numSources]: PacketQueue { @display("p=700,150,col,150"); } server[numSources]: InstantServer { @display("p=900,150,col,150"); } join: PacketMultiplexer { @display("p=1100,150"); } classifier: ContentBasedClassifier { @display("p=1300,150"); } switchTx[numSinks]: PacketTransmitter { @display("p=1500,150,col,150"); } sinkRx[numSinks]: PacketReceiver { @display("p=1700,150,col,150"); } sink[numSinks]: PassivePacketSink { @display("p=1900,150,col,150"); } connections: for i=0..numSources-1 { source[i].out --> sourceTx[i].in; sourceTx[i].out --> { datarate = 1Gbps; delay = 1ns; } --> switchRx[i].in; switchRx[i].out --> queue[i].in; queue[i].out --> server[i].in; server[i].out --> join.in++; } join.out --> classifier.in; for i=0..numSinks-1 { classifier.out++ --> switchTx[i].in; switchTx[i].out --> { datarate = 1Gbps; delay = 1ns; } --> sinkRx[i].in; sinkRx[i].out --> sink[i].in; } } //-------------------------------------------------File: tutorials/queueing/QueueingTutorial.ned