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

BIOP message whose body is a list of Bindings. More...

#include <tsDSMCCBIOPMessage.h>

Inheritance diagram for ts::BIOPBindingListMessage:
Collaboration diagram for ts::BIOPBindingListMessage:

Public Member Functions

virtual const std::vector< BIOPBinding > * bindingList () const override
 Bindings carried by this message, if any.
 
virtual bool fromXML (DuckContext &duck, const xml::Element *element)
 This method decodes an XML BIOPMessage.
 
std::string kindTag () const
 Get the object kind as a trimmed string (without the trailing null, if any).
 
virtual void toXML (DuckContext &duck, xml::Element *parent) const
 This method converts a BIOPMessage to XML.
 

Static Public Member Functions

static std::unique_ptr< BIOPMessageFromXML (DuckContext &duck, const xml::Element *element)
 Parse a BIOP message from an XML element.
 
static std::unique_ptr< BIOPMessageParse (PSIBuffer &buf)
 Parse one BIOP message from a buffer.
 

Public Attributes

std::vector< BIOPBindingbindings {}
 Child bindings.
 
BIOPMessageHeader header {}
 BIOP message header.
 
ByteBlock object_info {}
 Object info bytes (kind-specific; opaque at this level).
 
ByteBlock object_key {}
 Object key bytes.
 
ByteBlock object_kind {}
 Object kind bytes on the wire (e.g. 'f','i','l',0). Use kindTag() for the trimmed tag.
 
std::vector< BIOPServiceContextservice_contexts {}
 Service context list.
 

Protected Member Functions

virtual bool deserializeBody (PSIBuffer &buf) override
 Deserialize the subclass-specific message body.
 
virtual bool fromXMLBody (DuckContext &duck, const xml::Element *msg_element) override
 Deserialize the subclass-specific body from XML.
 
virtual void toXMLBody (DuckContext &duck, xml::Element *msg_element) const override
 Serialize the subclass-specific body to XML.
 

Static Protected Member Functions

static std::unique_ptr< BIOPMessageCreateForKind (const std::string &tag)
 Construct a concrete BIOPMessage subclass for a given object_kind tag.
 

Detailed Description

BIOP message whose body is a list of Bindings.

Used for both BIOP::Directory and BIOP::ServiceGateway — the wire format and XML schema are identical; the only difference is the object_kind tag, which is preserved on the base BIOPMessage::object_kind field. Callers that need to distinguish them check kindTag() against BIOPObjectKind::DIRECTORY or BIOPObjectKind::SERVICE_GATEWAY.

See also
ISO/IEC 13818-6 sections 8.6.3.1 and 8.6.3.2

Member Function Documentation

◆ bindingList()

virtual const std::vector< BIOPBinding > * ts::BIOPBindingListMessage::bindingList ( ) const
inlineoverridevirtual

Bindings carried by this message, if any.

Returns
Pointer to the bindings vector for Directory / ServiceGateway messages, nullptr for kinds that don't carry bindings.

Reimplemented from ts::BIOPMessage.

◆ deserializeBody()

virtual bool ts::BIOPBindingListMessage::deserializeBody ( PSIBuffer buf)
overrideprotectedvirtual

Deserialize the subclass-specific message body.

Parameters
[in,out]bufDeserialization buffer. Exactly the body bytes are available.
Returns
True on success.

Implements ts::BIOPMessage.

◆ toXMLBody()

virtual void ts::BIOPBindingListMessage::toXMLBody ( DuckContext duck,
xml::Element msg_element 
) const
overrideprotectedvirtual

Serialize the subclass-specific body to XML.

Parameters
[in,out]duckTSDuck execution context.
[in,out]msg_elementThe <BIOP_message> XML element to append body children to.

Implements ts::BIOPMessage.

◆ fromXMLBody()

virtual bool ts::BIOPBindingListMessage::fromXMLBody ( DuckContext duck,
const xml::Element msg_element 
)
overrideprotectedvirtual

Deserialize the subclass-specific body from XML.

Parameters
[in,out]duckTSDuck execution context.
[in]msg_elementThe <BIOP_message> XML element containing the body.
Returns
True on success.

Implements ts::BIOPMessage.

◆ kindTag()

std::string ts::BIOPMessage::kindTag ( ) const
inherited

Get the object kind as a trimmed string (without the trailing null, if any).

Returns
Trimmed kind string.

◆ Parse()

static std::unique_ptr< BIOPMessage > ts::BIOPMessage::Parse ( PSIBuffer buf)
staticinherited

Parse one BIOP message from a buffer.

Dispatches to the concrete subclass based on object_kind.

Parameters
[in,out]bufDeserialization buffer.
Returns
Parsed message, or nullptr on error or unsupported kind.

◆ toXML()

virtual void ts::BIOPMessage::toXML ( DuckContext duck,
xml::Element parent 
) const
virtualinherited

This method converts a BIOPMessage to XML.

Parameters
[in,out]duckTSDuck execution context.
[in,out]parentThe parent node for the XML element.

◆ fromXML()

virtual bool ts::BIOPMessage::fromXML ( DuckContext duck,
const xml::Element element 
)
virtualinherited

This method decodes an XML BIOPMessage.

Parameters
[in,out]duckTSDuck execution context.
[in]elementThe XML element containing the message.
Returns
True on success, false on error.

◆ FromXML()

static std::unique_ptr< BIOPMessage > ts::BIOPMessage::FromXML ( DuckContext duck,
const xml::Element element 
)
staticinherited

Parse a BIOP message from an XML element.

Dispatches to the concrete subclass based on the object_kind attribute.

Parameters
[in,out]duckTSDuck execution context.
[in]elementThe XML element to parse.
Returns
Parsed message, or nullptr on error or unsupported kind.

◆ CreateForKind()

static std::unique_ptr< BIOPMessage > ts::BIOPMessage::CreateForKind ( const std::string &  tag)
staticprotectedinherited

Construct a concrete BIOPMessage subclass for a given object_kind tag.

Parameters
[in]tagTrimmed object_kind string (e.g. "fil", "dir", "srg").
Returns
A new, empty subclass instance, or nullptr if the kind is unsupported.

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