libptpmgmt 2.0
libptpmgmt library that provides the functionality of linuxptp pmc
Loading...
Searching...
No Matches
Protected Member Functions | List of all members
MessageSigTlvs Class Reference

#include <msg.h>

Protected Member Functions

 MessageSigTlvs (const MessageSigTlvs &other)
 
bool traverse (const std::function< bool(const Message &msg, tlvType_e tlvType, const BaseSigTlv *tlv)> &callback) const
 
bool traverse (MessageSigTlvCallback &callback) const
 
size_t size () const
 
const BaseSigTlvget (size_t position) const
 
tlvType_e getType (size_t position) const
 
mng_vals_e getTlvId (size_t position) const
 
const BaseMngTlvgetMngTlv (size_t position) const
 
const MessageSigTlvgetTlv (size_t position) const
 
 MessageSigTlvs (MessageSigTlvs &&other)
 
iterator begin () const
 
iterator end () const
 

Detailed Description

Holds signaling tlvs received in the last receive ptp message

Constructor & Destructor Documentation

◆ MessageSigTlvs() [1/2]

MessageSigTlvs::MessageSigTlvs ( const MessageSigTlvs other)
protected

Copy constructor

Parameters
[in]othersignalling TLVs to copy

◆ MessageSigTlvs() [2/2]

MessageSigTlvs::MessageSigTlvs ( MessageSigTlvs &&  other)
protected

Move constructor

Parameters
[in]othersignalling TLVs to copy

Member Function Documentation

◆ begin()

iterator MessageSigTlvs::begin ( ) const
protected

Fetch iterator to the first tlv

Returns
iterator
Note
iterators are supported using C++ only

◆ end()

iterator MessageSigTlvs::end ( ) const
protected

Fetch iterator that mark the end of the TLVs list

Returns
iterator
Note
iterators are supported using C++ only

◆ get()

const BaseSigTlv * MessageSigTlvs::get ( size_t  position) const
protected

Get a TLV from the last signalling message TLVs by position

Parameters
[in]positionof TLV
Returns
TLV or null

◆ getMngTlv()

const BaseMngTlv * MessageSigTlvs::getMngTlv ( size_t  position) const
protected

Get a management TLV from the last signalling message TLVs by position

Parameters
[in]positionof TLV
Returns
management TLV or null
Note
return null if TLV is not management
You should not try to free this TLV object

◆ getTlv()

const MessageSigTlv & MessageSigTlvs::getTlv ( size_t  position) const
protected

Get a TLV from the last signalling message TLVs by position

Parameters
[in]positionof TLV
Returns
TLV or null

◆ getTlvId()

mng_vals_e MessageSigTlvs::getTlvId ( size_t  position) const
protected

Get the management TLV ID of a management TLV from the last signalling message TLVs by position

Parameters
[in]positionof TLV
Returns
management TLV ID or NULL_PTP_MANAGEMENT
Note
return NULL_PTP_MANAGEMENT if TLV is not management

◆ getType()

tlvType_e MessageSigTlvs::getType ( size_t  position) const
protected

Get a type of TLV from the last signalling message TLVs by position

Parameters
[in]positionof TLV
Returns
type of TLV or unknown

◆ size()

size_t MessageSigTlvs::size ( ) const
protected

Get number of the last signalling message TLVs

Returns
number of TLVs or zero

◆ traverse() [1/2]

bool MessageSigTlvs::traverse ( const std::function< bool(const Message &msg, tlvType_e tlvType, const BaseSigTlv *tlv)> &  callback) const
protected

Traverse all last signalling message TLVs

Parameters
[in]callbackfunction to call with each TLV
Returns
true if any of the calling to call-back return true
Note
stop if any of the calling to call-back return true

◆ traverse() [2/2]

bool MessageSigTlvs::traverse ( MessageSigTlvCallback callback) const
protected

Traverse all last signalling message TLVs

Parameters
[in]callbackobject with callback to be called with each TLV
Returns
true if any of the calling to call-back return true
Note
stop if any of the calling to call-back return true
Available for PHP, Perl, Python and Ruby use

The documentation for this class was generated from the following file: