ADTF
Loading...
Searching...
No Matches
adtf::streaming::hollow::cRequestBroker Class Reference

#include <requestable_writer.h>

Inherits adtf::ucom::catwo::object< Bases >.

Public Member Functions

 cRequestBroker (cSampleWriter *pWriter=nullptr)
 
 ~cRequestBroker () override
 
void SetCallbacks (std::function< void(uint32_t, const base::IProperties *)> fnEnable, std::function< void(uint32_t)> fnDisable)
 
void UpdateType (const ucom::ant::iobject_ptr< const IStreamType > &pType)
 
void DisableCurrentRequests (bool bCallDisableCallback=false)
 
tResult RequestSamples (ucom::ant::iobject_ptr< IStreamingRequest > &pRequest, uint32_t nSubStreamId, const base::ant::IProperties *pRequestProperties=nullptr) override
 
void RegisterStreamTypeHandler (IStreamTypeHandler &oHandler) override
 
void UnregisterStreamTypeHandler (IStreamTypeHandler &oHandler) override
 
- Public Member Functions inherited from adtf::ucom::catwo::object< Bases >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

This is the default implementation of IStreamingRequests used by requestable_writer.

Constructor & Destructor Documentation

◆ cRequestBroker()

adtf::streaming::hollow::cRequestBroker::cRequestBroker ( cSampleWriter * pWriter = nullptr)

Default constructor.

Parameters
[in]pWriterThe writer instance that this broker is associated with. This is used for error handling.

◆ ~cRequestBroker()

adtf::streaming::hollow::cRequestBroker::~cRequestBroker ( )
override

Destructor.

Member Function Documentation

◆ DisableCurrentRequests()

void adtf::streaming::hollow::cRequestBroker::DisableCurrentRequests ( bool bCallDisableCallback = false)

This will disable all current requests.

Parameters
[in]bCallDisableCallbackif true, the callback for disabling Substreams will be called for each currently enabled Substream.

◆ SetCallbacks()

void adtf::streaming::hollow::cRequestBroker::SetCallbacks ( std::function< void(uint32_t, const base::IProperties *)> fnEnable,
std::function< void(uint32_t)> fnDisable )

Sets the callbacks for enabling and disabling specific Substreams.

Parameters
[in]fnEnableThis is called when the first consumer requests a specific Substream.
[in]fnDisableThis is called when the last consumer cancels its request for a Substream.

◆ UpdateType()

void adtf::streaming::hollow::cRequestBroker::UpdateType ( const ucom::ant::iobject_ptr< const IStreamType > & pType)

Call this when you updated your Substreams type.

Parameters
[in]pTypeThe new Stream Type.

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