EthernetMacLayer¶
Package: inet.linklayer.ethernet.modular
compound module EthernetMacLayer
(no description)
Usage diagram¶
Inheritance diagram¶
Used in compound modules¶
Name |
Type |
Description |
|---|---|---|
compound module |
Implements an Ethernet network interface. |
Extends¶
Name |
Type |
Description |
|---|---|---|
compound module |
Base module for all INET compound 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 |
bitrate |
double |
Properties¶
Name |
Value |
Description |
|---|---|---|
class |
EthernetMacLayer |
|
display |
i=block/layer |
Gates¶
Name |
Direction |
Size |
Description |
|---|---|---|---|
upperLayerIn |
input |
||
upperLayerOut |
output |
||
lowerLayerIn |
input |
||
lowerLayerOut |
output |
Unassigned submodule parameters¶
Name |
Type |
Default value |
Description |
|---|---|---|---|
queue.displayStringTextFormat |
string |
“contains %p pk (%l) pushed %u\npulled %o removed %r dropped %d” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
queue.packetCapacity |
int |
-1 |
Maximum number of packets in the queue, no limit by default |
queue.dataCapacity |
int |
-1b |
Maximum total length of packets in the queue, no limit by default |
queue.dropperClass |
string |
“” |
Determines which packets are dropped when the queue is overloaded, packets are not dropped by default; the parameter must be the name of a C++ class which implements the IPacketDropperFunction C++ interface and is registered via Register_Class |
queue.comparatorClass |
string |
“” |
Determines the order of packets in the queue, insertion order by default; the parameter must be the name of a C++ class which implements the IPacketComparatorFunction C++ interface and is registered via Register_Class |
queue.bufferModule |
string |
“” |
Relative module path to the IPacketBuffer module used by this queue, implicit buffer by default |
server.displayStringTextFormat |
string |
“served %p pk (%l)” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
server.serveSchedulingPriority |
int |
0 |
Specifies the FES scheduling priority for the extra event that is pulling the packet, -1 means no extra event |
outboundEmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
outboundEmitter.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
outboundEmitter.direction |
string |
“undefined” |
|
outboundEmitter.signalName |
string |
||
fcsChecker.displayStringTextFormat |
string |
“dropped {numDroppedPackets}/{numProcessedPackets} pk ({droppedTotalLength}/{processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
fcsChecker.backpressure |
bool |
false |
|
fcsChecker.popFcs |
bool |
false |
|
inboundEmitter.displayStringTextFormat |
string |
“processed {numProcessedPackets} pk ({processedTotalLength})” |
Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information |
inboundEmitter.packetFilter |
object |
“*” |
Which packets are considered, matches all packets by default |
inboundEmitter.direction |
string |
“undefined” |
|
inboundEmitter.signalName |
string |
Source code¶
module EthernetMacLayer extends Module like IEthernetMacLayer
{
parameters:
double bitrate @unit(bps);
*.bitrate = default(this.bitrate);
lifetimer.collectionModule = default("^.queue");
outboundEmitter.signalName = "packetSentToLower";
outboundEmitter.direction = "outbound";
inboundEmitter.signalName = "packetReceivedFromLower";
inboundEmitter.direction = "inbound";
@display("i=block/layer");
@class(EthernetMacLayer);
gates:
input upperLayerIn;
output upperLayerOut;
input lowerLayerIn;
output lowerLayerOut;
submodules:
lifetimer: <default("")> like IPacketLifeTimer if typename != "" {
@display("p=100,100;is=s");
}
queue: <default("PacketQueue")> like IPacketQueue {
@display("p=200,100");
}
server: <default("InstantServer")> like IPacketServer {
serveSchedulingPriority = default(0);
@display("p=200,200");
}
outboundEmitter: <default("PacketEmitter")> like IPacketFlow {
@display("p=200,400");
}
fcsChecker: <default("EthernetFcsChecker")> like IPacketFilter {
popFcs = default(false);
@display("p=500,300");
}
inboundEmitter: <default("PacketEmitter")> like IPacketFlow {
@display("p=500,400");
}
connections:
upperLayerIn --> { @display("m=n"); } --> queue.in;
queue.out --> server.in;
server.out --> outboundEmitter.in;
outboundEmitter.out --> { @display("m=s"); } --> lowerLayerOut;
lowerLayerIn --> { @display("m=s"); } --> inboundEmitter.in;
inboundEmitter.out --> fcsChecker.in;
fcsChecker.out --> { @display("m=n"); } --> upperLayerOut;
}
File: src/inet/linklayer/ethernet/modular/EthernetMacLayer.ned