GNU Radio Manual and C++ API Reference 3.7.14.0
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 * 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 <gnuradio/msg_queue.h>
27#include <gnuradio/uhd/api.h>
28#include <uhd/usrp/multi_usrp.hpp>
29
30namespace gr {
31namespace uhd {
32
33class uhd_amsg_source;
34
36{
37public:
38 // gr::uhd::amsg_source::sptr
39 typedef boost::shared_ptr<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, msg_queue::sptr msgq);
55
56 /*!
57 * Convert a raw asynchronous message to an asynchronous metatdata object.
58 * \return The asynchronous metadata object.
59 */
60 static ::uhd::async_metadata_t msg_to_async_metadata_t(const message::sptr msg);
61};
62
63} /* namespace uhd */
64} /* namespace gr */
65
66#endif /* INCLUDED_GR_UHD_AMSG_SOURCE_H */
boost::shared_ptr< message > sptr
Definition: message.h:42
boost::shared_ptr< msg_queue > sptr
Definition: msg_queue.h:47
Definition: amsg_source.h:36
::uhd::async_metadata_t msg_to_async_metadata_t(const message::sptr msg)
virtual ~amsg_source()
Destructor.
Definition: amsg_source.h:48
boost::shared_ptr< amsg_source > sptr
Definition: amsg_source.h:39
#define GR_UHD_API
Definition: gr-uhd/include/gnuradio/uhd/api.h:30
static sptr make(const ::uhd::device_addr_t &device_addr, msg_queue::sptr msgq)
Make a new USRP asynchronous message-based source block.
static purpose_t msg
Definition: source_logger.h:39
Include this header to use the message passing features.
Definition: basic_block.h:45
Definition: usrp_sink.h:30