TSDuck Version 3.32-2769 (TSDuck - The MPEG Transport Stream Toolkit)
ts::tlv::Analyzer Class Reference

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

Public Member Functions

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

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: