INET Framework for OMNeT++/OMNEST
inet::GptpFollowUpInformationTlv Class Reference

Class generated from inet/linklayer/ieee8021as/GptpPacket.msg:174 by opp_msgtool. More...

#include <GptpPacket_m.h>

Inheritance diagram for inet::GptpFollowUpInformationTlv:
inet::GptpTlv

Public Member Functions

 GptpFollowUpInformationTlv ()
 
 GptpFollowUpInformationTlv (const GptpFollowUpInformationTlv &other)
 
virtual ~GptpFollowUpInformationTlv ()
 
GptpFollowUpInformationTlvoperator= (const GptpFollowUpInformationTlv &other)
 
virtual void parsimPack (omnetpp::cCommBuffer *b) const
 
virtual void parsimUnpack (omnetpp::cCommBuffer *b)
 
virtual uint16_t getLengthField () const
 
virtual void setLengthField (uint16_t lengthField)
 
virtual uint32_t getOrganizationId () const
 
virtual void setOrganizationId (uint32_t organizationId)
 
virtual uint32_t getOrganizationSubType () const
 
virtual void setOrganizationSubType (uint32_t organizationSubType)
 
virtual double getRateRatio () const
 
virtual void setRateRatio (double rateRatio)
 
virtual uint16_t getGmTimeBaseIndicator () const
 
virtual void setGmTimeBaseIndicator (uint16_t gmTimeBaseIndicator)
 
virtual clocktime_t getLastGmPhaseChange () const
 
virtual void setLastGmPhaseChange (clocktime_t lastGmPhaseChange)
 
virtual int32_t getScaledLastGmFreqChange () const
 
virtual void setScaledLastGmFreqChange (int32_t scaledLastGmFreqChange)
 
void setCumulativeScaledRateOffset (int32_t x)
 
int32_t getCumulativeScaledRateOffset () const
 
- Public Member Functions inherited from inet::GptpTlv
 GptpTlv ()
 
 GptpTlv (const GptpTlv &other)
 
virtual ~GptpTlv ()
 
GptpTlvoperator= (const GptpTlv &other)
 
virtual GptpTlvType getTlvType () const
 
virtual void setTlvType (GptpTlvType tlvType)
 

Protected Member Functions

bool operator== (const GptpFollowUpInformationTlv &)=delete
 
- Protected Member Functions inherited from inet::GptpTlv
bool operator== (const GptpTlv &)=delete
 

Protected Attributes

uint16_t lengthField = B(GPTP_FOLLOW_UP_INFORMATION_TLV_BODYSIZE).get()
 
uint32_t organizationId = 0x0080C2
 
uint32_t organizationSubType = 1
 
double rateRatio = 0
 
uint16_t gmTimeBaseIndicator = 0
 
clocktime_t lastGmPhaseChange = CLOCKTIME_ZERO
 
int32_t scaledLastGmFreqChange = 0
 
- Protected Attributes inherited from inet::GptpTlv
GptpTlvType tlvType = static_cast<inet::GptpTlvType>(-1)
 
uint16_t lengthField = 0
 

Private Member Functions

void copy (const GptpFollowUpInformationTlv &other)
 

Detailed Description

Class generated from inet/linklayer/ieee8021as/GptpPacket.msg:174 by opp_msgtool.

