blob: 749df020a4843776a140f5c017a43167a5df3ad2 (
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
|
// *******************************************************************
//
// (c) Copyright Cisco 2000
// All Rights Reserved
//
// *******************************************************************
// *******************************************************************
//
// File : MsgPacketDownlinkDummyControlBlock.cpp
// Author(s) : Tim Olson
// Create Date : 6/5/2000
// Description :
//
// *******************************************************************
#include "MsgPacketDownlinkDummyControlBlock.h"
#include "logging\vclogging.h"
#include "logging\vcmodules.h"
// *******************************************************************
// PACKET DOWNLINK DUMMY CONTROL BLOCK
//
// GSM 04.60 11.2.7
//
// < Packet Downlink Dummy Control Block message content > ::=
// < PAGE_MODE : bit (2) >
// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
// < padding bits >
// ! < Distribution part error : bit (*) = < no string > > ;
//
// *******************************************************************
RlcMacResult MsgPacketDownlinkDummyControlBlock::EncodeMsg(BitStreamOut &dataStream)
{
DBG_FUNC("MsgPacketDownlinkDummyControlBlock::EncodeMsg", RLC_MAC);
DBG_ENTER();
RlcMacResult result = RLC_MAC_SUCCESS;
// Encode the Message Type.
result = msgType.EncodeMsgType(dataStream);
RLC_MAC_RESULT_CHECK(result);
// Encode the Page Mode ie.
// < PAGE_MODE : bit (2) >
result = pageMode.EncodeIe(dataStream);
RLC_MAC_RESULT_CHECK(result);
// Encode Persistence Level ie.
// { 0 | 1 <PERSISTENCE_LEVEL : bit (4) > * 4 }
if (persistenceLevel.IsValid())
{
dataStream.InsertBits8(1, 1);
result = persistenceLevel.EncodeIe(dataStream);
RLC_MAC_RESULT_CHECK(result);
}
else
{
dataStream.InsertBits8(0, 1);
}
dataStream.PadToOctetBoundary();
DBG_LEAVE();
return (result);
}
void MsgPacketDownlinkDummyControlBlock::DisplayMsgDetail()
{
DBG_FUNC("MsgPacketDownlinkDummyControlBlock::DisplayMsgDetail", RLC_MAC);
DBG_ENTER();
if (viperlog_check_module_filter(RLC_MAC_MSG_DETAIL, LOG_SEVERITY_TRACE))
{
// Print out message type.
MsgDisplayDetailObj.Trace(msgType.DisplayDownlinkMsgType());
// Print out the Page Mode.
pageMode.DisplayDetails(&MsgDisplayDetailObj);
// Print out Persistence Level ie.
if (persistenceLevel.IsValid())
{
persistenceLevel.DisplayDetails(&MsgDisplayDetailObj);
}
}
DBG_LEAVE();
}
|