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

#include <tsDSMCCBIOPMessage.h>

Public Member Functions

 BIOPMessageHeader ()=default
void clear ()
bool deserialize (PSIBuffer &buf)
void display (TablesDisplay &display, const UString &margin) const
bool fromXML (DuckContext &duck, const xml::Element *element)
bool isValid () const
bool serialize (PSIBuffer &buf) const
void toXML (DuckContext &duck, xml::Element *element) const

Static Public Member Functions

static bool Display (TablesDisplay &display, PSIBuffer &buf, const UString &margin)

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
static constexpr uint32_t BIOP_MAGIC = 0x42494F50
static constexpr uint8_t BIOP_MESSAGE_TYPE_STANDARD = 0x00
static constexpr uint8_t BIOP_VERSION_MAJOR = 0x01
static constexpr uint8_t BIOP_VERSION_MINOR = 0x00
static constexpr size_t HEADER_SIZE = 8

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

Constructor & Destructor Documentation

◆ BIOPMessageHeader()

ts::BIOPMessageHeader::BIOPMessageHeader ( )
default

Default constructor.

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.

◆ clear()

void ts::BIOPMessageHeader::clear ( )

Clear the content of the header.

◆ 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()

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.

Member Data Documentation

◆ BIOP_MAGIC

uint32_t ts::BIOPMessageHeader::BIOP_MAGIC = 0x42494F50
staticconstexpr

BIOP magic number ("BIOP" in ASCII).

◆ BIOP_VERSION_MAJOR

uint8_t ts::BIOPMessageHeader::BIOP_VERSION_MAJOR = 0x01
staticconstexpr

Standard BIOP version (major).

◆ BIOP_VERSION_MINOR

uint8_t ts::BIOPMessageHeader::BIOP_VERSION_MINOR = 0x00
staticconstexpr

Standard BIOP version (minor).

◆ BIOP_BYTE_ORDER_BIG_ENDIAN

uint8_t ts::BIOPMessageHeader::BIOP_BYTE_ORDER_BIG_ENDIAN = 0x00
staticconstexpr

Big-endian byte order (always 0x00 per specification).

◆ BIOP_MESSAGE_TYPE_STANDARD

uint8_t ts::BIOPMessageHeader::BIOP_MESSAGE_TYPE_STANDARD = 0x00
staticconstexpr

Standard message type (always 0x00 per specification).

◆ HEADER_SIZE

size_t ts::BIOPMessageHeader::HEADER_SIZE = 8
staticconstexpr

Fixed size of BIOP message header in bytes.


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