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.
Used in compound modules
| Name | Type | Description |
|---|---|---|
| IPv4LargeLAN | compound module |
Several hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment. |
| LargeLAN | compound module |
Several hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment. Part of ~LargeNet(1,2). |
Used in
| Name | Type | Description |
|---|---|---|
| BusLAN | network |
Sample Ethernet LAN: four hosts on a bus. |
| MixedLAN | network |
Sample Ethernet LAN containing eight hosts, a switch and a bus. |
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 |
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