3 * Copyright 2002 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
22 #ifndef _ATSC_SYMINFO_H_
23 #define _ATSC_SYMINFO_H_
27 static const unsigned int SI_SEGMENT_NUM_MASK = 0x1ff;
28 static const unsigned int SI_FIELD_SYNC_SEGMENT_NUM = SI_SEGMENT_NUM_MASK; // conceptually -1
31 unsigned int symbol_num : 10; // 0..831
32 unsigned int segment_num : 9; // 0..311 and SI_FIELD_SYNC_SEGMENT_NUM
33 unsigned int field_num : 1; // 0..1
34 unsigned int valid : 1; // contents are valid
39 tag_is_start_field_sync (syminfo tag)
41 return tag.symbol_num == 0 && tag.segment_num == SI_FIELD_SYNC_SEGMENT_NUM && tag.valid;
45 tag_is_start_field_sync_1 (syminfo tag)
47 return tag_is_start_field_sync (tag) && tag.field_num == 0;
51 tag_is_start_field_sync_2 (syminfo tag)
53 return tag_is_start_field_sync (tag) && tag.field_num == 1;
58 #endif /* _ATSC_SYMINFO_H_ */