[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r3487 - in gnuradio/branches/developers/jcorgan/pager/
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r3487 - in gnuradio/branches/developers/jcorgan/pager/gr-pager/src: lib python |
Date: |
Mon, 4 Sep 2006 20:19:29 -0600 (MDT) |
Author: jcorgan
Date: 2006-09-04 20:19:29 -0600 (Mon, 04 Sep 2006)
New Revision: 3487
Added:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.cc
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.h
Modified:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/Makefile.am
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr.i
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_slicer_fb.cc
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/flex_demod.py
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/usrp_flex.py
Log:
Added dummy FLEX syncronization block.
Modified:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/Makefile.am
===================================================================
--- gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/Makefile.am
2006-09-05 01:38:14 UTC (rev 3486)
+++ gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/Makefile.am
2006-09-05 02:19:29 UTC (rev 3487)
@@ -62,6 +62,7 @@
_pgr_la_SOURCES = \
pgr.cc \
pgr_slicer_fb.cc \
+ pgr_flex_sync.cc
# Additional source modules here
# magic flags
@@ -78,7 +79,8 @@
# These headers get installed in ${prefix}/include/gnuradio
grinclude_HEADERS = \
- pgr_slicer_fb.h
+ pgr_slicer_fb.h \
+ pgr_flex_sync.h
# Additional header files here
# These swig headers get installed in ${prefix}/include/gnuradio/swig
Modified: gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr.i
===================================================================
--- gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr.i
2006-09-05 01:38:14 UTC (rev 3486)
+++ gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr.i
2006-09-05 02:19:29 UTC (rev 3487)
@@ -26,6 +26,7 @@
%{
#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
#include "pgr_slicer_fb.h"
+#include "pgr_flex_sync.h"
#include <stdexcept>
%}
@@ -44,3 +45,17 @@
};
// ----------------------------------------------------------------
+
+GR_SWIG_BLOCK_MAGIC(pgr,flex_sync);
+
+pgr_flex_sync_sptr pgr_make_flex_sync();
+
+class pgr_flex_sync : public gr_block
+{
+private:
+ pgr_flex_sync();
+
+public:
+};
+
+// ----------------------------------------------------------------
Added:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.cc
(rev 0)
+++
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.cc
2006-09-05 02:19:29 UTC (rev 3487)
@@ -0,0 +1,56 @@
+/*
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <pgr_flex_sync.h>
+#include <gr_io_signature.h>
+
+pgr_flex_sync_sptr pgr_make_flex_sync()
+{
+ return pgr_flex_sync_sptr(new pgr_flex_sync());
+}
+
+pgr_flex_sync::pgr_flex_sync() :
+ gr_block ("flex_sync",
+ gr_make_io_signature (1, 1, sizeof(unsigned char)),
+ gr_make_io_signature (1, 1, sizeof(gr_int32)))
+{
+}
+
+int pgr_flex_sync::general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+{
+ const unsigned char *in = (const unsigned char *)input_items[0];
+ gr_int32 *out = (gr_int32 *) output_items[0];
+
+ int i = 0;
+ while (i < noutput_items) {
+ out[i++] = (gr_int32)(*in++);
+ }
+
+ consume_each(noutput_items);
+ return noutput_items;
+}
Property changes on:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.cc
___________________________________________________________________
Name: svn:eol-style
+ native
Added:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.h
===================================================================
--- gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.h
(rev 0)
+++ gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.h
2006-09-05 02:19:29 UTC (rev 3487)
@@ -0,0 +1,49 @@
+/*
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef INCLUDED_PGR_FLEX_SYNC_H
+#define INCLUDED_PGR_FLEX_SYNC_H
+
+#include <gr_block.h>
+
+class pgr_flex_sync;
+typedef boost::shared_ptr<pgr_flex_sync> pgr_flex_sync_sptr;
+
+pgr_flex_sync_sptr pgr_make_flex_sync();
+
+/*!
+ * \brief flex sync description
+ * \ingroup block
+ */
+class pgr_flex_sync : public gr_block
+{
+private:
+ friend pgr_flex_sync_sptr pgr_make_flex_sync();
+ pgr_flex_sync();
+
+public:
+ 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_PGR_FLEX_SYNC_H */
Property changes on:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_flex_sync.h
___________________________________________________________________
Name: svn:eol-style
+ native
Modified:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_slicer_fb.cc
===================================================================
---
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_slicer_fb.cc
2006-09-05 01:38:14 UTC (rev 3486)
+++
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/lib/pgr_slicer_fb.cc
2006-09-05 02:19:29 UTC (rev 3487)
@@ -80,7 +80,7 @@
d_hi = d_max*2.0/3.0;
d_lo = d_min*2.0/3.0;
- fprintf(stderr, "%f %d\n", sample, decision);
+ //fprintf(stderr, "%f %d\n", sample, decision);
return decision;
}
Modified:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/flex_demod.py
===================================================================
---
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/flex_demod.py
2006-09-05 01:38:14 UTC (rev 3486)
+++
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/flex_demod.py
2006-09-05 02:19:29 UTC (rev 3487)
@@ -35,6 +35,7 @@
QUAD - Quadrature demodulator converts FSK to baseband amplitudes
LPF - Low pass filter to remove noise prior to slicer
SLICER - Converts input to one of four symbols (0, 1, 2, 3)
+ SYNC - Syncronizes symbol stream and outputs FLEX codewords
---
@param fg: flowgraph
@@ -49,7 +50,8 @@
taps = optfir.low_pass(1.0, channel_rate, 3200, 6400, 0.1, 60)
LPF = gr.fir_filter_fff(1, taps)
SLICER = pgr.slicer_fb(.001, .00001) # Attack, decay
+ SYNC = pgr.flex_sync()
- fg.connect(QUAD, LPF, SLICER)
+ fg.connect(QUAD, LPF, SLICER, SYNC)
- gr.hier_block.__init__(self, fg, QUAD, SLICER)
+ gr.hier_block.__init__(self, fg, QUAD, SYNC)
Modified:
gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/usrp_flex.py
===================================================================
--- gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/usrp_flex.py
2006-09-05 01:38:14 UTC (rev 3486)
+++ gnuradio/branches/developers/jcorgan/pager/gr-pager/src/python/usrp_flex.py
2006-09-05 02:19:29 UTC (rev 3487)
@@ -118,9 +118,13 @@
FLEX = flex_demod(self, 32000)
- SINK = gr.file_sink(gr.sizeof_char, options.filename)
+ SINK = gr.file_sink(4, options.filename)
- self.connect(USRP, CHAN, RFSQL, AGC, FLEX, SINK)
+ self.connect(USRP, CHAN)
+ self.connect(CHAN, RFSQL)
+ self.connect(RFSQL, AGC)
+ self.connect(AGC, FLEX)
+ self.connect(FLEX, SINK)
def main():
parser = OptionParser(option_class=eng_option)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r3487 - in gnuradio/branches/developers/jcorgan/pager/gr-pager/src: lib python,
jcorgan <=