HostsWithHub

Package: inet.tests.ethernet

HostsWithHub

network

(no description)

hostA : EthernetHost2

An example host with one Ethernet interface and an Ethernet traffic generator directly connected to...

Source:
hostA: EthernetHost2 {
    parameters:
        @display("p=80,200");
} hostB : EthernetHost2

An example host with one Ethernet interface and an Ethernet traffic generator directly connected to...

Source:
hostB: EthernetHost2 {
    parameters:
        @display("p=200,200");
} hostC : EthernetHost2

An example host with one Ethernet interface and an Ethernet traffic generator directly connected to...

Source:
hostC: EthernetHost2 {
    parameters:
        @display("p=320,200");
} hub : EthernetHub

A simple Ethernet hub device that operates at the physical layer.

Source:
hub: EthernetHub {
    parameters:
        @display("p=200,80");
} scenarioManager : ScenarioManager

~ScenarioManager is for setting up and controlling simulation experiments.

Source:
scenarioManager: ScenarioManager {
    parameters:
        script = default(xml("<empty/>"));
        @display("p=80,40");
}

Usage diagram

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

Properties

Name Value Description
isNetwork

Unassigned submodule parameters

Name Type Default value Description
hostA.app.displayStringTextFormat string ""

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

hostA.app.destAddress string ""

Destination MAC address, or module path name of destination station; empty means off

hostA.app.interfaceTableModule string
hostA.app.ssap int -1

Llc ssap to set on outgoing packets

hostA.app.dsap int -1

Llc dsap to set on outgoing packets

hostA.app.startTime double this.sendInterval

Time of sending the first packet

hostA.app.stopTime double -1s

Time of finishing sending, negative values mean forever

hostA.app.sendInterval double

Interval between sending bursts

hostA.app.numPacketsPerBurst int 1

Number of packets to send per burst (packets within a burst are sent at the same simulation time)

hostA.app.packetLength int

Length of packets to send

hostA.app.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostA.app.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostA.interfaceTable.displayStringTextFormat string ""

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

hostA.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

hostA.eth.bitrate double
hostB.app.displayStringTextFormat string ""

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

hostB.app.destAddress string ""

Destination MAC address, or module path name of destination station; empty means off

hostB.app.interfaceTableModule string
hostB.app.ssap int -1

Llc ssap to set on outgoing packets

hostB.app.dsap int -1

Llc dsap to set on outgoing packets

hostB.app.startTime double this.sendInterval

Time of sending the first packet

hostB.app.stopTime double -1s

Time of finishing sending, negative values mean forever

hostB.app.sendInterval double

Interval between sending bursts

hostB.app.numPacketsPerBurst int 1

Number of packets to send per burst (packets within a burst are sent at the same simulation time)

hostB.app.packetLength int

Length of packets to send

hostB.app.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostB.app.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostB.interfaceTable.displayStringTextFormat string ""

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

hostB.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

hostB.eth.bitrate double
hostC.app.displayStringTextFormat string ""

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

hostC.app.destAddress string ""

Destination MAC address, or module path name of destination station; empty means off

hostC.app.interfaceTableModule string
hostC.app.ssap int -1

Llc ssap to set on outgoing packets

hostC.app.dsap int -1

Llc dsap to set on outgoing packets

hostC.app.startTime double this.sendInterval

Time of sending the first packet

hostC.app.stopTime double -1s

Time of finishing sending, negative values mean forever

hostC.app.sendInterval double

Interval between sending bursts

hostC.app.numPacketsPerBurst int 1

Number of packets to send per burst (packets within a burst are sent at the same simulation time)

hostC.app.packetLength int

Length of packets to send

hostC.app.stopOperationExtraTime double -1s

Extra time after lifecycle stop operation finished

hostC.app.stopOperationTimeout double 2s

Timeout value for lifecycle stop operation

hostC.interfaceTable.displayStringTextFormat string ""

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

hostC.interfaceTable.displayAddresses bool false

Whether to display IP addresses on links

hostC.eth.bitrate double
hub.displayStringTextFormat string ""

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

scenarioManager.displayStringTextFormat string "total %c changes, %l left\nnext at: %t"

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

scenarioManager.script xml xml("")

Source code

network HostsWithHub
{
    submodules:
        hostA: EthernetHost2 {
            parameters:
                @display("p=80,200");
        }
        hostB: EthernetHost2 {
            parameters:
                @display("p=200,200");
        }
        hostC: EthernetHost2 {
            parameters:
                @display("p=320,200");
        }
        hub: EthernetHub {
            parameters:
                @display("p=200,80");
        }
        scenarioManager: ScenarioManager {
            parameters:
                script = default(xml("<empty/>"));
                @display("p=80,40");
        }
    connections:
        hub.ethg++ <--> DatarateChannel <--> hostA.ethg;
        hub.ethg++ <--> DatarateChannel <--> hostB.ethg;
        hub.ethg++ <--> DatarateChannel <--> hostC.ethg;
}
File: tests/networks/ethernet/network-hub.ned