[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3543 - gnuradio/branches/developers/jcorgan/pager/gr-
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r3543 - gnuradio/branches/developers/jcorgan/pager/gr-pager/src |
Date: |
Thu, 14 Sep 2006 15:30:35 -0600 (MDT) |
Author: jcorgan
Date: 2006-09-14 15:30:35 -0600 (Thu, 14 Sep 2006)
New Revision: 3543
Added:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.cc
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.h
Modified:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/Makefile.am
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager.i
Log:
Added dummy pager.flex_message block.
Modified: gnuradio/branches/developers/jcorgan/pager/gr-pager/src/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/pager/gr-pager/src/Makefile.am
2006-09-14 18:36:59 UTC (rev 3542)
+++ gnuradio/branches/developers/jcorgan/pager/gr-pager/src/Makefile.am
2006-09-14 21:30:35 UTC (rev 3543)
@@ -73,6 +73,7 @@
pager_swig.cc \
pager_slicer_fb.cc \
pager_flex_deframer.cc \
+ pager_flex_message.cc \
pageri_flex_modes.cc \
pageri_bch3221.cc
# Additional source modules here
@@ -93,6 +94,7 @@
grinclude_HEADERS = \
pager_slicer_fb.h \
pager_flex_deframer.h \
+ pager_flex_message.h \
pageri_flex_modes.h \
pageri_bch3221.h
# Additional header files here
Modified: gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager.i
===================================================================
--- gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager.i
2006-09-14 18:36:59 UTC (rev 3542)
+++ gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager.i
2006-09-14 21:30:35 UTC (rev 3543)
@@ -27,6 +27,7 @@
#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
#include "pager_slicer_fb.h"
#include "pager_flex_deframer.h"
+#include "pager_flex_message.h"
#include <stdexcept>
%}
@@ -59,3 +60,17 @@
};
// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(pager,flex_message);
+
+pager_flex_message_sptr pager_make_flex_message();
+
+class pager_flex_message : public gr_block
+{
+private:
+ pager_flex_message();
+
+public:
+};
+
+// ----------------------------------------------------------------
Added:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.cc
(rev 0)
+++
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.cc
2006-09-14 21:30:35 UTC (rev 3543)
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2004,2006 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 2, 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 <pager_flex_message.h>
+#include <pageri_flex_modes.h>
+#include <gr_io_signature.h>
+
+pager_flex_message_sptr pager_make_flex_message()
+{
+ return pager_flex_message_sptr(new pager_flex_message());
+}
+
+pager_flex_message::pager_flex_message() :
+ gr_block ("flex_message",
+ gr_make_io_signature (1, 1, sizeof(gr_int32)),
+ gr_make_io_signature (1, 1, sizeof(unsigned char)))
+{
+ enter_start();
+}
+
+pager_flex_message::~pager_flex_message()
+{
+}
+
+void pager_flex_message::enter_start()
+{
+ d_state = ST_START;
+}
+
+int pager_flex_message::general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+{
+ const gr_int32 *in = (gr_int32 *)input_items[0];
+ unsigned char *out = (unsigned char *)output_items[0];
+
+ int i = 0, j = 0;
+ int ninputs = ninput_items[0];
+
+ while (i < ninputs && j < noutput_items) {
+ switch (d_state) {
+ case ST_START:
+ break;
+
+ default:
+ assert(0); // memory corruption of d_state if ever gets here
+ break;
+
+ }
+ }
+
+ consume_each(i);
+
+ // Temporarily claim we did something
+ j = noutput_items;
+ return j;
+}
Property changes on:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.cc
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.h
===================================================================
---
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.h
(rev 0)
+++
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.h
2006-09-14 21:30:35 UTC (rev 3543)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2006 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 2, 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_PAGER_FLEX_MESSAGE_H
+#define INCLUDED_PAGER_FLEX_MESSAGE_H
+
+#include <gr_block.h>
+
+class pager_flex_message;
+typedef boost::shared_ptr<pager_flex_message> pager_flex_message_sptr;
+
+pager_flex_message_sptr pgr_make_flex_message();
+
+/*!
+ * \brief flex message description
+ * \ingroup block
+ */
+
+class pager_flex_message : public gr_block
+{
+private:
+ // Constructors
+ friend pager_flex_message_sptr pager_make_flex_message();
+ pager_flex_message();
+
+
+ // State machine transitions
+ void enter_start();
+
+ // Simple state machine
+ enum state_t { ST_START };
+ state_t d_state;
+
+public:
+ ~pager_flex_message();
+
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+};
+
+#endif /* INCLUDED_PAGER_FLEX_MESSAGE_H */
Property changes on:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/pager_flex_message.h
___________________________________________________________________
Name: svn:eol-style
+ native
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3543 - gnuradio/branches/developers/jcorgan/pager/gr-pager/src,
jcorgan <=