GNU Radio Manual and C++ API Reference  3.10.3.0
The Free & Open Software Radio Ecosystem
stream_pdu_base.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 
11 #ifndef INCLUDED_STREAM_PDU_BASE_H
12 #define INCLUDED_STREAM_PDU_BASE_H
13 
14 #include <gnuradio/basic_block.h>
15 #include <gnuradio/logger.h>
16 #include <gnuradio/thread/thread.h>
17 #include <pmt/pmt.h>
18 
19 class basic_block;
20 
21 namespace gr {
22 namespace network {
23 
25 {
26 public:
27  stream_pdu_base(int MTU = 10000);
29 
30 protected:
31  int d_fd;
32  bool d_started;
33  bool d_finished;
34  std::vector<uint8_t> d_rxbuf;
36 
39 
40  void run();
41  void send(pmt::pmt_t msg);
42  bool wait_ready();
43  void start_rxthread(basic_block* blk, pmt::pmt_t rxport);
44  void stop_rxthread();
45 
47 };
48 
49 } /* namespace network */
50 } /* namespace gr */
51 
52 #endif /* INCLUDED_STREAM_PDU_BASE_H */
gr::network::stream_pdu_base::d_thread
gr::thread::thread d_thread
Definition: stream_pdu_base.h:35
gr::network::stream_pdu_base::~stream_pdu_base
~stream_pdu_base()
logger.h
gr::network::stream_pdu_base::d_rxbuf
std::vector< uint8_t > d_rxbuf
Definition: stream_pdu_base.h:34
gr::network::stream_pdu_base::run
void run()
gr::network::stream_pdu_base::d_fd
int d_fd
Definition: stream_pdu_base.h:31
gr::network::stream_pdu_base
Definition: stream_pdu_base.h:24
gr::network::stream_pdu_base::d_pdu_debug_logger
gr::logger_ptr d_pdu_debug_logger
Definition: stream_pdu_base.h:46
gr::network::stream_pdu_base::d_finished
bool d_finished
Definition: stream_pdu_base.h:33
gr::msgport_names::msg
const GR_RUNTIME_API pmt::pmt_t msg()
gr::network::stream_pdu_base::d_started
bool d_started
Definition: stream_pdu_base.h:32
gr::basic_block
The abstract base class for all signal processing blocks.
Definition: basic_block.h:61
gr::network::stream_pdu_base::d_port
pmt::pmt_t d_port
Definition: stream_pdu_base.h:37
gr::network::stream_pdu_base::stop_rxthread
void stop_rxthread()
gr::network::stream_pdu_base::start_rxthread
void start_rxthread(basic_block *blk, pmt::pmt_t rxport)
pmt::pmt_t
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83
gr::network::stream_pdu_base::wait_ready
bool wait_ready()
gr::network::stream_pdu_base::d_blk
basic_block * d_blk
Definition: stream_pdu_base.h:38
pmt.h
gr::network::stream_pdu_base::d_pdu_logger
gr::logger_ptr d_pdu_logger
Definition: stream_pdu_base.h:46
basic_block.h
gr::network::stream_pdu_base::stream_pdu_base
stream_pdu_base(int MTU=10000)
gr::thread::thread
boost::thread thread
Definition: thread.h:36
gr
GNU Radio logging wrapper.
Definition: basic_block.h:29
gr::network::stream_pdu_base::send
void send(pmt::pmt_t msg)
gr::logger_ptr
std::shared_ptr< logger > logger_ptr
Definition: logger.h:208
thread.h