// The fields of the Follow_Up information TLV shall be as specified in Table 11-11 and in 11.4.4.3.2 through
// 11.4.4.3.9. This TLV is a standard organization extension TLV for the Follow_Up message, as specified in
// 14.3 of IEEE Std 1588-2019.
// NOTE—The Follow_Up information TLV is different from the CUMULATIVE_RATE_RATIO TLV of IEEE Std 1588-
// 2019 (see 16.10 and Table 52 of IEEE Std 1588-2019). While both TLVs carry cumulative rate offset information, the
// Follow_Up information TLV also carries information on the Grandmaster Clock time base, most recent phase change,
// and most recent frequency change. The CUMULATIVE_RATE_RATIO TLV is not used by gPTP.
class GptpFollowUpInformationTlv extends GptpTlv
{
    tlvType = GPTP_FOLLOW_UP_INFORMATION_TLV;
    uint16_t lengthField @bit(16) = B(GPTP_FOLLOW_UP_INFORMATION_TLV_BODYSIZE).get();
    uint32_t organizationId @bit(24) = 0x0080C2;
    uint32_t organizationSubType @bit(24) = 1;
    double rateRatio @bit(32); // 11.4.4.3.6 The value of cumulativeScaledRateOffset is equal to (rateRatio – 1.0) / (2^41), truncated to the next smaller
                               // signed integer, where rateRatio is the ratio of the frequency of the Grandmaster Clock to the frequency of the
                               // LocalClock entity in the PTP Instance that sends the message.
    uint16_t gmTimeBaseIndicator @bit(16); // The value of gmTimeBaseIndicator is the timeBaseIndicator of the ClockSource entity for the current
                                           // Grandmaster PTP Instance (see 9.2.2.3).
    clocktime_t lastGmPhaseChange @bit(96); // The value of lastGmPhaseChange is the time of the current Grandmaster Clock minus the time of the
                                            // previous Grandmaster Clock, at the time that the current Grandmaster PTP Instance became the
                                            // Grandmaster PTP Instance. The value is copied from the lastGmPhaseChange member of the MDSyncSend
                                            // structure whose receipt causes the MD entity to send the Follow_Up message (see 11.2.11).
    int32_t scaledLastGmFreqChange @bit(32); // The value of scaledLastGmFreqChange is the fractional frequency offset of the current Grandmaster Clock
                                             // relative to the previous Grandmaster Clock, at the time that the current Grandmaster PTP Instance became
                                             // the Grandmaster PTP Instance, or relative to itself prior to the last change in gmTimeBaseIndicator,
                                             // multiplied by 241 and truncated to the next smaller signed integer. The value is obtained by multiplying the
                                             // lastGmFreqChange member of MDSyncSend whose receipt causes the MD entity to send the Follow_Up
                                             // message (see 11.2.11) by 241, and truncating to the next smaller signed integer.
}

Constructor & Destructor Documentation

◆ GptpFollowUpInformationTlv() [1/2]

inet::GptpFollowUpInformationTlv::GptpFollowUpInformationTlv ( )

◆ GptpFollowUpInformationTlv() [2/2]

inet::GptpFollowUpInformationTlv::GptpFollowUpInformationTlv ( const GptpFollowUpInformationTlv other)

◆ ~GptpFollowUpInformationTlv()

virtual inet::GptpFollowUpInformationTlv::~GptpFollowUpInformationTlv ( )
virtual

Member Function Documentation

◆ copy()

void inet::GptpFollowUpInformationTlv::copy ( const GptpFollowUpInformationTlv other)
private

◆ getCumulativeScaledRateOffset()

int32_t inet::GptpFollowUpInformationTlv::getCumulativeScaledRateOffset ( ) const
inline
527 { return (int32_t)ceil((getRateRatio() - 1.0) * (double)((uint64_t)1<<41)); }

◆ getGmTimeBaseIndicator()

virtual uint16_t inet::GptpFollowUpInformationTlv::getGmTimeBaseIndicator ( ) const
virtual

◆ getLastGmPhaseChange()

virtual clocktime_t inet::GptpFollowUpInformationTlv::getLastGmPhaseChange ( ) const
virtual

◆ getLengthField()

virtual uint16_t inet::GptpFollowUpInformationTlv::getLengthField ( ) const
virtual

Reimplemented from inet::GptpTlv.

◆ getOrganizationId()

virtual uint32_t inet::GptpFollowUpInformationTlv::getOrganizationId ( ) const
virtual

