TSDuck v3.46-4930
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::tlv::Analyzer Class Reference

#include <tstlvAnalyzer.h>

Public Member Functions

 Analyzer (const void *addr, size_t size)
bool endOfMessage () const
const void * fieldAddr () const
size_t fieldSize () const
LENGTH length () const
void next ()
TAG tag () const
bool valid () const
const void * valueAddr () const

Detailed Description

Analysis (deserialization) of TLV messages.

Constructor & Destructor Documentation

◆ Analyzer()

ts::tlv::Analyzer::Analyzer ( const void * addr,
size_t size )

Constructor. Associate the analyzer object with the address and size of the binary message. The corresponding memory area must remain alive as long as the object exists. Also pre-analyze the first TLV field.

Parameters
[in]addrAddress of the binary message.
[in]sizeSize in bytes of the binary message.

Member Function Documentation

◆ endOfMessage()

bool ts::tlv::Analyzer::endOfMessage ( ) const
inline

Check if the end of message has been reached.

Returns
True if the end of message has been reached.

◆ valid()

bool ts::tlv::Analyzer::valid ( ) const
inline

Check if the rest of the message is valid. When valid() becomes false, endOfMessage() also become false.

Returns
True if the rest of the message is valid.

◆ fieldAddr()

const void * ts::tlv::Analyzer::fieldAddr ( ) const
inline

Get the address of the current TLV field.

Returns
Address of the current TLV field.

◆ fieldSize()

size_t ts::tlv::Analyzer::fieldSize ( ) const
inline

Get the complete size of the current TLV field.

Returns
Complete size of the current TLV field.

◆ tag()

TAG ts::tlv::Analyzer::tag ( ) const
inline

Get the tag of the current TLV field.

Returns
Tag of the current TLV field.

◆ valueAddr()

const void * ts::tlv::Analyzer::valueAddr ( ) const
inline

Get the address of the value field in the current TLV field.

Returns
The address of the value field in the current TLV field.

◆ length()

LENGTH ts::tlv::Analyzer::length ( ) const
inline

Get the length of the value field in the current TLV field.

Returns
The length of the value field in the current TLV field.

◆ next()

void ts::tlv::Analyzer::next ( )

Analyze the next TLV field.


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