Package: inet.node.ethernet
EthernetHub
simple moduleAn Ethernet hub model.
The model simply broadcasts frames (and transmission updates representing aborted frames, etc.) received on one port on all other ports, mimicking the propagation of electrical signals.
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 |
---|---|---|
networkNode | ||
class | ::inet::physicallayer::WireJunction | |
labels | node | |
display | i=device/hub;bgb=155,104 |
Gates
Name | Direction | Size | Description |
---|---|---|---|
ethg [ ] | inout |
Signals
Name | Type | Unit |
---|---|---|
packetReceived | cMessage |
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 |
---|---|---|---|---|---|
ethg$i[] | EthernetFilledIfgSignal | 0 | EthernetCsmaMac | ||
ethg$i[] | EthernetJamSignal | 0 | EthernetCsmaMac | ||
ethg$i[] | EthernetJamSignal | 0 | WireJunction | ||
ethg$i[] | EthernetSignal | 0 | EthernetCsmaMac | ||
ethg$i[] | EthernetSignal | 0 | WireJunction |
Outgoing messages (observed)
gate | msg | kind | ctrl | destModule | tags |
---|---|---|---|---|---|
ethg$o[] | EthernetFilledIfgSignal | 0 | EthernetCsmaMac | ||
ethg$o[] | EthernetJamSignal | 0 | EthernetCsmaMac | ||
ethg$o[] | EthernetJamSignal | 0 | WireJunction | ||
ethg$o[] | EthernetSignal | 0 | EthernetCsmaMac | ||
ethg$o[] | EthernetSignal | 0 | WireJunction |
Source code
// // An Ethernet hub model. // // The model simply broadcasts frames (and transmission updates // representing aborted frames, etc.) received on one port on all // other ports, mimicking the propagation of electrical signals. // // 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 EthernetHub { parameters: @networkNode(); @class(::inet::physicallayer::WireJunction); @labels(node,ethernet-node); @display("i=device/hub;bgb=155,104"); @signal[packetReceived](type=cMessage); @statistic[packetReceived](title="packets"; source=packetReceived; record=count,"sum(packetBytes)","vector(packetBytes)"; interpolationmode=none); gates: inout ethg[] @labels(EtherFrame-conn); }File: src/inet/node/ethernet/EthernetHub.ned