GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
messages/msg_accepter.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2009,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_MSG_ACCEPTER_H
12 #define INCLUDED_MSG_ACCEPTER_H
13 
14 #include <gnuradio/api.h>
15 #include <pmt/pmt.h>
16 #include <memory>
17 
18 namespace gr {
19 namespace messages {
20 
21 /*!
22  * \brief Virtual base class that accepts messages
23  */
25 {
26 public:
28  virtual ~msg_accepter();
29 
30  /*!
31  * \brief send \p msg to \p msg_accepter on port \p which_port
32  *
33  * Sending a message is an asynchronous operation. The \p post
34  * call will not wait for the message either to arrive at the
35  * destination or to be received.
36  */
37  virtual void post(pmt::pmt_t which_port, pmt::pmt_t msg) = 0;
38 };
39 
40 typedef std::shared_ptr<msg_accepter> msg_accepter_sptr;
41 
42 } /* namespace messages */
43 } /* namespace gr */
44 
45 #endif /* INCLUDED_MSG_ACCEPTER_H */
Virtual base class that accepts messages.
Definition: messages/msg_accepter.h:25
virtual void post(pmt::pmt_t which_port, pmt::pmt_t msg)=0
send msg to msg_accepter on port which_port
msg_accepter()
Definition: messages/msg_accepter.h:27
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
GR_RUNTIME_API const pmt::pmt_t msg()
GNU Radio logging wrapper.
Definition: basic_block.h:29
std::shared_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting).
Definition: pmt.h:83