Skip to content

Commit

Permalink
802.1as: Added IGptp module interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
levy committed Feb 28, 2024
1 parent fb7a8f1 commit 0e9139f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/inet/linklayer/ieee8021as/Gptp.ned
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@

package inet.linklayer.ieee8021as;

import inet.applications.contract.IApp;

//
// This module implements the IEEE 802.1as protocol also known as gPTP. It
// measures link delays to neighboring gPTP network nodes periodically. The
// slave and master ports specify where are the connected gPTP network nodes
// and their roles in the time synchronization domain. The time synchronization
// is done periodically and the clock module is set.
//
simple Gptp like IApp
simple Gptp like IGptp
{
parameters:
string clockModule = default(""); // relative path of a module that implements IClock; optional
Expand Down
20 changes: 20 additions & 0 deletions src/inet/linklayer/ieee8021as/IGptp.ned
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// Copyright (C) 2010 Helene Lageber
//
// SPDX-License-Identifier: LGPL-3.0-or-later
//

package inet.linklayer.ieee8021as;

import inet.applications.contract.IApp;

//
// Interface for gPTP module.
//
moduleinterface IGptp extends IApp
{
parameters:
string gptpNodeType;
@display("i=block/app");
}

5 changes: 2 additions & 3 deletions src/inet/linklayer/ieee8021as/MultiDomainGptp.ned
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

package inet.linklayer.ieee8021as;

import inet.applications.contract.IApp;
import inet.queueing.classifier.PacketClassifier;
import inet.queueing.common.PacketMultiplexer;

Expand All @@ -19,7 +18,7 @@ import inet.queueing.common.PacketMultiplexer;
//
// @see ~MultiClock
//
module MultiDomainGptp like IApp
module MultiDomainGptp like IGptp
{
parameters:
string clockModule; // relative module path of the multi clock
Expand All @@ -31,7 +30,7 @@ module MultiDomainGptp like IApp
input socketIn;
output socketOut;
submodules:
domain[numDomains]: <default("Gptp")> like IApp {
domain[numDomains]: <default("Gptp")> like IGptp {
gptpNodeType = default(parent.gptpNodeType);
clockModule = default(absPath(parent.clockModule) + ".clock[" + string(this.index) + "]");
interfaceTableModule = default(absPath(parent.interfaceTableModule));
Expand Down

0 comments on commit 0e9139f

Please sign in to comment.