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

Analysis (deserialization) of TLV messages. More...

#include <tstlvAnalyzer.h>

Public Member Functions

 Analyzer (const void *addr, size_t size)
 Constructor.
 
bool endOfMessage () const
 Check if the end of message has been reached.
 
const void * fieldAddr () const
 Get the address of the current TLV field.
 
size_t fieldSize () const
 Get the complete size of the current TLV field.
 
LENGTH length () const
 Get the length of the value field in the current TLV field.
 
void next ()
 Analyze the next TLV field.
 
TAG tag () const
 Get the tag of the current TLV field.
 
bool valid () const
 Check if the rest of the message is valid.
 
const void * valueAddr () const
 Get the address of the value field in the current TLV field.
 

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.

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