ExampleHost

Package: inet.tutorials.queueing

ExampleHost

compound module

(no description)

sourceApplication : ActivePacketSource

An active packet source which pushes packets into the connected module.

Source:
sourceApplication: ActivePacketSource {
    @display("p=100,100");
} destinationApplication : PassivePacketSink

A passive packet sink which is pushed with packets by the connected packet producer.

Source:
destinationApplication: PassivePacketSink {
    @display("p=300,100");
} interface : ExampleInterface

Source:
interface: ExampleInterface {
    @display("p=200,200");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Used in

Name Type Description
ExampleNetworkTutorialStep network (no description)

Properties

Name Value Description
display i=device/pc

Gates

Name Direction Size Description
lowerIn input
lowerOut output

Unassigned submodule parameters

Name Type Default value Description
sourceApplication.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

sourceApplication.packetNameFormat string "%a-%c"

See directives in module documentation

sourceApplication.packetRepresentation string "byteCount"

Determines the chunk of the packet data

sourceApplication.packetProtocol string "unknown"
sourceApplication.packetLength int
sourceApplication.packetData int -1
sourceApplication.attachCreationTimeTag bool true
sourceApplication.attachIdentityTag bool true
sourceApplication.attachDirectionTag bool true
sourceApplication.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

sourceApplication.initialProductionOffset double -1s

Initial duration before which packets are not produced. When negative, then produce packet in initialize()

sourceApplication.productionInterval double

Elapsed time between subsequent packets pushed to the connected packet consumer

sourceApplication.scheduleForAbsoluteTime bool true

When a clock is used, "relative" means that setting the clock will not affect the simulation time of the event

destinationApplication.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

destinationApplication.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

destinationApplication.initialConsumptionOffset double 0s

Initial duration before which packets are not consumed

destinationApplication.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

destinationApplication.scheduleForAbsoluteTime bool true

When a clock is used, "relative" means that setting the clock will not affect the simulation time of the event

interface.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

interface.queue.packetCapacity int -1

Maximum number of packets in the queue, no limit by default

interface.queue.dataCapacity int -1b

Maximum total length of packets in the queue, no limit by default

interface.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

interface.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

interface.queue.bufferModule string ""

Relative module path to the IPacketBuffer module used by this queue, implicit buffer by default

interface.server.displayStringTextFormat string "served %p pk (%l)\n%s"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

interface.server.clockModule string ""

Relative path of a module that implements IClock(1,2); optional

interface.server.serveSchedulingPriority int -1

Specifies the FES scheduling priority for the extra event that is pulling the packet, -1 means no extra event

interface.server.processingTime double

Determines additional processing time per packet

interface.server.processingBitrate double inf bps

Determines additional processing time per bit

Source code

module ExampleHost
{
    parameters:
        @display("i=device/pc");
    gates:
        input lowerIn;
        output lowerOut;
    submodules:
        sourceApplication: ActivePacketSource {
            @display("p=100,100");
        }
        destinationApplication: PassivePacketSink {
            @display("p=300,100");
        }
        interface: ExampleInterface {
            @display("p=200,200");
        }
    connections:
        sourceApplication.out --> interface.upperIn;
        interface.lowerOut --> lowerOut;
        lowerIn --> interface.lowerIn;
        interface.upperOut --> destinationApplication.in;
}

//-------------------------------------------------


File: tutorials/queueing/QueueingTutorial.ned