From 50a6df5e198231188f40c23e609a3fe078ad436a Mon Sep 17 00:00:00 2001 From: jcorgan Date: Tue, 31 Oct 2006 19:15:02 +0000 Subject: Restore gr-pager to trunk. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3909 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-pager/src/pageri_flex_modes.cc | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 gr-pager/src/pageri_flex_modes.cc (limited to 'gr-pager/src/pageri_flex_modes.cc') diff --git a/gr-pager/src/pageri_flex_modes.cc b/gr-pager/src/pageri_flex_modes.cc new file mode 100644 index 000000000..b2bb4e29c --- /dev/null +++ b/gr-pager/src/pageri_flex_modes.cc @@ -0,0 +1,45 @@ +/* + * 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. + */ + +#include "pageri_flex_modes.h" + +const flex_mode_t flex_modes[] = +{ + { 0x870C78F3, 1600, 2 }, + { 0xB0684F97, 1600, 4 }, +// { 0xUNKNOWN, 3200, 2 }, + { 0xDEA0215F, 3200, 4 }, + { 0x4C7CB383, 3200, 4 } +}; + +const int num_flex_modes = sizeof(flex_modes)/sizeof(flex_modes[0]); + +unsigned char flex_bcd[17] = "0123456789 U -]["; + +int find_flex_mode(gr_int32 sync_code) +{ + for (int i = 0; i < num_flex_modes; i++) + if (flex_modes[i].sync == sync_code) + return i; + + // Not found + return -1; +} -- cgit