TestArea

Package: inet.examples.ospfv2.areatests

TestArea

compound module

(no description)

StandardHost EthernetSwitch OspfRouter OspfRouter

Usage diagram

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

Used in

Name Type Description
OSPF_BackboneAndOneStubTest network (no description)
OSPF_BackboneAndTwoStubsTest network (no description)
OSPF_BackboneTest network (no description)

Parameters

Name Type Default value Description
numHosts int 3
extGates int 0

Properties

Name Value Description
display p=10,10;b=412,316

Gates

Name Direction Size Description
ethg [ ] inout extGates

Unassigned submodule parameters

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

TODO @signal, @statistic

H.pcapRecorder.verbose bool true

whether to log packets on the module output

H.pcapRecorder.pcapFile string ""

the PCAP file to be written

H.pcapRecorder.fileFormat string "pcapng"
H.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

H.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

H.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

H.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

H.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

H.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

H.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

H.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

H.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

H.pcapRecorder.displayStringTextFormat string "rec: %n pks"
H.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

H.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

H.cb.forwardServiceRegistration bool true
H.cb.forwardProtocolRegistration bool true
H.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

H.bl.forwardServiceRegistration bool true
H.bl.forwardProtocolRegistration bool true
H.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

H.li.forwardServiceRegistration bool true
H.li.forwardProtocolRegistration bool true
H.eth.bitrate double
H.nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

H.nl.forwardServiceRegistration bool true
H.nl.forwardProtocolRegistration bool true
H.tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

H.tn.forwardServiceRegistration bool true
H.tn.forwardProtocolRegistration bool true
H.at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

H.at.forwardServiceRegistration bool true
H.at.forwardProtocolRegistration bool true
N.macTable.agingTime double
N.macTable.forwardingTableFile string
N.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

N.l2NodeConfigurator.interfaceTableModule string
N.l2NodeConfigurator.l2ConfiguratorModule string "l2NetworkConfigurator"

the absolute path to the ~L2NetworkConfigurator; use "" if there is no configurator

N.status.initialStatus string "UP"

TODO @signal, @statistic

N.pcapRecorder.verbose bool true

whether to log packets on the module output

N.pcapRecorder.pcapFile string ""

the PCAP file to be written

N.pcapRecorder.fileFormat string "pcapng"
N.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

N.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

N.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

N.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

N.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

N.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

N.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

N.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

N.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

N.pcapRecorder.displayStringTextFormat string "rec: %n pks"
N.stp.helloTime double
N.stp.forwardDelay double
N.stp.maxAge double
N.stp.bridgePriority int
N.stp.visualize bool
N.sc.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

N.sc.forwardServiceRegistration bool true
N.sc.forwardProtocolRegistration bool true
N.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

N.cb.forwardServiceRegistration bool true
N.cb.forwardProtocolRegistration bool true
N.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

N.bl.forwardServiceRegistration bool true
N.bl.forwardProtocolRegistration bool true
N.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

N.li.forwardServiceRegistration bool true
N.li.forwardProtocolRegistration bool true
N.cutthrough.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

N.cutthrough.forwardServiceRegistration bool true
N.cutthrough.forwardProtocolRegistration bool true
N.eth.bitrate double
R.status.initialStatus string "UP"

TODO @signal, @statistic

R.pcapRecorder.verbose bool true

whether to log packets on the module output

R.pcapRecorder.pcapFile string ""

the PCAP file to be written

R.pcapRecorder.fileFormat string "pcapng"
R.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

R.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

R.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

R.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

R.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

R.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

R.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

R.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

R.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

R.pcapRecorder.displayStringTextFormat string "rec: %n pks"
R.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

R.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

R.cb.forwardServiceRegistration bool true
R.cb.forwardProtocolRegistration bool true
R.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

R.bl.forwardServiceRegistration bool true
R.bl.forwardProtocolRegistration bool true
R.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

R.li.forwardServiceRegistration bool true
R.li.forwardProtocolRegistration bool true
R.eth.bitrate double
R.nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

R.nl.forwardServiceRegistration bool true
R.nl.forwardProtocolRegistration bool true
R.tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

R.tn.forwardServiceRegistration bool true
R.tn.forwardProtocolRegistration bool true
R.at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

R.at.forwardServiceRegistration bool true
R.at.forwardProtocolRegistration bool true
R.bgp.interfaceTableModule string

The path to the InterfaceTable module

R.bgp.routingTableModule string
R.bgp.ospfRoutingModule string parent.hasOspf ? "^.ospf" : ""
B.status.initialStatus string "UP"

