summaryrefslogtreecommitdiff
path: root/include/gnuradio
diff options
context:
space:
mode:
authorJosh Blum2012-09-05 21:57:56 -0700
committerJosh Blum2012-09-05 21:57:56 -0700
commit790fdae23bd4c322218dbb3ce9866d34937a6780 (patch)
tree4b9aa7ffc56207596781dec6f814ad4fa8177394 /include/gnuradio
parentc3809c21067f985a0a88cff4bef544fba9415e30 (diff)
downloadsandhi-790fdae23bd4c322218dbb3ce9866d34937a6780.tar.gz
sandhi-790fdae23bd4c322218dbb3ce9866d34937a6780.tar.bz2
sandhi-790fdae23bd4c322218dbb3ce9866d34937a6780.zip
dont need extra copies of these files, use them from gnuradio
Diffstat (limited to 'include/gnuradio')
-rw-r--r--include/gnuradio/gr_complex.h46
-rw-r--r--include/gnuradio/gr_message.h91
-rw-r--r--include/gnuradio/gr_msg_handler.h43
-rw-r--r--include/gnuradio/gr_msg_queue.h92
-rw-r--r--include/gnuradio/gr_sys_paths.h33
-rw-r--r--include/gnuradio/gr_unittests.h43
6 files changed, 0 insertions, 348 deletions
diff --git a/include/gnuradio/gr_complex.h b/include/gnuradio/gr_complex.h
deleted file mode 100644
index 7580021..0000000
--- a/include/gnuradio/gr_complex.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_GR_COMPLEX_H
-#define INCLUDED_GR_COMPLEX_H
-
-#include <complex>
-typedef std::complex<float> gr_complex;
-typedef std::complex<double> gr_complexd;
-
-
-inline bool is_complex (gr_complex x) { return true;}
-inline bool is_complex (gr_complexd x) { return true;}
-inline bool is_complex (float x) { return false;}
-inline bool is_complex (double x) { return false;}
-inline bool is_complex (int x) { return false;}
-inline bool is_complex (char x) { return false;}
-inline bool is_complex (short x) { return false;}
-
-
-// this doesn't really belong here, but there are worse places for it...
-
-#define CPPUNIT_ASSERT_COMPLEXES_EQUAL(expected,actual,delta) \
- CPPUNIT_ASSERT_DOUBLES_EQUAL (expected.real(), actual.real(), delta); \
- CPPUNIT_ASSERT_DOUBLES_EQUAL (expected.imag(), actual.imag(), delta);
-
-#endif /* INCLUDED_GR_COMPLEX_H */
-
diff --git a/include/gnuradio/gr_message.h b/include/gnuradio/gr_message.h
deleted file mode 100644
index d386ca0..0000000
--- a/include/gnuradio/gr_message.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_GR_MESSAGE_H
-#define INCLUDED_GR_MESSAGE_H
-
-#include <gr_core_api.h>
-#include <gr_types.h>
-#include <string>
-
-class gr_message;
-typedef boost::shared_ptr<gr_message> gr_message_sptr;
-
-/*!
- * \brief public constructor for gr_message
- */
-GR_CORE_API gr_message_sptr
-gr_make_message(long type = 0, double arg1 = 0, double arg2 = 0, size_t length = 0);
-
-GR_CORE_API gr_message_sptr
-gr_make_message_from_string(const std::string s, long type = 0, double arg1 = 0, double arg2 = 0);
-
-/*!
- * \brief Message class.
- *
- * \ingroup misc
- * The ideas and method names for adjustable message length were
- * lifted from the click modular router "Packet" class.
- */
-class GR_CORE_API gr_message {
- gr_message_sptr d_next; // link field for msg queue
- long d_type; // type of the message
- double d_arg1; // optional arg1
- double d_arg2; // optional arg2
-
- unsigned char *d_buf_start; // start of allocated buffer
- unsigned char *d_msg_start; // where the msg starts
- unsigned char *d_msg_end; // one beyond end of msg
- unsigned char *d_buf_end; // one beyond end of allocated buffer
-
- gr_message (long type, double arg1, double arg2, size_t length);
-
- friend GR_CORE_API gr_message_sptr
- gr_make_message (long type, double arg1, double arg2, size_t length);
-
- friend GR_CORE_API gr_message_sptr
- gr_make_message_from_string (const std::string s, long type, double arg1, double arg2);
-
- friend class gr_msg_queue;
-
- unsigned char *buf_data() const { return d_buf_start; }
- size_t buf_len() const { return d_buf_end - d_buf_start; }
-
-public:
- ~gr_message ();
-
- long type() const { return d_type; }
- double arg1() const { return d_arg1; }
- double arg2() const { return d_arg2; }
-
- void set_type(long type) { d_type = type; }
- void set_arg1(double arg1) { d_arg1 = arg1; }
- void set_arg2(double arg2) { d_arg2 = arg2; }
-
- unsigned char *msg() const { return d_msg_start; }
- size_t length() const { return d_msg_end - d_msg_start; }
- std::string to_string() const;
-
-};
-
-GR_CORE_API long gr_message_ncurrently_allocated ();
-
-#endif /* INCLUDED_GR_MESSAGE_H */
diff --git a/include/gnuradio/gr_msg_handler.h b/include/gnuradio/gr_msg_handler.h
deleted file mode 100644
index 57e8a95..0000000
--- a/include/gnuradio/gr_msg_handler.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_GR_MSG_HANDLER_H
-#define INCLUDED_GR_MSG_HANDLER_H
-
-#include <gr_core_api.h>
-#include <gr_message.h>
-
-class gr_msg_handler;
-typedef boost::shared_ptr<gr_msg_handler> gr_msg_handler_sptr;
-
-/*!
- * \brief abstract class of message handlers
- * \ingroup base
- */
-class GR_CORE_API gr_msg_handler {
-public:
- virtual ~gr_msg_handler ();
-
- //! handle \p msg
- virtual void handle (gr_message_sptr msg) = 0;
-};
-
-#endif /* INCLUDED_GR_MSG_HANDLER_H */
diff --git a/include/gnuradio/gr_msg_queue.h b/include/gnuradio/gr_msg_queue.h
deleted file mode 100644
index 86440bb..0000000
--- a/include/gnuradio/gr_msg_queue.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2009 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef INCLUDED_GR_MSG_QUEUE_H
-#define INCLUDED_GR_MSG_QUEUE_H
-
-#include <gr_core_api.h>
-#include <gr_msg_handler.h>
-#include <gruel/thread.h>
-
-class gr_msg_queue;
-typedef boost::shared_ptr<gr_msg_queue> gr_msg_queue_sptr;
-
-GR_CORE_API gr_msg_queue_sptr gr_make_msg_queue(unsigned int limit=0);
-
-/*!
- * \brief thread-safe message queue
- * \ingroup misc
- */
-class GR_CORE_API gr_msg_queue : public gr_msg_handler {
-
- gruel::mutex d_mutex;
- gruel::condition_variable d_not_empty;
- gruel::condition_variable d_not_full;
- gr_message_sptr d_head;
- gr_message_sptr d_tail;
- unsigned int d_count; // # of messages in queue.
- unsigned int d_limit; // max # of messages in queue. 0 -> unbounded
-
-public:
- gr_msg_queue(unsigned int limit);
- ~gr_msg_queue();
-
- //! Generic msg_handler method: insert the message.
- void handle(gr_message_sptr msg) { insert_tail (msg); }
-
- /*!
- * \brief Insert message at tail of queue.
- * \param msg message
- *
- * Block if queue if full.
- */
- void insert_tail(gr_message_sptr msg);
-
- /*!
- * \brief Delete message from head of queue and return it.
- * Block if no message is available.
- */
- gr_message_sptr delete_head();
-
- /*!
- * \brief If there's a message in the q, delete it and return it.
- * If no message is available, return 0.
- */
- gr_message_sptr delete_head_nowait();
-
- //! Delete all messages from the queue
- void flush();
-
- //! is the queue empty?
- bool empty_p() const { return d_count == 0; }
-
- //! is the queue full?
- bool full_p() const { return d_limit != 0 && d_count >= d_limit; }
-
- //! return number of messages in queue
- unsigned int count() const { return d_count; }
-
- //! return limit on number of message in queue. 0 -> unbounded
- unsigned int limit() const { return d_limit; }
-
-};
-
-#endif /* INCLUDED_GR_MSG_QUEUE_H */
diff --git a/include/gnuradio/gr_sys_paths.h b/include/gnuradio/gr_sys_paths.h
deleted file mode 100644
index bd51ebd..0000000
--- a/include/gnuradio/gr_sys_paths.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef _GR_SYS_PATHS_H_
-#define _GR_SYS_PATHS_H_
-
-#include <gr_core_api.h>
-
-//! directory to create temporary files
-GR_CORE_API const char *gr_tmp_path();
-
-//! directory to store application data
-GR_CORE_API const char *gr_appdata_path();
-
-#endif /* _GR_SYS_PATHS_H_ */
diff --git a/include/gnuradio/gr_unittests.h b/include/gnuradio/gr_unittests.h
deleted file mode 100644
index 9fbf228..0000000
--- a/include/gnuradio/gr_unittests.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2010,2011 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_core_api.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string>
-
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
-
-static std::string get_unittest_path(const std::string &filename){
- boost::filesystem::path path = boost::filesystem::current_path() / ".unittests";
- if (!boost::filesystem::is_directory(path)) boost::filesystem::create_directory(path);
- return (path / filename).string();
-}