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

#include <tsDSMCCBIOPNameResolver.h>

Public Types

using EmitCallback = std::function<void(uint16_t module_id, const UString& name, const BIOPMessage& msg)>
using NameKey = std::pair<uint16_t, ByteBlock>

Public Member Functions

 BIOPNameResolver ()=default
void addRoot (const NameKey &key)
void clear ()
void defer (uint16_t module_id, std::shared_ptr< BIOPMessage > msg)
void drain (const EmitCallback &cb)
void flush (const EmitCallback &cb)
void recordBindings (const NameKey &parent, const std::vector< BIOPBinding > &bindings)
UString resolveName (const NameKey &key) const

Detailed Description

Resolves the absolute path of BIOP objects within a DSM-CC Object Carousel by tracking the parent/child graph established by ServiceGateway and Directory bindings. Buffers BIOP messages whose parent has not yet been seen and emits them once their name becomes resolvable.

Member Typedef Documentation

◆ NameKey

using ts::BIOPNameResolver::NameKey = std::pair<uint16_t, ByteBlock>

Identifies an object inside the carousel: (module_id, object_key).

◆ EmitCallback

using ts::BIOPNameResolver::EmitCallback = std::function<void(uint16_t module_id, const UString& name, const BIOPMessage& msg)>

Callback invoked once a BIOP message is ready to be reported. Parameters: module id, resolved path (empty if unresolved), the message.

Constructor & Destructor Documentation

◆ BIOPNameResolver()

ts::BIOPNameResolver::BIOPNameResolver ( )
default

Default constructor.

Member Function Documentation

◆ clear()

void ts::BIOPNameResolver::clear ( )

Reset all internal state.

◆ addRoot()

void ts::BIOPNameResolver::addRoot ( const NameKey & key)

Mark a key as a carousel root (a ServiceGateway).

Parameters
[in]key(module_id, object_key) of the ServiceGateway.

◆ recordBindings()

void ts::BIOPNameResolver::recordBindings ( const NameKey & parent,
const std::vector< BIOPBinding > & bindings )

Record the parent->child name links carried by a Directory or ServiceGateway.

Parameters
[in]parentIdentifier of the directory/SRG containing the bindings.
[in]bindingsThe bindings to record.

◆ defer()

void ts::BIOPNameResolver::defer ( uint16_t module_id,
std::shared_ptr< BIOPMessage > msg )

Defer a BIOP message for later emission, in arrival order.

Parameters
[in]module_idModule the message was parsed from.
[in]msgThe parsed message.

◆ drain()

void ts::BIOPNameResolver::drain ( const EmitCallback & cb)

Emit every deferred message whose name now resolves. Messages that still cannot be resolved remain deferred.

Parameters
[in]cbCallback invoked for each emitted message.

◆ flush()

void ts::BIOPNameResolver::flush ( const EmitCallback & cb)

Drain, then emit any still-deferred messages with an empty name.

Parameters
[in]cbCallback invoked for each emitted message.

◆ resolveName()

UString ts::BIOPNameResolver::resolveName ( const NameKey & key) const

Resolve the absolute path of an object.

Parameters
[in]key(module_id, object_key) of the object.
Returns
Joined path starting with '/', or empty if no chain reaches a root.

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