TSDuck v3.44-4659
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::BIOPMessageHeader Class Reference

BIOP Message Header. More...

#include <tsDSMCCBIOPMessage.h>

Public Member Functions

 BIOPMessageHeader ()=default
 Default constructor.
 
void clear ()
 Clear the content of the header.
 
bool deserialize (PSIBuffer &buf)
 Deserialize the BIOP message header.
 
void display (TablesDisplay &display, const UString &margin) const
 Display the BIOP message header.
 
bool fromXML (DuckContext &duck, const xml::Element *element)
 Read the header fields from attributes of the given element.
 
bool isValid () const
 Check if the header is valid.
 
bool serialize (PSIBuffer &buf) const
 Serialize the BIOP message header.
 
void toXML (DuckContext &duck, xml::Element *element) const
 Write the header fields as attributes on the given element.
 

Static Public Member Functions

static bool Display (TablesDisplay &display, PSIBuffer &buf, const UString &margin)
 A static method to display a BIOP message header.
 

Public Attributes

uint8_t byte_order = BIOP_BYTE_ORDER_BIG_ENDIAN
 Byte order: 0x00 = big-endian.
 
uint32_t magic = BIOP_MAGIC
 Magic number, must be 0x42494F50 ("BIOP").
 
uint8_t message_type = BIOP_MESSAGE_TYPE_STANDARD
 Message type, typically 0x00 for standard message.
 
uint8_t version_major = BIOP_VERSION_MAJOR
 BIOP version major, typically 0x01.
 
uint8_t version_minor = BIOP_VERSION_MINOR
 BIOP version minor, typically 0x00.
 

Static Public Attributes

static constexpr uint8_t BIOP_BYTE_ORDER_BIG_ENDIAN = 0x00
 Big-endian byte order (always 0x00 per specification).
 
static constexpr uint32_t BIOP_MAGIC = 0x42494F50
 BIOP magic number ("BIOP" in ASCII).
 
static constexpr uint8_t BIOP_MESSAGE_TYPE_STANDARD = 0x00
 Standard message type (always 0x00 per specification).
 
static constexpr uint8_t BIOP_VERSION_MAJOR = 0x01
 Standard BIOP version (major).
 
static constexpr uint8_t BIOP_VERSION_MINOR = 0x00
 Standard BIOP version (minor).
 
static constexpr size_t HEADER_SIZE = 8
 Fixed size of BIOP message header in bytes.
 

Detailed Description

BIOP Message Header.

This is the common header for all BIOP messages in DSM-CC Object Carousel.

See also
ISO/IEC 13818-6, Section 8
ETSI TR 101 202, Section 4.4

Member Function Documentation

◆ isValid()

bool ts::BIOPMessageHeader::isValid ( ) const

Check if the header is valid.

Returns
True if the header has valid magic number and supported version.

◆ serialize()

bool ts::BIOPMessageHeader::serialize ( PSIBuffer buf) const

Serialize the BIOP message header.

Parameters
[in,out]bufSerialization buffer.
Returns
True on success, false on error.

◆ deserialize()

bool ts::BIOPMessageHeader::deserialize ( PSIBuffer buf)

Deserialize the BIOP message header.

Parameters
[in,out]bufDeserialization buffer. Side effect: the buffer is switched to big-endian to match the BIOP byte_order field and is NOT restored afterwards — callers that share the buffer with little-endian readers must reset the byte order themselves.
Returns
True on success, false on error.

◆ display()

void ts::BIOPMessageHeader::display ( TablesDisplay display,
const UString margin 
) const

Display the BIOP message header.

Parameters
[in,out]displayDisplay engine.
[in]marginLeft margin content.

◆ Display()

static bool ts::BIOPMessageHeader::Display ( TablesDisplay display,
PSIBuffer buf,
const UString margin 
)
static

A static method to display a BIOP message header.

Parameters
[in,out]displayDisplay engine.
[in,out]bufA PSIBuffer over the BIOP message header.
[in]marginLeft margin content.
Returns
True on success, false on error.

◆ toXML()

void ts::BIOPMessageHeader::toXML ( DuckContext duck,
xml::Element element 
) const

Write the header fields as attributes on the given element.

The header has no dedicated XML container; its fields live as attributes directly on the enclosing <BIOP_message> element.

Parameters
[in,out]duckTSDuck execution context.
[in,out]elementThe element to attach the header attributes to.

◆ fromXML()

bool ts::BIOPMessageHeader::fromXML ( DuckContext duck,
const xml::Element element 
)

Read the header fields from attributes of the given element.

Parameters
[in,out]duckTSDuck execution context.
[in]elementThe element whose attributes carry the header fields.
Returns
True on success, false on error.

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