ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
writer_with_request_broker< BaseWriter >

Template that will register a request broker (an implementation of IStreamingRequests) at the connected Sample Stream. More...

#include <requestable_writer.h>

Inheritance diagram for writer_with_request_broker< BaseWriter >:
[legend]

Public Member Functions

void SetBroker (const ucom::ant::iobject_ptr< IStreamingRequests > &pBroker)
 Use this to set the broker instance after the writer has been created.
 
tResult BeginStreaming (streaming::ant::ISampleStream &oSampleStream) override
 Begin streaming on the given sample stream.
 
tResult EndStreaming () override
 End streaming.
 
- Public Member Functions inherited from cSampleWriter
void SetName (const char *strName) override
 Sets the name of the streamer.
 
tResult GetName (base::ant::IString &&strName) override
 Retrieves the name of the streamer.
 
tResult SetType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) override
 Sets the initial stream type of a streamer.
 
tResult GetType (ucom::ant::iobject_ptr< const ant::IStreamType > &pStreamType) const override
 Returns the initial stream type of the streamer.
 
tResult SetStreamerPin (const ucom::ant::iobject_ptr< IStreamerPin > &pStreamerPin) override
 Sets the pin that the streamer is associated with.
 
tResult Write (const ucom::ant::iobject_ptr< const ant::ISample > &pSample) override
 Writes a sample to the connected sample stream.
 
virtual tResult Transmit (const ucom::ant::iobject_ptr< const ant::ISample > &pSample)
 For compatibility purposes, call Write() instead.
 
tResult ChangeType (const ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override
 Communicates a type change for all following samples.
 
tResult Flush () override
 Flushes the writer.
 
tResult SetStreamError (tResult oError) override
 Reports and handles an error via the sample stream.
 
tResult ManualTrigger (base::flash::tNanoSeconds tmActivationTime=base::flash::tNanoSeconds {-1}) override
 Calls all connected runners synchronously in this call.
 

Private Attributes

ucom::ant::object_ptr< IStreamingRequestsm_pBroker
 
ucom::ant::object_ptr< ant::IBindingProxym_pProxy
 

Additional Inherited Members

- Protected Attributes inherited from cSampleWriter
std::unique_ptr< cImplementation > m_pImplementation
 

Detailed Description

template<typename BaseWriter = adtf::streaming::cSampleWriter>
class adtf::streaming::hollow::writer_with_request_broker< BaseWriter >

Template that will register a request broker (an implementation of IStreamingRequests) at the connected Sample Stream.

Definition at line 78 of file requestable_writer.h.

Member Function Documentation

◆ BeginStreaming()

template<typename BaseWriter = adtf::streaming::cSampleWriter>
tResult BeginStreaming ( streaming::ant::ISampleStream & pStream)
inlineoverridevirtual

Begin streaming on the given sample stream.

Parameters
[in]pStreamthe sample stream.
Returns
Standard result.

Reimplemented from cSampleWriter.

Definition at line 91 of file requestable_writer.h.

References adtf::ucom::make_object_ptr(), RETURN_IF_FAILED, RETURN_IF_POINTER_NULL_DESC, and adtf::ucom::ucom_cast().

◆ EndStreaming()

template<typename BaseWriter = adtf::streaming::cSampleWriter>
tResult EndStreaming ( )
inlineoverridevirtual

End streaming.

Returns
Standard result.

Reimplemented from cSampleWriter.

Definition at line 102 of file requestable_writer.h.

References RETURN_NOERROR.

Referenced by requestable_writer< BaseWriter >::EndStreaming().

◆ SetBroker()

template<typename BaseWriter = adtf::streaming::cSampleWriter>
void SetBroker ( const ucom::ant::iobject_ptr< IStreamingRequests > & pBroker)
inline

Use this to set the broker instance after the writer has been created.

Parameters
[in]pBrokerThe broker.

Definition at line 86 of file requestable_writer.h.

Referenced by requestable_writer< BaseWriter >::requestable_writer().

Member Data Documentation

◆ m_pBroker

template<typename BaseWriter = adtf::streaming::cSampleWriter>
ucom::ant::object_ptr<IStreamingRequests> m_pBroker
private

Definition at line 114 of file requestable_writer.h.

◆ m_pProxy

template<typename BaseWriter = adtf::streaming::cSampleWriter>
ucom::ant::object_ptr<ant::IBindingProxy> m_pProxy
private

Definition at line 115 of file requestable_writer.h.