Compound Module PubHost

Package: pubsub_sim
File: src/PubHost.ned

The Publisher Host

This is the publisher 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 publishing and Information Items, and transmits packets according to the published Information Item scopes and IDs. 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: PEtherApp, SEtherApp, EthernetInterface2

Author: Nikolaos Vastardis

NotificationBoard InterfaceTable FwTable LinkMon PEtherApp 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

pub.actPeak double 30s

The time period the application mainly active

pub.datarate int 10Mbps

The datarate of each stream from the publisher

pub.destAddress string "FF:FF:FF:FF:FF:FF"

destination MAC address, preferably broadcast

pub.startTime double this.waitTime

time of sending the first request

pub.pubInterval double 10s

time interval of making a new publication

pub.waitInterval double uniform(0s,1s)

interval between sending requests

pub.reqLength int 100B

length of request packets

pub.respLength int 1KB

length of response packets

pub.fileSize int 20Mb

the max size of the published files

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 Publisher Host </b>
//
// This is the publisher 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 publishing and Information Items, and transmits
// packets according to the published Information Item scopes and IDs. 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 PEtherApp, SEtherApp, EthernetInterface2
//
// @author Nikolaos Vastardis
//
module PubHost
{
    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");
        }
        pub[sizeof(ethg)]: PEtherApp {
            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 --> pub[i].ifIn[0];
            eth[i].netwIn <-- pub[i].ifOut[0];
        }
}