Compound Module SmallLAN

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

Several hosts on an Ethernet hub; part of LargeNet(1,2).

EtherHub EtherHost

Usage diagram:

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

Inheritance diagram:

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Networks:

Name Type Description
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=old/cloud_s

Gates:

Name Direction Size Description
ethg inout

Unassigned submodule parameters:

Name Type Default value Description
host.status.initialStatus string "UP"

TODO @signal, @statistic

host.cli.destAddress string ""

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

host.cli.startTime double this.sendInterval

time of sending the first request

host.cli.stopTime double -1s

time of finishing sending, negative values mean forever

host.cli.localSAP int 0xf0
host.cli.remoteSAP int 0xf1
host.cli.sendInterval double uniform(0s,1s)

interval between sending requests

host.cli.reqLength int 100B

length of request packets

host.cli.respLength int 1KiB

length of response packets

host.srv.localSAP int 0xf1
host.queue.pauseQueue.frameCapacity int 100
host.mac.promiscuous bool

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

host.mac.address string

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.duplexMode bool

selects full-duplex (true) or half-duplex (false) operation

host.mac.txQueueLimit int

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

host.mac.mtu int

Source code:

//
// Several hosts on an Ethernet hub; part of ~LargeNet.
//
module SmallLAN
{
    parameters:
        int h; // number of hosts on the hub
        @display("i=old/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;
}