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_PROTOCOL_CLASS_H
22 #define INCLUDED_MB_PROTOCOL_CLASS_H
24 #include <mb_common.h>
26 // FIXME maybe this should just be a pmt_t aggregate???
28 class mb_protocol_class;
29 typedef boost::shared_ptr<mb_protocol_class> mb_protocol_class_sptr;
32 * \brief construct a protocol_class and return boost::shared_ptr
34 * \param name the name of the class (symbol)
35 * \param incoming incoming message set (dict: keys are message types)
36 * \param outgoing outgoing message set (dict: keys are message types)
38 mb_protocol_class_sptr
39 mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
41 class mb_protocol_class {
46 friend mb_protocol_class_sptr
47 mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
49 // private constructor
50 mb_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing);
55 pmt_t name() const { return d_name; }
56 pmt_t incoming() const { return d_incoming; }
57 pmt_t outgoing() const { return d_outgoing; }
59 mb_protocol_class_sptr conj() const; // return the conjugate of this protocol class
62 #endif /* INCLUDED_MB_PROTOCOL_CLASS_H */