summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/block_allocator.cpp1
-rw-r--r--lib/block_handlers.cpp1
-rw-r--r--lib/block_task.cpp1
-rw-r--r--lib/element_impl.hpp12
-rw-r--r--lib/gras_impl/messages.hpp (renamed from lib/gras_impl/misc.hpp)27
-rw-r--r--lib/gras_impl/token.hpp37
-rw-r--r--lib/port_handlers.cpp1
-rw-r--r--lib/top_block.cpp1
8 files changed, 56 insertions, 25 deletions
diff --git a/lib/block_allocator.cpp b/lib/block_allocator.cpp
index 327a3cd..22f60af 100644
--- a/lib/block_allocator.cpp
+++ b/lib/block_allocator.cpp
@@ -15,6 +15,7 @@
// along with io_sig program. If not, see <http://www.gnu.org/licenses/>.
#include "element_impl.hpp"
+#include <gras_impl/messages.hpp>
#include <boost/bind.hpp>
using namespace gnuradio;
diff --git a/lib/block_handlers.cpp b/lib/block_handlers.cpp
index 5811acc..4ecfa20 100644
--- a/lib/block_handlers.cpp
+++ b/lib/block_handlers.cpp
@@ -15,6 +15,7 @@
// along with io_sig program. If not, see <http://www.gnu.org/licenses/>.
#include "element_impl.hpp"
+#include <gras_impl/messages.hpp>
#include <gras_impl/vector_utils.hpp>
#include <boost/make_shared.hpp>
#include <boost/bind.hpp>
diff --git a/lib/block_task.cpp b/lib/block_task.cpp
index b0fa45a..d69e05d 100644
--- a/lib/block_task.cpp
+++ b/lib/block_task.cpp
@@ -15,6 +15,7 @@
// along with io_sig program. If not, see <http://www.gnu.org/licenses/>.
#include "element_impl.hpp"
+#include <gras_impl/messages.hpp>
#include <boost/foreach.hpp>
#include <algorithm>
diff --git a/lib/element_impl.hpp b/lib/element_impl.hpp
index a9f272b..8cbf2be 100644
--- a/lib/element_impl.hpp
+++ b/lib/element_impl.hpp
@@ -18,7 +18,7 @@
#define INCLUDED_LIBGRAS_ELEMENT_IMPL_HPP
#include <gras_impl/debug.hpp>
-#include <gras_impl/misc.hpp>
+#include <gras_impl/token.hpp>
#include <gras_impl/vector_of_queues.hpp>
#include <gras_impl/input_buffer_queues.hpp>
#include <gras_impl/interruptible_thread.hpp>
@@ -33,6 +33,16 @@
#include <vector>
#include <queue>
+static inline unsigned long myulround(const double x)
+{
+ return (unsigned long)(x + 0.5);
+}
+
+static inline unsigned long long myullround(const double x)
+{
+ return (unsigned long long)(x + 0.5);
+}
+
namespace gnuradio
{
diff --git a/lib/gras_impl/misc.hpp b/lib/gras_impl/messages.hpp
index 124ed51..d5bfc8b 100644
--- a/lib/gras_impl/misc.hpp
+++ b/lib/gras_impl/messages.hpp
@@ -14,35 +14,14 @@
// You should have received a copy of the GNU Lesser General Public License
// along with io_sig program. If not, see <http://www.gnu.org/licenses/>.
-#ifndef INCLUDED_LIBGRAS_IMPL_MISC_HPP
-#define INCLUDED_LIBGRAS_IMPL_MISC_HPP
+#ifndef INCLUDED_LIBGRAS_IMPL_MESSAGES_HPP
+#define INCLUDED_LIBGRAS_IMPL_MESSAGES_HPP
#include <gnuradio/sbuffer.hpp>
-#include <boost/shared_ptr.hpp>
-
-static inline unsigned long myulround(const double x)
-{
- return (unsigned long)(x + 0.5);
-}
-
-static inline unsigned long long myullround(const double x)
-{
- return (unsigned long long)(x + 0.5);
-}
namespace gnuradio
{
-struct Token : boost::shared_ptr<int>
-{
- static Token make(void)
- {
- Token tok;
- tok.reset(new int(0));
- return tok;
- }
-};
-
struct TopBlockMessage
{
enum
@@ -76,4 +55,4 @@ struct BufferReturnMessage
} //namespace gnuradio
-#endif /*INCLUDED_LIBGRAS_IMPL_MISC_HPP*/
+#endif /*INCLUDED_LIBGRAS_IMPL_MESSAGES_HPP*/
diff --git a/lib/gras_impl/token.hpp b/lib/gras_impl/token.hpp
new file mode 100644
index 0000000..4923f74
--- /dev/null
+++ b/lib/gras_impl/token.hpp
@@ -0,0 +1,37 @@
+//
+// Copyright 2012 Josh Blum
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Lesser General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program 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 Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public License
+// along with io_sig program. If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef INCLUDED_LIBGRAS_IMPL_TOKEN_HPP
+#define INCLUDED_LIBGRAS_IMPL_TOKEN_HPP
+
+#include <boost/shared_ptr.hpp>
+
+namespace gnuradio
+{
+
+struct Token : boost::shared_ptr<int>
+{
+ static Token make(void)
+ {
+ Token tok;
+ tok.reset(new int(0));
+ return tok;
+ }
+};
+
+} //namespace gnuradio
+
+#endif /*INCLUDED_LIBGRAS_IMPL_TOKEN_HPP*/
diff --git a/lib/port_handlers.cpp b/lib/port_handlers.cpp
index 5777cf9..0b5cfd0 100644
--- a/lib/port_handlers.cpp
+++ b/lib/port_handlers.cpp
@@ -15,6 +15,7 @@
// along with io_sig program. If not, see <http://www.gnu.org/licenses/>.
#include "element_impl.hpp"
+#include <gras_impl/messages.hpp>
using namespace gnuradio;
diff --git a/lib/top_block.cpp b/lib/top_block.cpp
index f3e1fc8..0adcdb0 100644
--- a/lib/top_block.cpp
+++ b/lib/top_block.cpp
@@ -15,6 +15,7 @@
// along with io_sig program. If not, see <http://www.gnu.org/licenses/>.
#include "element_impl.hpp"
+#include <gras_impl/messages.hpp>
#include <gnuradio/top_block.hpp>
#include <boost/thread/thread.hpp> //sleep