blob: 0c8c94edb7ad054ebf5bfe0e8885c0cc4067a6c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
/*
* $Id$
*
* (C) 2002-2003 Andreas Oberritter <obi@saftware.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifndef __dvb_descriptor_cell_list_descriptor_h__
#define __dvb_descriptor_cell_list_descriptor_h__
#include "descriptor.h"
class Subcell
{
protected:
unsigned cellIdExtension : 8;
unsigned subcellLatitude : 16;
unsigned subcellLongitude : 16;
unsigned subcellExtendOfLatitude : 12;
unsigned subcellExtendOfLongitude : 12;
public:
Subcell(const uint8_t * const buffer);
uint8_t getCellIdExtension(void) const;
uint16_t getSubcellLatitude(void) const;
uint16_t getSubcellLongtitude(void) const;
uint16_t getSubcellExtendOfLatitude(void) const;
uint16_t getSubcellExtendOfLongtitude(void) const;
};
typedef std::vector<Subcell *> SubcellVector;
typedef SubcellVector::iterator SubcellIterator;
typedef SubcellVector::const_iterator SubcellConstIterator;
class Cell
{
protected:
unsigned cellId : 16;
unsigned cellLatitude : 16;
unsigned cellLongtitude : 16;
unsigned cellExtendOfLatitude : 12;
unsigned cellExtendOfLongtitude : 12;
unsigned subcellInfoLoopLength : 8;
SubcellVector subcells;
public:
Cell(const uint8_t * const buffer);
~Cell(void);
uint16_t getCellId(void) const;
uint16_t getCellLatitude(void) const;
uint16_t getCellLongtitude(void) const;
uint16_t getCellExtendOfLatitude(void) const;
uint16_t getCellExtendOfLongtitude(void) const;
const SubcellVector *getSubcells(void) const;
};
typedef std::vector<Cell *> CellVector;
typedef CellVector::iterator CellIterator;
typedef CellVector::const_iterator CellConstIterator;
class CellListDescriptor : public Descriptor
{
protected:
CellVector cells;
public:
CellListDescriptor(const uint8_t * const buffer);
~CellListDescriptor(void);
const CellVector *getCells(void) const;
};
#endif /* __dvb_descriptor_cell_list_descriptor_h__ */
|