47 std::function<
void(uint32_t)> fnDisable);
63 uint32_t nSubStreamId,
69 class cImplementation;
70 std::unique_ptr<cImplementation> m_pImplementation;
77 template <
typename BaseWriter = adtf::streaming::cSampleWriter>
88 m_pBroker.Reset(pBroker);
93 auto pHollowStream = ucom::ucom_cast<IInternalBindingProxy*>(&oSampleStream);
99 return BaseWriter::BeginStreaming(oSampleStream);
104 BaseWriter::EndStreaming();
107 m_pProxy->UnbindServerObject(m_pBroker);
124 template <
typename BaseWriter = adtf::streaming::cSampleWriter>
146 std::function<
void(uint32_t)> fnDisable)
148 m_pBroker->SetCallbacks(fnEnable, fnDisable);
153 m_pBroker->UpdateType(pType);
154 return BaseWriter::SetType(pType);
172 bool bDisableCurrentRequests,
173 bool bCallDisableCallback)
181 bool bDisableCurrentRequests,
182 bool bCallDisableCallback,
185 if (bDisableCurrentRequests)
187 m_pBroker->DisableCurrentRequests(bCallDisableCallback);
192 m_pBroker->UpdateType(pType);
205 m_pBroker->DisableCurrentRequests(
false);
216 using hollow::requestable_writer;
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
#define RETURN_IF_POINTER_NULL_DESC(_ptr,...)
Return ERR_POINTER with description if _ptr is nullptr, which requires the calling function's return ...
#define RETURN_IF_FAILED(s)
Return if expression is failed, which requires the calling function's return type to be tResult.
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
A common result class usable as return value throughout.
Defintion of a property set container interface.
Interface of the SampleStream.
This base implementation of a sample writer is samples and types to the given pin set at adtf::stream...
Interface for reacting synchrounously to stream type changes.
This is the default implementation of IStreamingRequests used by requestable_writer.
void UpdateType(const ucom::ant::iobject_ptr< const IStreamType > &pType)
Call this when you updated your Substreams type.
~cRequestBroker() override
Destructor.
void DisableCurrentRequests(bool bCallDisableCallback=false)
This will disable all current requests.
cRequestBroker(cSampleWriter *pWriter=nullptr)
Default constructor.
void 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.
Writer that registers a request broker (cRequestBroker) at the connected sample stream.
tResult ChangeType(const ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override
Communicates a type change for all following samples.
tResult EndStreaming() override
End streaming.
tResult ChangeType(const ucom::ant::iobject_ptr< const ant::IStreamType > &pType, bool bDisableCurrentRequests, bool bCallDisableCallback)
Writes a new Stream Type to the Sample Stream.
requestable_writer()
Default constructor.
tResult SetType(const ucom::ant::iobject_ptr< const ant::IStreamType > &pType) override
Sets the initial stream type of a streamer.
void SetCallbacks(std::function< void(uint32_t, const base::IProperties *)> fnEnable, std::function< void(uint32_t)> fnDisable)
Sets the callbacks for activating and deactivating substreams.
Template that will register a request broker (an implementation of IStreamingRequests) at the connect...
tResult BeginStreaming(streaming::ant::ISampleStream &oSampleStream) override
Begin streaming on the given sample stream.
void SetBroker(const ucom::ant::iobject_ptr< IStreamingRequests > &pBroker)
Use this to set the broker instance after the writer has been created.
tResult EndStreaming() override
End streaming.
Base object pointer to realize binary compatible reference counting in interface methods.
Object pointer implementation used for reference counting on objects of type IObject.
Use this template if you want to implement an ucom::ant::IObject based Interface and/or subclass an e...
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
std::enable_if< !std::is_base_of< enable_object_ptr_from_this< typename std::remove_cv< Implementation >::type >, typename std::remove_cv< Implementation >::type >::value, object_ptr< Implementation > >::type make_object_ptr(Args &&... args)
Create an instance of type object_ptr with Implementation as the shared resource.
Namespace for entire ADTF SDK.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.