GNU Radio C++ API Reference 3.10.12.0
The Free & Open Software Radio Ecosystem
Loading...
Searching...
No Matches
StreamReceiver.h
Go to the documentation of this file.
1/**
2 * Autogenerated by Thrift Compiler (0.22.0)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated
6 */
7#ifndef StreamReceiver_H
8#define StreamReceiver_H
9
10#include <thrift/TDispatchProcessor.h>
11#include <thrift/async/TConcurrentClientSyncInfo.h>
12#include <memory>
13#include "gnuradio_types.h"
14
15namespace GNURadio {
16
17#ifdef _MSC_VER
18 #pragma warning( push )
19 #pragma warning (disable : 4250 ) //inheriting methods via dominance
20#endif
21
23 public:
24 virtual ~StreamReceiverIf() {}
25 virtual void push(const VectorC& data) = 0;
26};
27
29 public:
31
33
34 virtual StreamReceiverIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0;
35 virtual void releaseHandler(StreamReceiverIf* /* handler */) = 0;
36 };
37
39 public:
40 StreamReceiverIfSingletonFactory(const ::std::shared_ptr<StreamReceiverIf>& iface) : iface_(iface) {}
42
43 virtual StreamReceiverIf* getHandler(const ::apache::thrift::TConnectionInfo&) override {
44 return iface_.get();
45 }
46 virtual void releaseHandler(StreamReceiverIf* /* handler */) override {}
47
48 protected:
49 ::std::shared_ptr<StreamReceiverIf> iface_;
50};
51
52class StreamReceiverNull : virtual public StreamReceiverIf {
53 public:
55 void push(const VectorC& /* data */) override {
56 return;
57 }
58};
59
64
66 public:
67
71
72 virtual ~StreamReceiver_push_args() noexcept;
74
76
77 void __set_data(const VectorC& val);
78
79 bool operator == (const StreamReceiver_push_args & rhs) const;
80 bool operator != (const StreamReceiver_push_args &rhs) const {
81 return !(*this == rhs);
82 }
83
85
86 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
87 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
88
89};
90
91
93 public:
94
95
96 virtual ~StreamReceiver_push_pargs() noexcept;
97 const VectorC* data;
98
99 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
100
101};
102
103
105 public:
106
110
111 virtual ~StreamReceiver_push_result() noexcept;
112
113 bool operator == (const StreamReceiver_push_result & /* rhs */) const;
114 bool operator != (const StreamReceiver_push_result &rhs) const {
115 return !(*this == rhs);
116 }
117
118 bool operator < (const StreamReceiver_push_result & ) const;
119
120 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
121 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
122
123};
124
125
127 public:
128
129
131
132 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
133
134};
135
137 public:
138 StreamReceiverClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
139 setProtocol(prot);
140 }
141 StreamReceiverClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
142 setProtocol(iprot,oprot);
143 }
144 private:
145 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
146 setProtocol(prot,prot);
147 }
148 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
149 piprot_=iprot;
150 poprot_=oprot;
151 iprot_ = iprot.get();
152 oprot_ = oprot.get();
153 }
154 public:
155 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
156 return piprot_;
157 }
158 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
159 return poprot_;
160 }
161 void push(const VectorC& data) override;
162 void send_push(const VectorC& data);
163 void recv_push();
164 protected:
165 std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
166 std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
167 ::apache::thrift::protocol::TProtocol* iprot_;
168 ::apache::thrift::protocol::TProtocol* oprot_;
169};
170
171class StreamReceiverProcessor : public ::apache::thrift::TDispatchProcessor {
172 protected:
173 ::std::shared_ptr<StreamReceiverIf> iface_;
174 virtual bool dispatchCall(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, const std::string& fname, int32_t seqid, void* callContext) override;
175 private:
176 typedef void (StreamReceiverProcessor::*ProcessFunction)(int32_t, ::apache::thrift::protocol::TProtocol*, ::apache::thrift::protocol::TProtocol*, void*);
177 typedef std::map<std::string, ProcessFunction> ProcessMap;
178 ProcessMap processMap_;
179 void process_push(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
180 public:
181 StreamReceiverProcessor(::std::shared_ptr<StreamReceiverIf> iface) :
182 iface_(iface) {
183 processMap_["push"] = &StreamReceiverProcessor::process_push;
184 }
185
187};
188
189class StreamReceiverProcessorFactory : public ::apache::thrift::TProcessorFactory {
190 public:
191 StreamReceiverProcessorFactory(const ::std::shared_ptr< StreamReceiverIfFactory >& handlerFactory) noexcept :
192 handlerFactory_(handlerFactory) {}
193
194 ::std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) override;
195
196 protected:
197 ::std::shared_ptr< StreamReceiverIfFactory > handlerFactory_;
198};
199
201 public:
202 StreamReceiverMultiface(std::vector<std::shared_ptr<StreamReceiverIf> >& ifaces) : ifaces_(ifaces) {
203 }
205 protected:
206 std::vector<std::shared_ptr<StreamReceiverIf> > ifaces_;
208 void add(::std::shared_ptr<StreamReceiverIf> iface) {
209 ifaces_.push_back(iface);
210 }
211 public:
212 void push(const VectorC& data) override {
213 size_t sz = ifaces_.size();
214 size_t i = 0;
215 for (; i < (sz - 1); ++i) {
216 ifaces_[i]->push(data);
217 }
218 ifaces_[i]->push(data);
219 }
220
221};
222
223// The 'concurrent' client is a thread safe client that correctly handles
224// out of order responses. It is slower than the regular client, so should
225// only be used when you need to share a connection among multiple threads
227 public:
228 StreamReceiverConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
229{
230 setProtocol(prot);
231 }
232 StreamReceiverConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync) : sync_(sync)
233{
234 setProtocol(iprot,oprot);
235 }
236 private:
237 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) {
238 setProtocol(prot,prot);
239 }
240 void setProtocol(std::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) {
241 piprot_=iprot;
242 poprot_=oprot;
243 iprot_ = iprot.get();
244 oprot_ = oprot.get();
245 }
246 public:
247 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() {
248 return piprot_;
249 }
250 std::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() {
251 return poprot_;
252 }
253 void push(const VectorC& data) override;
254 int32_t send_push(const VectorC& data);
255 void recv_push(const int32_t seqid);
256 protected:
257 std::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_;
258 std::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_;
259 ::apache::thrift::protocol::TProtocol* iprot_;
260 ::apache::thrift::protocol::TProtocol* oprot_;
261 std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync_;
262};
263
264#ifdef _MSC_VER
265 #pragma warning( pop )
266#endif
267
268} // namespace
269
270#endif
::apache::thrift::protocol::TProtocol * iprot_
Definition StreamReceiver.h:167
std::shared_ptr< ::apache::thrift::protocol::TProtocol > getInputProtocol()
Definition StreamReceiver.h:155
void push(const VectorC &data) override
::apache::thrift::protocol::TProtocol * oprot_
Definition StreamReceiver.h:168
StreamReceiverClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol > iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol > oprot)
Definition StreamReceiver.h:141
void send_push(const VectorC &data)
std::shared_ptr< ::apache::thrift::protocol::TProtocol > piprot_
Definition StreamReceiver.h:165
StreamReceiverClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol > prot)
Definition StreamReceiver.h:138
std::shared_ptr< ::apache::thrift::protocol::TProtocol > getOutputProtocol()
Definition StreamReceiver.h:158
std::shared_ptr< ::apache::thrift::protocol::TProtocol > poprot_
Definition StreamReceiver.h:166
std::shared_ptr< ::apache::thrift::protocol::TProtocol > piprot_
Definition StreamReceiver.h:257
void push(const VectorC &data) override
std::shared_ptr< ::apache::thrift::protocol::TProtocol > poprot_
Definition StreamReceiver.h:258
int32_t send_push(const VectorC &data)
StreamReceiverConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol > prot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo > sync)
Definition StreamReceiver.h:228
StreamReceiverConcurrentClient(std::shared_ptr< ::apache::thrift::protocol::TProtocol > iprot, std::shared_ptr< ::apache::thrift::protocol::TProtocol > oprot, std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo > sync)
Definition StreamReceiver.h:232
std::shared_ptr< ::apache::thrift::protocol::TProtocol > getInputProtocol()
Definition StreamReceiver.h:247
std::shared_ptr< ::apache::thrift::protocol::TProtocol > getOutputProtocol()
Definition StreamReceiver.h:250
std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo > sync_
Definition StreamReceiver.h:261
::apache::thrift::protocol::TProtocol * iprot_
Definition StreamReceiver.h:259
::apache::thrift::protocol::TProtocol * oprot_
Definition StreamReceiver.h:260
void recv_push(const int32_t seqid)
Definition StreamReceiver.h:28
virtual StreamReceiverIf * getHandler(const ::apache::thrift::TConnectionInfo &connInfo)=0
StreamReceiverIf Handler
Definition StreamReceiver.h:30
virtual void releaseHandler(StreamReceiverIf *)=0
virtual ~StreamReceiverIfFactory()
Definition StreamReceiver.h:32
virtual StreamReceiverIf * getHandler(const ::apache::thrift::TConnectionInfo &) override
Definition StreamReceiver.h:43
virtual ~StreamReceiverIfSingletonFactory()
Definition StreamReceiver.h:41
::std::shared_ptr< StreamReceiverIf > iface_
Definition StreamReceiver.h:49
StreamReceiverIfSingletonFactory(const ::std::shared_ptr< StreamReceiverIf > &iface)
Definition StreamReceiver.h:40
virtual void releaseHandler(StreamReceiverIf *) override
Definition StreamReceiver.h:46
Definition StreamReceiver.h:22
virtual void push(const VectorC &data)=0
virtual ~StreamReceiverIf()
Definition StreamReceiver.h:24
virtual ~StreamReceiverMultiface()
Definition StreamReceiver.h:204
StreamReceiverMultiface(std::vector< std::shared_ptr< StreamReceiverIf > > &ifaces)
Definition StreamReceiver.h:202
std::vector< std::shared_ptr< StreamReceiverIf > > ifaces_
Definition StreamReceiver.h:206
void add(::std::shared_ptr< StreamReceiverIf > iface)
Definition StreamReceiver.h:208
void push(const VectorC &data) override
Definition StreamReceiver.h:212
StreamReceiverMultiface()
Definition StreamReceiver.h:207
Definition StreamReceiver.h:52
virtual ~StreamReceiverNull()
Definition StreamReceiver.h:54
void push(const VectorC &) override
Definition StreamReceiver.h:55
::std::shared_ptr< StreamReceiverIfFactory > handlerFactory_
Definition StreamReceiver.h:197
::std::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo &connInfo) override
StreamReceiverProcessorFactory(const ::std::shared_ptr< StreamReceiverIfFactory > &handlerFactory) noexcept
Definition StreamReceiver.h:191
StreamReceiverProcessor(::std::shared_ptr< StreamReceiverIf > iface)
Definition StreamReceiver.h:181
virtual ~StreamReceiverProcessor()
Definition StreamReceiver.h:186
::std::shared_ptr< StreamReceiverIf > iface_
Definition StreamReceiver.h:173
virtual bool dispatchCall(::apache::thrift::protocol::TProtocol *iprot, ::apache::thrift::protocol::TProtocol *oprot, const std::string &fname, int32_t seqid, void *callContext) override
bool operator<(const StreamReceiver_push_args &) const
StreamReceiver_push_args(const StreamReceiver_push_args &)
uint32_t read(::apache::thrift::protocol::TProtocol *iprot)
uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const
StreamReceiver_push_args & operator=(const StreamReceiver_push_args &)
VectorC data
Definition StreamReceiver.h:73
_StreamReceiver_push_args__isset __isset
Definition StreamReceiver.h:75
void __set_data(const VectorC &val)
Definition StreamReceiver.h:92
uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const
virtual ~StreamReceiver_push_pargs() noexcept
const VectorC * data
Definition StreamReceiver.h:97
Definition StreamReceiver.h:126
virtual ~StreamReceiver_push_presult() noexcept
uint32_t read(::apache::thrift::protocol::TProtocol *iprot)
StreamReceiver_push_result & operator=(const StreamReceiver_push_result &) noexcept
StreamReceiver_push_result(const StreamReceiver_push_result &) noexcept
uint32_t read(::apache::thrift::protocol::TProtocol *iprot)
uint32_t write(::apache::thrift::protocol::TProtocol *oprot) const
Definition ControlPort.h:15
std::string VectorC
Definition gnuradio_types.h:76
struct GNURadio::_StreamReceiver_push_args__isset _StreamReceiver_push_args__isset
Definition thrift_application_base.h:28
Definition StreamReceiver.h:60
bool data
Definition StreamReceiver.h:62
_StreamReceiver_push_args__isset()
Definition StreamReceiver.h:61