mb_endpoint.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /*
00003  * Copyright 2006,2008 Free Software Foundation, Inc.
00004  * 
00005  * This file is part of GNU Radio
00006  * 
00007  * GNU Radio is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 3, or (at your option)
00010  * any later version.
00011  * 
00012  * GNU Radio is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  * 
00017  * You should have received a copy of the GNU General Public License along
00018  * with this program; if not, write to the Free Software Foundation, Inc.,
00019  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00020  */
00021 
00022 #ifndef INCLUDED_MB_ENDPOINT_H
00023 #define INCLUDED_MB_ENDPOINT_H
00024 
00025 #include <string>
00026 #include <mblock/port.h>
00027 
00028 /*!
00029  * \brief Endpoint specification for connection
00030  */
00031 class mb_endpoint
00032 {
00033   std::string   d_component_name;
00034   std::string   d_port_name;
00035   mb_port_sptr  d_port;                 // the port object that this maps to
00036 
00037 public:
00038   mb_endpoint(){}
00039 
00040   mb_endpoint(const std::string &component_name,
00041               const std::string &port_name,
00042               mb_port_sptr port)
00043     : d_component_name(component_name),
00044       d_port_name(port_name),
00045       d_port(port) {}
00046 
00047   const std::string &component_name() const { return d_component_name; }
00048   const std::string &port_name() const { return d_port_name; }
00049   mb_port_sptr port() const { return d_port; }
00050 
00051   //! Does this endpoint represent the inside of a relay port
00052   bool inside_of_relay_port_p() const;
00053 
00054   pmt_t incoming_message_set() const;
00055   pmt_t outgoing_message_set() const;
00056 };
00057 
00058 #endif /* INCLUDED_MB_ENDPOINT_H */

Generated on Wed Jul 29 06:24:26 2009 for GNU Radio 3.2.2 C++ API by  doxygen 1.5.9