GptpBase

Namespace inet

GptpBase

class

ieee802.1AS-2020 10.6.2.1, 11.4.2

Extends

Name Type Description
FieldsChunk (unknown -- not in documented files)

Fields

Name Type Description
majorSdoId uint8_t

The value is specified in 8.1 for all transmitted PTP messages of a gPTP domain. The value is specified in 11.2.17 for all transmitted PTP messages of the Common Mean Link Delay Service. Any PTP message received for which the value is not one of the values specified in those subclauses shall be ignored.

messageType GptpMessageType
minorVersionPTP uint8_t

For transmitted messages, the value shall be 1 (see 7.5.4 and 13.3.2.5 of IEEE Std 1588-2019). For received messages, the value is ignored.

versionPTP uint8_t

For transmitted messages, the value shall be 2 (see 7.5.4 and 13.3.2.4 of IEEE Std 1588-2019). For received messages, if the value is not 2, the entire message shall be ignored.

messageLengthField uint16_t

The value is the total number of octets that form the PTP message.

domainNumber uint8_t

The domainNumber for Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages shall be 0. The domainNumber for all other PTP messages is as specified in 10.6.2.2.6.

minorSdoId uint8_t

The value is specified in 8.1 for all transmitted PTP messages of a gPTP domain. The value is specified in 11.2.17 for all transmitted PTP messages of the Common Mean Link Delay Service. Any PTP message received for which the value is not one of the values specified in those subclauses shall be ignored. Currently unused in INET

flags uint16_t

10.6.2.2.8 flags (Octet2) The value of the bits of the array are defined in Table 10-9. For message types where the bit is not defined in Table 10-9, the value of the bit is set to FALSE. Use GptpFlags enums.

correctionField clocktime_t

The correctionField is the value of the correction as specified in Table 11-6, measured in nanoseconds and multiplied by 2^16. For example, 2.5 ns is represented as 0x0000000000028000.

messageTypeSpecific uint32_t

The value of the messageTypeSpecific field varies, based on the value of the messageType field, as described in Table 10-10.

sourcePortIdentity PortIdentity

The value is the PTP Port identity attribute (see 8.5.2) of the PTP Port that transmits the PTP message.

sequenceId uint16_t

The sequenceId field is assigned as specified in 10.5.7.

controlField uint8_t

The value is 0.

logMessageInterval uint8_t

For Sync and Follow_Up messages, the value is the value of currentLogSyncInterval (see 10.2.5.4 and 10.7.2.3). For Pdelay_Req messages, the value is the value of currentLogPdelayReqInterval. For Pdelay_Resp and Pdelay_Resp_Follow_Up messages, the value is transmitted as 0x7F and ignored on reception.

Packet operations (observed)

actionmodule
peekAtGptp
peekAtFrontGptp, PacketClassifier

Source code

// ieee802.1AS-2020 10.6.2.1, 11.4.2
class GptpBase extends FieldsChunk
{
    uint8_t majorSdoId @bit(4); // The value is specified in 8.1 for all transmitted PTP messages of a gPTP domain. The value is specified in
                                // 11.2.17 for all transmitted PTP messages of the Common Mean Link Delay Service. Any PTP message
                                // received for which the value is not one of the values specified in those subclauses shall be ignored.
    GptpMessageType messageType @bit(4);
    uint8_t minorVersionPTP @bit(4) = 1; // For transmitted messages, the value shall be 1 (see 7.5.4 and 13.3.2.5 of IEEE Std 1588-2019).
                                     // For received messages, the value is ignored.
    uint8_t versionPTP @bit(4) = 2; // For transmitted messages, the value shall be 2 (see 7.5.4 and 13.3.2.4 of IEEE Std 1588-2019). For received
                                // messages, if the value is not 2, the entire message shall be ignored.
    uint16_t messageLengthField @bit(16); // The value is the total number of octets that form the PTP message.
    uint8_t domainNumber @bit(8); // The domainNumber for Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up messages shall be 0.
                                  // The domainNumber for all other PTP messages is as specified in 10.6.2.2.6.
    uint8_t minorSdoId @bit(8); // The value is specified in 8.1 for all transmitted PTP messages of a gPTP domain. The value is specified in
                                // 11.2.17 for all transmitted PTP messages of the Common Mean Link Delay Service. Any PTP message
                                // received for which the value is not one of the values specified in those subclauses shall be ignored.
                                // Currently unused in INET
    uint16_t flags @bit(16); // 10.6.2.2.8 flags (Octet2)
                             // The value of the bits of the array are defined in Table 10-9. For message types where the bit is not defined in
                             // Table 10-9, the value of the bit is set to FALSE.
                             // Use ~GptpFlags enums.
    clocktime_t correctionField @bit(64) = 0; // The correctionField is the value of the correction as specified in Table 11-6, measured in nanoseconds and
                                              // multiplied by 2^16. For example, 2.5 ns is represented as 0x0000000000028000.
    uint32_t messageTypeSpecific @bit(32); // The value of the messageTypeSpecific field varies, based on the value of the messageType field, as described in Table 10-10.
    PortIdentity sourcePortIdentity @bit(80); // The value is the PTP Port identity attribute (see 8.5.2) of the PTP Port that transmits the PTP message.
    uint16_t sequenceId @bit(16); // The sequenceId field is assigned as specified in 10.5.7.
    uint8_t controlField @bit(8) = 0; // The value is 0.
    uint8_t logMessageInterval @bit(8); // For Sync and Follow_Up messages, the value is the value of currentLogSyncInterval (see 10.2.5.4 and
                                        // 10.7.2.3). For Pdelay_Req messages, the value is the value of currentLogPdelayReqInterval. For
                                        // Pdelay_Resp and Pdelay_Resp_Follow_Up messages, the value is transmitted as 0x7F and ignored on
                                        // reception.
}

File: src/inet/linklayer/ieee8021as/GptpPacket.msg