Compound Module SubHost

Package: pubsub_sim
File: src/SubHost.ned

The Subscriber Host

This is the subscriber host for the publish subscribe simulation. This host only has a MAC and an application layer. No IP or other network layer protocol is involved. Multiple application can be used, but each will use a different ethernet interface, therefore, it will be characterized by a different FID. This host is only capable of subscribing to Information Items, and receives packets which are afterwards treated as in a sink.The InterfaceTable, the FwTable and the NotificationBoard modules are present in order for the LinkMon module to access the necessary information, needed by the TM.

See also: SEtherApp, PEtherApp, EthernetInterface2

Author: Nikolaos Vastardis

NotificationBoard InterfaceTable FwTable LinkMon SEtherApp EthernetInterfaceThrMtr

Networks:

ICN_Net (network)

The ICN Simulation Ground

ICN_Network (network)

The ICN Simulation Ground

Properties:

Name Value Description
node
labels node
display i=device/pc2;bgb=455,313

Gates:

Name Direction Size Description
ethg [ ] inout

Unassigned submodule parameters:

Name Type Default value Description
fwTable.routerId string "auto"

for routers, the router id using IP address dotted notation; specify "auto" to select the highest interface address; should be left empty ("") for hosts

fwTable.IPForward bool true

turns IP forwarding on/off

fwTable.routingFile string ""

routing table file name

linkMon.pollInt double uniform(1s,2s)

Interval between polling for statistics

linkMon.reportInt double 5s

Interval between sending reports to the TM

sub.actPeak double 30s

The time period the application mainly active

sub.datarate int 10Mbps

The datarate of each stream from the publisher

sub.subInterval double 10s

time of choosing a subscriber to satisfy

eth.mac.promiscuous bool false

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

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

eth.mac.mtu int 1500
eth.thruputMeter.startTime double 0s
eth.thruputMeter.batchSize int 10000
eth.thruputMeter.maxInterval double 1s

Source code:

//
// <b> The Subscriber Host </b>
//
// This is the subscriber host for the publish subscribe simulation. This host only
// has a MAC and an application layer. No IP or other network layer protocol 
// is involved. Multiple application can be used, but each will use a different
// ethernet interface, therefore, it will be characterized by a different FID.
// This host is only capable of subscribing to Information Items, and receives
// packets which are afterwards treated as in a sink.The InterfaceTable, the 
// FwTable and the NotificationBoard modules are present in order for the LinkMon
// module to access the necessary information, needed by the TM. 
//
//
// @see SEtherApp, PEtherApp, EthernetInterface2
//
// @author Nikolaos Vastardis
//
module SubHost
{
    parameters:
        @node();
        @labels(node,ethernet-node);
        @display("i=device/pc2;bgb=455,313");
    gates:
        inout ethg[] @labels(EtherFrame-conn);

    submodules:
        notificationBoard: NotificationBoard {
            parameters:
                @display("p=77,56");
        }
        interfaceTable: InterfaceTable {
            parameters:
                @display("p=224,56");
        }
        fwTable: FwTable {
            @display("p=383,56");
        }
        linkMon: LinkMon {
            @display("p=77,171");
        }
        sub[sizeof(ethg)]: SEtherApp {
            parameters:
                @display("p=224,165,col");
            gates:
                ifIn[1];
                ifOut[1];
        }
        eth[sizeof(ethg)]: EthernetInterfaceThrMtr {
            parameters:
                @display("p=224,256,row;q=l2queue");
        }
    connections allowunconnected:
        for i=0..sizeof(ethg)-1 {
            ethg[i] <--> eth[i].phys;

            eth[i].netwOut --> sub[i].ifIn[0];
            eth[i].netwIn <-- sub[i].ifOut[0];
        }
}