SatCat5
satcat5::ptp::TlvHeader Struct Reference

Detailed Description

Data structure for identifying TLV headers.

Some fields only apply to organization extension TLVs per Section 14.3, and will be set to zero otherwise.

Definition at line 70 of file ptp_tlv.h.

#include <ptp_tlv.h>

Public Member Functions

 TlvHeader (const TlvHeader &t)=default
 
TlvHeaderoperator= (const TlvHeader &t)=default
 
bool match (const satcat5::ptp::TlvHeader &other) const
 Does this TLV match the designated type and/or subtype?
 
bool propagate () const
 When attached to ANNOUNCE messages, certain TLVs are required to propagate across boundary clocks, even if those tags are otherwise unsupported by a given implementation.
 
constexpr unsigned len_header () const
 Total length of TLV header, or header plus associated data. More...
 
constexpr unsigned len_total () const
 
void write_to (satcat5::io::Writeable *wr) const
 I/O functions read or write the TLV header only. More...
 
bool read_from (satcat5::io::Readable *rd)
 I/O functions read or write the TLV header only. More...
 

Public Attributes

u16 type
 Access to the raw header fields Note: This "length" field always reflects the user data length, excluding the 6-byte organizationId/SubType if applicable.
 
u16 length
 
u32 org_id
 
u32 org_sub
 

Member Function Documentation

◆ len_header()

constexpr unsigned satcat5::ptp::TlvHeader::len_header ( ) const
inlineconstexpr

Total length of TLV header, or header plus associated data.

(Use this to predict tag length for "tlv_send".)

Definition at line 94 of file ptp_tlv.h.

◆ read_from()

bool TlvHeader::read_from ( satcat5::io::Readable rd)

I/O functions read or write the TLV header only.

User is responsible for reading or writing tag data.

Definition at line 42 of file ptp_tlv.cc.

◆ write_to()

void TlvHeader::write_to ( satcat5::io::Writeable wr) const

I/O functions read or write the TLV header only.

User is responsible for reading or writing tag data.

Definition at line 30 of file ptp_tlv.cc.


The documentation for this struct was generated from the following files: