MrpRelay

Package: inet.linklayer.mrp

MrpRelay

simple module

C++ definition

Relay unit with support for the Media Redundancy Protocol (MRP), defined in IEC 62439-2.

This module forwards Ethernet frames based on their destination MAC addresses to appropriate ports. It handles frame forwarding in accordance with interface data from both STP and MRP, and blocks traffic if ports are set to BLOCKED. If a frame specific to STP or MRP is received, this frame is processed according to the rules in ~MrpMacForwardingTable, and then forwarded to the appropriate upper layer MRP or STP instance.

<b>See also:</b> ~MrpMacForwardingTable, ~Mrp, ~MrpInterconnection

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Extends

Name Type Description
Ieee8021dRelay simple module

Forwards frames (~EtherFrame) based on their destination MAC addresses to appropriate ports.

Parameters

Name Type Default value Description
displayStringTextFormat string "proc: %p\ndisc: %d"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

macTableModule string
interfaceTableModule string
switchingDelay double truncnormal(8.61us,5.42us)

Switches take a certain amount of time for processing each packet. This parameter sets the processsing delay applied before sending packets out.

Properties

Name Value Description
class MrpRelay
display i=block/switch

Gates

Name Direction Size Description
lowerLayerIn input
lowerLayerOut output
upperLayerIn input
upperLayerOut output

Signals

Name Type Unit Description
packetReceivedFromUpper inet::Packet
packetReceivedFromLower inet::Packet
packetDropped inet::Packet
packetSentToLower inet::Packet

Statistics

Name Title Source Record Unit Interpolation Mode Description
packetDropped packets dropped count, sum(packetBytes), vector(packetBytes) none

Source code

//
// Relay unit with support for the Media Redundancy Protocol (MRP), defined
// in IEC 62439-2.
//
// This module forwards Ethernet frames based on their destination MAC addresses
// to appropriate ports. It handles frame forwarding in accordance with
// interface data from both STP and MRP, and blocks traffic if ports are set to
// BLOCKED. If a frame specific to STP or MRP is received, this frame is
// processed according to the rules in ~MrpMacForwardingTable, and then
// forwarded to the appropriate upper layer MRP or STP instance.
//
// @see ~MrpMacForwardingTable, ~Mrp, ~MrpInterconnection
//
simple MrpRelay extends Ieee8021dRelay like IMacRelayUnit
{
    parameters:
        @class(MrpRelay);

        // Switches take a certain amount of time for processing each packet.
        // This parameter sets the processsing delay applied before sending
        // packets out.
        volatile double switchingDelay @unit(s) = default(truncnormal(8.61us,5.42us));
}

File: src/inet/linklayer/mrp/MrpRelay.ned