Package: inet.physicallayer.wired.common
WireJunction
simple moduleModels 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)
function | info | call from |
---|---|---|
inet::physicallayer::WireJunction::receiveSignal | POST_MODEL_CHANGE | -=Network=-, ScenarioManager |
Incoming messages (observed)
gate | msg | kind | ctrl | srcModule | tags |
---|---|---|---|---|---|
port$i[] | EthernetFilledIfgSignal | 0 | EthernetCsmaMac | ||
port$i[] | EthernetFilledIfgSignal | 0 | WireJunction | ||
port$i[] | EthernetJamSignal | 0 | EthernetCsmaMac | ||
port$i[] | EthernetJamSignal | 0 | EthernetHub | ||
port$i[] | EthernetJamSignal | 0 | WireJunction | ||
port$i[] | EthernetSignal | 0 | EthernetCsmaMac | ||
port$i[] | EthernetSignal | 0 | EthernetHub | ||
port$i[] | EthernetSignal | 0 | WireJunction |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
port$o[] | EthernetFilledIfgSignal | 0 | EthernetCsmaMac | ||
port$o[] | EthernetFilledIfgSignal | 0 | WireJunction | ||
port$o[] | EthernetJamSignal | 0 | EthernetCsmaMac | ||
port$o[] | EthernetJamSignal | 0 | EthernetHub | ||
port$o[] | EthernetJamSignal | 0 | WireJunction | ||
port$o[] | EthernetSignal | 0 | EthernetCsmaMac | ||
port$o[] | EthernetSignal | 0 | EthernetHub | ||
port$o[] | EthernetSignal | 0 | WireJunction |
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