GNU Radio Manual and C++ API Reference  3.7.4
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_GR_UHD_AMSG_SOURCE_H
24 #define INCLUDED_GR_UHD_AMSG_SOURCE_H
25 
26 #include <uhd/usrp/multi_usrp.hpp>
27 #include <gnuradio/uhd/api.h>
28 #include <gnuradio/msg_queue.h>
29 
30 namespace gr {
31  namespace uhd {
32 
33  class uhd_amsg_source;
34 
36  {
37  public:
38  // gr::uhd::amsg_source::sptr
40 
41  /*!
42  * \brief Destructor
43  *
44  * This must be explicitly defined because there is no block inheritance
45  * for this class, and thus no virtual destructor pulled into the class
46  * hierarchy for sub-classes.
47  */
48  virtual ~amsg_source(){}
49 
50  /*!
51  * \brief Make a new USRP asynchronous message-based source block.
52  * \ingroup uhd_blk
53  */
54  static sptr make(const ::uhd::device_addr_t &device_addr,
55  msg_queue::sptr msgq);
56 
57  /*!
58  * Convert a raw asynchronous message to an asynchronous metatdata object.
59  * \return The asynchronous metadata object.
60  */
61  static ::uhd::async_metadata_t
62  msg_to_async_metadata_t(const message::sptr msg);
63  };
64 
65  } /* namespace uhd */
66 } /* namespace gr */
67 
68 #endif /* INCLUDED_GR_UHD_AMSG_SOURCE_H */
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
Definition: amsg_source.h:35
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:30
boost::shared_ptr< amsg_source > sptr
Definition: amsg_source.h:39
virtual ~amsg_source()
Destructor.
Definition: amsg_source.h:48