2 * $Id: long_table.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $
4 * (C) 2002-2003 Andreas Oberritter <obi@saftware.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <lib/dvb_si/long_table.h>
24 LongTable::LongTable(const uint8_t * const buffer) : ShortTable(buffer)
26 tableIdExtension = (buffer[3] << 8) | buffer[4];
27 reserved3 = (buffer[5] >> 6) & 0x03;
28 versionNumber = (buffer[5] >> 1) & 0x1F;
29 currentNextIndicator = buffer[5] & 0x01;
30 sectionNumber = buffer[6];
31 lastSectionNumber = buffer[7];
34 uint16_t LongTable::getTableIdExtension(void) const
36 return tableIdExtension;
39 uint8_t LongTable::getVersionNumber(void) const
44 uint8_t LongTable::getCurrentNextIndicator(void) const
46 return currentNextIndicator;
49 uint8_t LongTable::getSectionNumber(void) const
54 uint8_t LongTable::getLastSectionNumber(void) const
56 return lastSectionNumber;
59 bool LongTable::operator< (const LongTable &t) const
61 return (sectionNumber < t.sectionNumber);
64 bool LongTable::operator> (const LongTable &t) const
66 return (sectionNumber > t.sectionNumber);
69 bool LongTable::operator<= (const LongTable &t) const
71 return (sectionNumber <= t.sectionNumber);
74 bool LongTable::operator>= (const LongTable &t) const
76 return (sectionNumber >= t.sectionNumber);
79 bool LongTable::operator== (const LongTable &t) const
81 return (sectionNumber == t.sectionNumber);
84 bool LongTable::operator!= (const LongTable &t) const
86 return (sectionNumber != t.sectionNumber);