2 * $Id: terrestrial_delivery_system_descriptor.cpp,v 1.1 2003-10-17 15:36:38 tmbinc Exp $
4 * (C) 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/terrestrial_delivery_system_descriptor.h>
24 TerrestrialDeliverySystemDescriptor::TerrestrialDeliverySystemDescriptor(const uint8_t * const buffer) : Descriptor(buffer)
26 centreFrequency = (buffer[2] << 24) | (buffer[3] << 16) | (buffer[4] << 8) | buffer[5];
27 bandwidth = (buffer[6] >> 5) & 0x07;
28 reserved = buffer[6] & 0x1f;
29 constellation = (buffer[7] >> 6) & 0x03;
30 hierarchyInformation = (buffer[7] >> 3) & 0x07;
31 codeRateHpStream = buffer[7] & 0x07;
32 codeRateLpStream = (buffer[8] >> 5) & 0x07;
33 guardInterval = (buffer[8] >> 3) & 0x03;
34 transmissionMode = (buffer[8] >> 1) & 0x03;
35 otherFrequencyFlag = buffer[8] & 0x01;
36 reserved2 = (buffer[9] << 24) | (buffer[10] << 16) | (buffer[11] << 8) | buffer[12];
39 uint32_t TerrestrialDeliverySystemDescriptor::getCentreFrequency(void) const
41 return centreFrequency;
44 uint8_t TerrestrialDeliverySystemDescriptor::getBandwidth(void) const
49 uint8_t TerrestrialDeliverySystemDescriptor::getConstellation(void) const
54 uint8_t TerrestrialDeliverySystemDescriptor::getHierarchyInformation(void) const
56 return hierarchyInformation;
59 uint8_t TerrestrialDeliverySystemDescriptor::getCodeRateHpStream(void) const
61 return codeRateHpStream;
64 uint8_t TerrestrialDeliverySystemDescriptor::getCodeRateLpStream(void) const
66 return codeRateLpStream;
69 uint8_t TerrestrialDeliverySystemDescriptor::getGuardInterval(void) const
74 uint8_t TerrestrialDeliverySystemDescriptor::getTransmissionMode(void) const
76 return transmissionMode;
79 uint8_t TerrestrialDeliverySystemDescriptor::getOtherFrequencyFlag(void) const
81 return otherFrequencyFlag;