Compound Module SmallLAN

Package: inet.examples.ethernet.lans
File: examples/ethernet/lans/LargeNet.ned

Several hosts on an Ethernet hub

EtherHub EtherHost

Usage diagram:

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram. Click here to see the full picture.

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram. Click here to see the full picture.

Networks:

LargeNet (network)

A large Ethernet LAN -- see model description here.

Parameters:

Name Type Default value Description
h int

number of hosts on the hub

Properties:

Name Value Description
display i=cloud_s

Gates:

Name Direction Size Description
ethg inout

Unassigned submodule parameters:

Name Type Default value Description
host.cli.destAddress string ""

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

host.cli.startTime double this.waitTime

time of sending the first request

host.cli.waitTime double uniform(0s,1s)

interval between sending requests

host.cli.reqLength int 100B

length of request packets

host.cli.respLength int 1KB

length of response packets

host.mac.promiscuous bool false

if true, all packets are received, otherwise only the ones with matching destination MAC address

host.mac.address string "auto"

MAC address as hex string (12 hex digits), or "auto". "auto" values will be replaced by a generated MAC address in init stage 0.

host.mac.txrate double 100Mbps

maximum data rate supported by this station (bit/s); actually chosen speed may be lower due to auto- configuration. 0 means fully auto-configured.

host.mac.duplexEnabled bool true

whether duplex mode can be enabled or not; whether MAC will actually use duplex mode depends on the result of the auto-configuration process (duplex is only possible with DTE-to-DTE connection).

host.mac.txQueueLimit int 1000

maximum number of frames queued up for transmission; additional frames are dropped. Only used if queueModule==""

host.mac.mtu int 1500

Source code:

//
// Several hosts on an Ethernet hub
//
module SmallLAN
{
    parameters:
        int h; // number of hosts on the hub
        @display("i=cloud_s");
    gates:
        inout ethg;
    submodules:
        hub: EtherHub {
            @display("is=s");
        }
        host[h]: EtherHost {
            @display("is=s");
        }
    connections:
        for i=0..h-1 {
            hub.ethg++ <--> cable <--> host[i].ethg;
        }
        hub.ethg++ <--> ethg;
}