diff options
Diffstat (limited to 'gr-pager/src/pageri_flex_modes.h')
-rw-r--r-- | gr-pager/src/pageri_flex_modes.h | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/gr-pager/src/pageri_flex_modes.h b/gr-pager/src/pageri_flex_modes.h index ab8b10683..bf3b8d98e 100644 --- a/gr-pager/src/pageri_flex_modes.h +++ b/gr-pager/src/pageri_flex_modes.h @@ -31,15 +31,42 @@ typedef struct flex_mode gr_int32 sync; // Outer synchronization code unsigned int baud; // Baudrate of SYNC2 and DATA unsigned int levels; // FSK encoding of SYNC2 and DATA - bool phase_a; // PHASEA is transmitted - bool phase_b; // PHASEB is transmitted - bool phase_c; // PHASEC is transmitted - bool phase_d; // PHASED is transmitted - int phases; // number of phases transmitted } flex_mode_t; extern const flex_mode_t flex_modes[]; extern const int num_flex_modes; +int find_flex_mode(gr_int32 sync_code); + +typedef enum { + FLEX_SECURE, + FLEX_UNKNOWN, + FLEX_TONE, + FLEX_STANDARD_NUMERIC, + FLEX_SPECIAL_NUMERIC, + FLEX_ALPHANUMERIC, + FLEX_BINARY, + FLEX_NUMBERED_NUMERIC, + NUM_FLEX_PAGE_TYPES +} +page_type_t; + +inline bool is_alphanumeric_page(page_type_t type) +{ + return (type == FLEX_ALPHANUMERIC || + type == FLEX_SECURE); +} + +inline bool is_numeric_page(page_type_t type) +{ + return (type == FLEX_STANDARD_NUMERIC || + type == FLEX_SPECIAL_NUMERIC || + type == FLEX_NUMBERED_NUMERIC); +} + +inline bool is_tone_page(page_type_t type) +{ + return (type == FLEX_TONE); +} #endif // INCLUDED_PAGERI_FLEX_MODES_H |