Package: inet.physicallayer.wired.common
WireJunction
simple moduleModels a generic wiring hub.
The model simply broadcasts messages (packets, frames, signals) received on one port to 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.
Inheritance diagram
The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.
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). |
| VoIPStreamLargeLAN | compound module |
Several hosts and an Ethernet hub on a switch. One port of the hub connect to a 10Base2 segment. |
Used in
| Name | Type | Description |
|---|---|---|
| BusLAN | network |
Sample Ethernet LAN: four hosts on a bus. |
| HostsWithBus | network | (no description) |
| MixedLAN | network |
Sample Ethernet LAN containing eight hosts, a switch and a bus. |
| MixedMultidropNetwork | network |
This module contains an ~EthernetSwitch connected to a ~StandardHost and a 10BASE-T1S multidrop link with a configurable number of nodes. The switch port acts as the controller of the multidrop link. The network node type can be configured for all the nodes on the multidrop link. |
| MultidropNetwork | network |
This module contains a single 10BASE-T1S multidrop link with a separate controller node and a configurable number of additional nodes. The network node type can be configured for all network nodes on the multidrop link. |
Extends
| Name | Type | Description |
|---|---|---|
| SimpleModule | simple module |
Base module for all INET simple modules. |
Parameters
| Name | Type | Default value | Description |
|---|---|---|---|
| displayStringTextFormat | string | "" |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
Properties
| Name | Value | Description |
|---|---|---|
| class | WireJunction | |
| wireJunction | ||
| display | i=misc/node_vs |
Gates
| Name | Direction | Size | Description |
|---|---|---|---|
| port [ ] | inout |
Signals
| Name | Type | Unit | Description |
|---|---|---|---|
| packetReceived | cPacket |
Statistics
| Name | Title | Source | Record | Unit | Interpolation Mode | Description |
|---|---|---|---|---|---|---|
| packetReceived | packets | packetReceived | count, sum(packetBytes), vector(packetBytes) | none | ||
| channelOwner | channel owner | packetReceived | channelOwner | sample-hold |
Source code
// // Models a generic wiring hub. // // The model simply broadcasts messages (packets, frames, signals) // received on one port to 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 extends SimpleModule { parameters: @class(WireJunction); @wireJunction; @display("i=misc/node_vs"); @signal[packetReceived](type=cPacket); @statistic[packetReceived](title="packets"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); @statistic[channelOwner](title="channel owner"; source=packetReceived; record=channelOwner; interpolationmode=sample-hold); gates: inout port[]; }File: src/inet/physicallayer/wired/common/WireJunction.ned