MultiDomainGptp

Package: inet.linklayer.ieee8021as

MultiDomainGptp

compound module

Combines multiple ~Gptp modules, one per time domain into a multi time domain time synchronization module. Each gPTP time domain is automatically configured to use the corresponding subclock of the clock passed into this module.

<b>See also:</b> ~MultiClock

domain[numDomains] : like IGptp

Gptp: Implements the generalized Precision Time Protocol (gPTP) as defined in the IEEE 802.1AS-2020...

IGptp: Interface for gPTP module.

Source:
domain[numDomains]: <default("Gptp")> like IGptp {
    gptpNodeType = default(parent.gptpNodeType);
    clockModule = default(absPath(parent.clockModule) + ".clock[" + string(this.index) + "]");
    interfaceTableModule = default(absPath(parent.interfaceTableModule));
    domainNumber = default(t... multiplexer : PacketMultiplexer

Connects multiple packet producers to one packet consumer.

Source:
multiplexer: PacketMultiplexer {
    @display("p=150,350");
} classifier : PacketClassifier

Connects one packet producer to multiple packet consumers.

Source:
classifier: PacketClassifier {
    classifierClass = default("inet::GptpDomainNumberClassifier");
    @display("p=300,350");
}

Usage diagram

The following diagram shows usage relationships between types. Unresolved types are missing from the diagram.

Inheritance diagram

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

Parameters

Name Type Default value Description
clockModule string

Relative module path of the multi clock

interfaceTableModule string

Relative module path of the interface table

numDomains int

Number of time synchronization domains

gptpNodeType string

@enum("GptpNodeType"): MASTER_NODE, BRIDGE_NODE, SLAVE_NODE

Properties

Name Value Description
display i=block/app

Gates

Name Direction Size Description
socketIn input
socketOut output

Unassigned submodule parameters

Name Type Default value Description
domain.gptpNodeType string parent.gptpNodeType
multiplexer.displayStringTextFormat string "passed %p pk (%l)"

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

multiplexer.forwardServiceRegistration bool true
multiplexer.forwardProtocolRegistration bool true
classifier.displayStringTextFormat string "classified %p pk (%l)"

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

classifier.reverseOrder bool false
classifier.classifierClass string "inet::GptpDomainNumberClassifier"

Determines the output queue of packets, the parameter must be the name of a C++ class which implements the IPacketClassifierFunction interface and is registered via Register_Class

Source code

//
// Combines multiple ~Gptp modules, one per time domain into a multi
// time domain time synchronization module. Each gPTP time domain is automatically
// configured to use the corresponding subclock of the clock passed into this
// module.
//
// @see ~MultiClock
//
module MultiDomainGptp like IGptp
{
    parameters:
        string clockModule; // Relative module path of the multi clock
        string interfaceTableModule; // Relative module path of the interface table
        int numDomains; // Number of time synchronization domains
        string gptpNodeType; // @enum("GptpNodeType"): MASTER_NODE, BRIDGE_NODE, SLAVE_NODE
        @display("i=block/app");
    gates:
        input socketIn;
        output socketOut;
    submodules:
        domain[numDomains]: <default("Gptp")> like IGptp {
            gptpNodeType = default(parent.gptpNodeType);
            clockModule = default(absPath(parent.clockModule) + ".clock[" + string(this.index) + "]");
            interfaceTableModule = default(absPath(parent.interfaceTableModule));
            domainNumber = default(this.index);
            @display("p=150,150,row,150");
        }
        multiplexer: PacketMultiplexer {
            @display("p=150,350");
        }
        classifier: PacketClassifier {
            classifierClass = default("inet::GptpDomainNumberClassifier");
            @display("p=300,350");
        }
    connections:
        for i=0..numDomains-1 {
            domain[i].socketOut --> multiplexer.in++;
            classifier.out++ --> domain[i].socketIn;
        }

        socketIn --> { @display("m=s"); } --> classifier.in;
        multiplexer.out --> { @display("m=s"); } --> socketOut;
}

File: src/inet/linklayer/ieee8021as/MultiDomainGptp.ned