◆ getOrganizationSubType()

virtual uint32_t inet::GptpFollowUpInformationTlv::getOrganizationSubType ( ) const
virtual

◆ getRateRatio()

virtual double inet::GptpFollowUpInformationTlv::getRateRatio ( ) const
virtual

◆ getScaledLastGmFreqChange()

virtual int32_t inet::GptpFollowUpInformationTlv::getScaledLastGmFreqChange ( ) const
virtual

◆ operator=()

GptpFollowUpInformationTlv& inet::GptpFollowUpInformationTlv::operator= ( const GptpFollowUpInformationTlv other)

◆ operator==()

bool inet::GptpFollowUpInformationTlv::operator== ( const GptpFollowUpInformationTlv )
protecteddelete

◆ parsimPack()

virtual void inet::GptpFollowUpInformationTlv::parsimPack ( omnetpp::cCommBuffer *  b) const
virtual

Reimplemented from inet::GptpTlv.

◆ parsimUnpack()

virtual void inet::GptpFollowUpInformationTlv::parsimUnpack ( omnetpp::cCommBuffer *  b)
virtual

Reimplemented from inet::GptpTlv.

◆ setCumulativeScaledRateOffset()

void inet::GptpFollowUpInformationTlv::setCumulativeScaledRateOffset ( int32_t  x)
inline
526 { setRateRatio(1.0 + (double)(x) / (double)((uint64_t)1<<41)); }

◆ setGmTimeBaseIndicator()

virtual void inet::GptpFollowUpInformationTlv::setGmTimeBaseIndicator ( uint16_t  gmTimeBaseIndicator)
virtual

◆ setLastGmPhaseChange()

virtual void inet::GptpFollowUpInformationTlv::setLastGmPhaseChange ( clocktime_t  lastGmPhaseChange)
virtual

◆ setLengthField()

virtual void inet::GptpFollowUpInformationTlv::setLengthField ( uint16_t  lengthField)
virtual

Reimplemented from inet::GptpTlv.

◆ setOrganizationId()

virtual void inet::GptpFollowUpInformationTlv::setOrganizationId ( uint32_t  organizationId)
virtual

◆ setOrganizationSubType()

virtual void inet::GptpFollowUpInformationTlv::setOrganizationSubType ( uint32_t  organizationSubType)
virtual

◆ setRateRatio()

virtual void inet::GptpFollowUpInformationTlv::setRateRatio ( double  rateRatio)
virtual

◆ setScaledLastGmFreqChange()

virtual void inet::GptpFollowUpInformationTlv::setScaledLastGmFreqChange ( int32_t  scaledLastGmFreqChange)
virtual

Member Data Documentation

◆ gmTimeBaseIndicator

uint16_t inet::GptpFollowUpInformationTlv::gmTimeBaseIndicator = 0
protected

◆ lastGmPhaseChange

clocktime_t inet::GptpFollowUpInformationTlv::lastGmPhaseChange = CLOCKTIME_ZERO
protected

◆ lengthField

uint16_t inet::GptpFollowUpInformationTlv::lengthField = B(GPTP_FOLLOW_UP_INFORMATION_TLV_BODYSIZE).get()
protected

◆ organizationId

uint32_t inet::GptpFollowUpInformationTlv::organizationId = 0x0080C2
protected

◆ organizationSubType

uint32_t inet::GptpFollowUpInformationTlv::organizationSubType = 1
protected

◆ rateRatio

double inet::GptpFollowUpInformationTlv::rateRatio = 0
protected

◆ scaledLastGmFreqChange

int32_t inet::GptpFollowUpInformationTlv::scaledLastGmFreqChange = 0
protected

The documentation for this class was generated from the following file:
inet::GptpFollowUpInformationTlv::getRateRatio
virtual double getRateRatio() const
inet::GptpFollowUpInformationTlv::setRateRatio
virtual void setRateRatio(double rateRatio)