MrpRelay

Package: inet.linklayer.mrp

simple module MrpRelay

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 also: MrpMacForwardingTable, Mrp, MrpInterconnection

inet.linklayer.mrp.MrpRelayMrpRelaysimple

Usage diagram

Inheritance diagram

Used in compound modules

Name

Type

Description

EthernetSwitch

compound module

EthernetSwitch models a Layer 2 Ethernet switch with support for various IEEE 802.1 protocols and features. It provides frame forwarding based on MAC addresses and implements multiple switching technologies.

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

packetDropped

inet::Packet

packetReceivedFromLower

inet::Packet

packetReceivedFromUpper

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