MultiDomainGptp¶
Package: inet.linklayer.ieee8021as
compound module MultiDomainGptp
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 also: MultiClock
Usage diagram¶
Inheritance 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 |
|---|---|---|---|
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;
}