3 * Copyright 2006 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
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 2, or (at your option)
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.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef INCLUDED_MB_PORT_H
22 #define INCLUDED_MB_PORT_H
24 #include <mb_common.h>
27 * \brief Public port characteristics
29 class mb_port : boost::noncopyable
33 //! port classification
35 EXTERNAL, //< Externally visible
36 RELAY, //< Externally visible but really connected to a sub-component
37 INTERNAL //< Visible to self only
41 friend class mb_mblock_impl;
43 mb_port_detail_sptr d_detail;
44 std::string d_port_name;
45 pmt_t d_protocol_class;
47 port_type_t d_port_type;
49 // private constructor
50 mb_port(const std::string &port_name,
51 const std::string &protocol_class_name,
53 mb_port::port_type_t port_type);
57 std::string port_name() const { return d_port_name; }
58 pmt_t protocol_class() const { return d_protocol_class; }
59 bool conjugated() const { return d_conjugated; }
60 port_type_t port_type() const { return d_port_type; }
62 pmt_t incoming_message_set() const;
63 pmt_t outgoing_message_set() const;
68 * \brief send a message
70 * \param signal the event name
71 * \param data optional data
72 * \param metadata optional metadata
73 * \param priority the urgency at which the message is sent
78 pmt_t metadata = PMT_NIL,
79 mb_pri_t priority = MB_PRI_DEFAULT);
83 #endif /* INCLUDED_MB_PORT_H */