ADTF
Loading...
Searching...
No Matches
streaming_sink.h
Go to the documentation of this file.
1
7#pragma once
8#include "runtime_behaviour.h"
9#include "streaming_source.h"
10#include "streaming_sink_intf.h"
11#include "data_binding.h"
12#include "named_graph_object.h"
13#include "interface_binding.h"
15
16namespace adtf
17{
18namespace streaming
19{
20namespace ant
21{
46 public cRuntimeBehaviour,
47 public streaming_level_machine,
48 public ucom::catwo::object<ucom::ant::cClassInfo,
49 base::ant::configuration<>,
50 IDynamicDataBinding,
51 IStreamingService,
52 IStreamingSink,
53 data_binding<named_graph_object<ISampleStreamingSink>>>
54{
55
56private:
58 A_UTILS_D(cSampleStreamingSink)
59
60public:
67 cSampleStreamingSink(const char* strName);
70
71public:
72 tResult SetState(tStreamingState eState) override;
73 IStreamingSink::tStreamingState GetState() override;
74
75 tResult RequestPin(const char* strName,
78 tResult RequestPin(const char* strName,
81
83 tResult RegisterPin(const ucom::ant::iobject_ptr<IPin>& pPin);
84
85
86
87 tResult Destruct() override;
90
91public:
94};
95}
96
97namespace catwo
98{
103 public ucom::catwo::object<ant::cSampleStreamingSink, interface_binding<>>
104 {
105 public:
106 using cInterfaceBinding::RegisterBindingObject;
107 tResult RegisterBindingObject(const ucom::ant::iobject_ptr<IBindingObject>& pBindingObject) override
108 {
109 RETURN_IF_POINTER_NULL(pBindingObject.Get());
110
111 pBindingObject.Get()->SetParent(static_cast<INamedGraphObject*>(this));
112
113 return cInterfaceBinding::RegisterBindingObject(pBindingObject);
114 }
115
116 };
117
127 template<typename INTERFACE>
129 const char* strServerName,
130 const adtf::ucom::iobject_ptr<INTERFACE>& pServerInterface)
131 {
132 using namespace adtf::ucom;
133 object_ptr<IBindingServer> pBindingServer = make_object_ptr<cBindingServer>(strServerName,
135 ucom_object_ptr_cast<IObject>(pServerInterface));
136 RETURN_IF_FAILED(oStreamingSink.RegisterBindingObject(pBindingServer));
138 }
139
147 template<typename INTERFACE>
148 tResult create_client(cSampleStreamingSink& oStreamingSink, const char* strClientName)
149 {
150 using namespace adtf::ucom;
151 object_ptr<IBindingClient> pBindingClient = make_object_ptr<cBindingClient>(strClientName,
153 RETURN_IF_FAILED(oStreamingSink.RegisterBindingObject(pBindingClient));
155 }
156
157}
158
159
160using catwo::cSampleStreamingSink;
161
162}
163}
A_UTILS_NS::cResult tResult
For backwards compatibility and to bring latest version into scope.
Definition result.h:736
#define RETURN_NOERROR
Return status ERR_NOERROR, which requires the calling function's return type to be tResult.
Definition result.h:29
#define RETURN_IF_POINTER_NULL(_ptr)
Return ERR_POINTER if _ptr is nullptr, which requires the calling function's return type to be tResul...
Definition result.h:49
Definition named_graph_object_intf.h:25
tStreamingState
Definition streaming_source_intf.h:36
Definition interface_binding_type.h:96
virtual tResult RegisterPin(const ucom::ant::iobject_ptr< IPin > &pIPin)
virtual tResult RegisterRunner(const ucom::ant::iobject_ptr< IRunner > &pRunner)
virtual tResult RegisterInnerPipe(const ucom::ant::iobject_ptr< ITriggerPipe > &pTriggerPipe)
Definition streaming_sink.h:104
virtual T * Get() const =0
Get raw pointer to shared object.
Base object pointer to realize binary compatible reference counting in interface methods.
Definition object_ptr_intf.h:112
Definition object_ptr.h:384
Definition object.h:397
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Definition bindingproxyoutport.h:16
Namespace for all functionality of the ADTF Streaming SDK provided since v3.2.
Definition bindingproxyinport.h:16
tResult create_server(cSampleStreamingSink &oStreamingSink, const char *strServerName, const adtf::ucom::iobject_ptr< INTERFACE > &pServerInterface)
Definition streaming_sink.h:128
tResult create_client(cSampleStreamingSink &oStreamingSink, const char *strClientName)
Definition streaming_sink.h:148
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
Namespace for the ADTF uCOM SDK.
Definition adtf_system.h:324
object_ptr< T > ucom_object_ptr_cast(object_ptr< T > oCasted)
Alias always bringing the latest version of ant::ucom_object_ptr_cast() into scope.
Definition object_ptr_utilities.h:104
ant::iobject_ptr< T > iobject_ptr
Alias always bringing the latest version of ant::iobject_ptr into scope.
Definition object_ptr_intf.h:437
object_ptr< Implementation > make_object_ptr(Args &&... args)
Alias always bringing the latest version of ant::make_object_ptr() into scope.
Definition object_ptr_utilities.h:129
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14