GNU Radio 3.6.5 C++ API

pageri_flex_modes.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2006,2007 Free Software Foundation, Inc.
00003  *
00004  * This file is part of GNU Radio
00005  *
00006  * GNU Radio is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 3, or (at your option)
00009  * any later version.
00010  *
00011  * GNU Radio is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with GNU Radio; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef INCLUDED_PAGERI_FLEX_MODES_H
00023 #define INCLUDED_PAGERI_FLEX_MODES_H
00024 
00025 #include <gr_types.h>
00026 
00027 #define FLEX_SYNC_MARKER 0xA6C6AAAA
00028 
00029 typedef struct flex_mode
00030 {
00031     gr_int32     sync;          // Outer synchronization code
00032     unsigned int baud;          // Baudrate of SYNC2 and DATA
00033     unsigned int levels;        // FSK encoding of SYNC2 and DATA
00034 }
00035 flex_mode_t;
00036 
00037 extern const flex_mode_t flex_modes[];
00038 extern const char *flex_page_desc[];
00039 extern const int num_flex_modes;
00040 int find_flex_mode(gr_int32 sync_code);
00041 extern unsigned char flex_bcd[];
00042 
00043 typedef enum {
00044     FLEX_SECURE,
00045     FLEX_UNKNOWN,
00046     FLEX_TONE,
00047     FLEX_STANDARD_NUMERIC,
00048     FLEX_SPECIAL_NUMERIC,
00049     FLEX_ALPHANUMERIC,
00050     FLEX_BINARY,
00051     FLEX_NUMBERED_NUMERIC,
00052     NUM_FLEX_PAGE_TYPES
00053 }
00054 page_type_t;
00055 
00056 inline bool is_alphanumeric_page(page_type_t type)
00057 {
00058     return (type == FLEX_ALPHANUMERIC ||
00059             type == FLEX_SECURE);
00060 }
00061 
00062 inline bool is_numeric_page(page_type_t type)
00063 {
00064     return (type == FLEX_STANDARD_NUMERIC ||
00065             type == FLEX_SPECIAL_NUMERIC  ||
00066             type == FLEX_NUMBERED_NUMERIC);
00067 }
00068 
00069 inline bool is_tone_page(page_type_t type)
00070 {
00071     return (type == FLEX_TONE);
00072 }
00073 
00074 #endif // INCLUDED_PAGERI_FLEX_MODES_H