TODO @signal, @statistic

B.pcapRecorder.verbose bool true

whether to log packets on the module output

B.pcapRecorder.pcapFile string ""

the PCAP file to be written

B.pcapRecorder.fileFormat string "pcapng"
B.pcapRecorder.snaplen int 65535

maximum number of bytes to record per packet

B.pcapRecorder.dumpBadFrames bool true

enable dump of frames with hasBitError

B.pcapRecorder.moduleNamePatterns string "wlan[*] eth[*] ppp[*]"

space-separated list of sibling module names to listen on

B.pcapRecorder.sendingSignalNames string "packetSentToLower"

space-separated list of outbound packet signals to subscribe to

B.pcapRecorder.receivingSignalNames string "packetReceivedFromLower"

space-separated list of inbound packet signals to subscribe to

B.pcapRecorder.dumpProtocols string "ethernetmac ppp ieee80211mac"

space-separated list of protocol names as defined in the Protocol class

B.pcapRecorder.packetFilter object "*"

which packets are considered, matches all packets by default

B.pcapRecorder.helpers string ""

usable PcapRecorder::IHelper helpers for accept packettype and store/convert packet as specified linktype currently available: "inet::AckingMacToEthernetPcapRecorderHelper"

B.pcapRecorder.alwaysFlush bool false

flush the pcapFile after each write to ensure that all packets are captured in case of a crash

B.pcapRecorder.displayStringTextFormat string "rec: %n pks"
B.interfaceTable.displayAddresses bool false

whether to display IP addresses on links

B.cb.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

B.cb.forwardServiceRegistration bool true
B.cb.forwardProtocolRegistration bool true
B.bl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

B.bl.forwardServiceRegistration bool true
B.bl.forwardProtocolRegistration bool true
B.li.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

B.li.forwardServiceRegistration bool true
B.li.forwardProtocolRegistration bool true
B.eth.bitrate double
B.nl.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

B.nl.forwardServiceRegistration bool true
B.nl.forwardProtocolRegistration bool true
B.tn.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

B.tn.forwardServiceRegistration bool true
B.tn.forwardProtocolRegistration bool true
B.at.displayStringTextFormat string "processed %p pk (%l)"

determines the text that is written on top of the submodule

B.at.forwardServiceRegistration bool true
B.at.forwardProtocolRegistration bool true
B.bgp.interfaceTableModule string

The path to the InterfaceTable module

B.bgp.routingTableModule string
B.bgp.ospfRoutingModule string parent.hasOspf ? "^.ospf" : ""

Source code

module TestArea
{
    parameters:
        @display("p=10,10;b=412,316");
        int numHosts = default(3);
        int extGates = default(0);
    gates:
        inout ethg[extGates];
    types:
        channel C extends ThruputMeteringChannel
        {
            delay = 0.1us;
            datarate = 100Mbps;
            thruputDisplayFormat = "#N";
        }
    submodules:
        H[numHosts]: StandardHost {
            @display("i=device/laptop;p=100,400,row,100");
        }
        N[numHosts]: EthernetSwitch {
            @display("p=100,300,row,100");
        }
        R[numHosts]: OspfRouter {
            @display("p=100,200,row,100");
        }
        B[extGates]: OspfRouter {
            @display("p=100,100,row,100");
        }
    connections:
        // host to router links
        for i=0..numHosts-1 {
            H[i].ethg++ <--> C <--> N[i].ethg++;
            R[i].ethg++ <--> C <--> N[i].ethg++;
        }

        // towards other areas
        for i=0..extGates-1 {
            ethg[i] <--> B[i].ethg++;
        }

        // ring of routers
        for i=1..numHosts-1 {
            R[i].ethg++ <--> C <--> R[i-1].ethg++;
        }
        for i=1..extGates-1 {
            B[i].ethg++ <--> C <--> B[i-1].ethg++;
        }
        R[0].ethg++ <--> C <--> R[numHosts-1].ethg++ if numHosts > 2 && extGates == 0;
        B[0].ethg++ <--> C <--> B[extGates-1].ethg++ if numHosts == 0 && extGates > 2;
        R[0].ethg++ <--> C <--> B[extGates-1].ethg++ if numHosts > 0 && extGates > 0;
        B[0].ethg++ <--> C <--> R[numHosts-1].ethg++ if numHosts > 0 && extGates > 0 && (numHosts+extGates > 2);
}
File: examples/ospfv2/areatests/TestArea.ned