WireJunction

Package: inet.physicallayer.wired.common

WireJunction

simple module

Models a generic wiring hub.

The model simply broadcasts messages (packets, frames, signals) received on one port on all other ports, mimicking the propagation of electrical signals. Messages are not interpreted by the model in any way, so this module is protocol agnostic.

Note that no special attention is made to appropriately model frame truncations that occur when the link breaks, or comes back up while a transmission is underway. If you need to precisely model what happens when the link state changes, you cannot use this module.

Properties

Name Value Description
display i=misc/node_vs

Gates

Name Direction Size Description
port [ ] inout

Signals

Name Type Unit
packetReceived cPacket

Statistics

Name Title Source Record Unit Interpolation Mode
packetReceived packets packetReceived count, sum(packetBytes), vector(packetBytes) none

Called methods (observed)

functioninfocall from
inet::physicallayer::WireJunction::receiveSignalPOST_MODEL_CHANGE-=Network=-, ScenarioManager

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
port$i[]EthernetFilledIfgSignal0EthernetCsmaMac
port$i[]EthernetFilledIfgSignal0WireJunction
port$i[]EthernetJamSignal0EthernetCsmaMac
port$i[]EthernetJamSignal0EthernetHub
port$i[]EthernetJamSignal0WireJunction
port$i[]EthernetSignal0EthernetCsmaMac
port$i[]EthernetSignal0EthernetHub
port$i[]EthernetSignal0WireJunction

Outgoing messages (observed)

gatemsgkindctrldestModuletags
port$o[]EthernetFilledIfgSignal0EthernetCsmaMac
port$o[]EthernetFilledIfgSignal0WireJunction
port$o[]EthernetJamSignal0EthernetCsmaMac
port$o[]EthernetJamSignal0EthernetHub
port$o[]EthernetJamSignal0WireJunction
port$o[]EthernetSignal0EthernetCsmaMac
port$o[]EthernetSignal0EthernetHub
port$o[]EthernetSignal0WireJunction

Source code

//
// Models a generic wiring hub.
//
// The model simply broadcasts messages (packets, frames, signals)
// received on one port on all other ports, mimicking the propagation
// of electrical signals. Messages are not interpreted by the model
// in any way, so this module is protocol agnostic.
//
// Note that no special attention is made to appropriately model
// frame truncations that occur when the link breaks, or comes
// back up while a transmission is underway. If you need
// to precisely model what happens when the link state changes,
// you cannot use this module.
//
simple WireJunction
{
    parameters:
        @display("i=misc/node_vs");
        @signal[packetReceived](type=cPacket);
        @statistic[packetReceived](title="packets"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none);
    gates:
        inout port[];
}
File: src/inet/physicallayer/wired/common/WireJunction.ned