summaryrefslogtreecommitdiffstats
path: root/data/mnet/GP10/Host/Rlc_mac/include/ieFrequencyParameters.h
blob: f4666ab69ad89ec74144b03223c3668cd8940e16 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// *******************************************************************
//
// (c) Copyright Cisco 2000
// All Rights Reserved
//
// *******************************************************************

// *******************************************************************
//
// File        : ieFrequencyParameters.h
// Author(s)   : Tim Olson
// Create Date : 6/5/2000
// Description : 
//
// *******************************************************************


#ifndef __IEFREQUENCYPARAMETERS_H__
#define __IEFREQUENCYPARAMETERS_H__

#include "logging\vclogging.h"
#include "bitstream.h"
#include "ieTSC.h"
#include "ieARFCN.h"
#include "ieMAIO.h"
#include "ieMANumber.h"
#include "ieChangeMark.h"
#include "ieGPRSMobileAllocation.h"
#include "ieMAFreqList.h"


// *******************************************************************
// class IeFrequencyParameters
//
// Description:
//    Frequency Parameters IE -- GSM04.60 12.8
//
// < Frequency Parameters IE > ::=
//   < TSC : bit (3) >
//   { 00 < ARFCN : bit (10) >
//   | 01 < Indirect encoding : < Indirect encoding struct > >
//   | 10 < Direct encoding 1 : < Direct encoding 1 struct > >
//   | 11 < Direct encoding 2 : < Direct encoding 2 struct > > } ;
//
// < Indirect encoding struct > ::=
//   < MAIO : bit (6) >
//   < MA_NUMBER : bit (4) >
//   { 0 | 1 < CHANGE_MARK_1 : bit (2) >
//          { 0 | 1 < CHANGE_MARK_2 : bit (2) > } } ;
//
// < Direct encoding 1 struct > ::=
//   < MAIO : bit (6) >
//   < GPRS Mobile Allocation : < GPRS Mobile Allocation IE > > ;
//
// < Direct encoding 2 struct > ::=
//   < MAIO : bit (6) >
//   < HSN : bit (6) >
//   < Length of MA Frequency List contents : bit (4) >
//   < MA Frequency List contents : octet (val(Length of MA Frequency List contents) + 3) > ;
// *******************************************************************

class IeFrequencyParameters : public IeBase {
public:
    
    // IE contents
    IeTSC             tsc;
    IeARFCN           arfcn;
    struct IndirectEncodingStruct
    {
        bool                    isValid;
        IeMAIO                  maio;
        IeMANumber              maNumber;
        IeChangeMark            changeMark1;
        IeChangeMark            changeMark2;
    } IndirectEncoding;
    struct DirectEncoding1Struct
    {
        bool                    isValid;
        IeMAIO                  maio;
        IeGPRSMobileAllocation  gprsMobileAllocation;
    } DirectEncoding1;
    struct DirectEncoding2Struct
    {
        bool                    isValid;
        IeMAIO                  maio;
        IeHSN                   hsn;
        IeMAFreqList            maFreqList;
    } DirectEncoding2;
    
        
    IeFrequencyParameters() : IeBase(), tsc() 
    {
        IndirectEncoding.isValid = FALSE;
        DirectEncoding1.isValid = FALSE;
        DirectEncoding2.isValid = FALSE;
    } 
   
    RlcMacResult EncodeIe(BitStreamOut &dataStream);
    void DisplayDetails(DbgOutput *outObj);
    
    void SetFrequencyParameters() { isValid = TRUE; }
    void ClearFrequencyParameters() { isValid = FALSE; }
};

#endif