GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
amsg_source.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011,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_GR_UHD_AMSG_SOURCE_H
12 #define INCLUDED_GR_UHD_AMSG_SOURCE_H
13 
14 #include <gnuradio/msg_queue.h>
15 #include <gnuradio/uhd/api.h>
16 #include <uhd/usrp/multi_usrp.hpp>
17 
18 namespace gr {
19 namespace uhd {
20 
21 class uhd_amsg_source;
22 
24 {
25 public:
26  // gr::uhd::amsg_source::sptr
27  typedef std::shared_ptr<amsg_source> sptr;
28 
29  /*!
30  * \brief Destructor
31  *
32  * This must be explicitly defined because there is no block inheritance
33  * for this class, and thus no virtual destructor pulled into the class
34  * hierarchy for sub-classes.
35  */
36  virtual ~amsg_source() {}
37 
38  /*!
39  * \brief Make a new USRP asynchronous message-based source block.
40  * \ingroup uhd_blk
41  */
42  static sptr make(const ::uhd::device_addr_t& device_addr, msg_queue::sptr msgq);
43 
44  /*!
45  * Convert a raw asynchronous message to an asynchronous metadata object.
46  * \return The asynchronous metadata object.
47  */
48  static ::uhd::async_metadata_t msg_to_async_metadata_t(const message::sptr msg);
49 };
50 
51 } /* namespace uhd */
52 } /* namespace gr */
53 
54 #endif /* INCLUDED_GR_UHD_AMSG_SOURCE_H */
std::shared_ptr< message > sptr
Definition: message.h:30
std::shared_ptr< msg_queue > sptr
Definition: msg_queue.h:35
Definition: amsg_source.h:24
::uhd::async_metadata_t msg_to_async_metadata_t(const message::sptr msg)
virtual ~amsg_source()
Destructor.
Definition: amsg_source.h:36
std::shared_ptr< amsg_source > sptr
Definition: amsg_source.h:27
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:18
static sptr make(const ::uhd::device_addr_t &device_addr, msg_queue::sptr msgq)
Make a new USRP asynchronous message-based source block.
GR_RUNTIME_API const pmt::pmt_t msg()
GNU Radio logging wrapper.
Definition: basic_block.h:29