|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 using System; |
|
19 using System.Collections.Generic; |
|
20 using System.Text; |
|
21 using SymbianUtils.BasicTypes; |
|
22 using SymbianETMLib.Common.Utilities; |
|
23 using SymbianETMLib.Common.Types; |
|
24 |
|
25 namespace SymbianETMLib.Common.Packets |
|
26 { |
|
27 public abstract class ETMPcktFiveByteRunBase : ETMPcktBase |
|
28 { |
|
29 #region Constructors |
|
30 static ETMPcktFiveByteRunBase() |
|
31 { |
|
32 // In subsequent packets, 7 bits are used and the top |
|
33 // bit indicates whether or not another byte follows. |
|
34 iExtractionMaskSubsequentOriginalScheme = new SymMask( "01111111" ); |
|
35 iExtractionMaskSubsequentAlternativeScheme = new SymMask( "00111111" ); |
|
36 } |
|
37 |
|
38 protected ETMPcktFiveByteRunBase( string aMask ) |
|
39 { |
|
40 base.SetMask( aMask ); |
|
41 |
|
42 } |
|
43 #endregion |
|
44 |
|
45 #region API |
|
46 internal string ExtractedBitsSubsequentBytes( TETMBranchCompressionScheme aScheme ) |
|
47 { |
|
48 byte raw = (byte) iExtractionMaskSubsequentOriginalScheme.Apply( base.RawByte ); |
|
49 string ret = System.Convert.ToString( raw, 2 ); |
|
50 return ret; |
|
51 } |
|
52 |
|
53 public bool MoreToCome |
|
54 { |
|
55 get |
|
56 { |
|
57 bool ret = ( ( base.RawByte & 0x80 ) == 0x80 ); |
|
58 return ret; |
|
59 } |
|
60 } |
|
61 #endregion |
|
62 |
|
63 #region From PcktBase |
|
64 public override int Priority |
|
65 { |
|
66 get { return int.MaxValue; } |
|
67 } |
|
68 #endregion |
|
69 |
|
70 #region Properties |
|
71 #endregion |
|
72 |
|
73 #region Internal constants |
|
74 #endregion |
|
75 |
|
76 #region From System.Object |
|
77 #endregion |
|
78 |
|
79 #region Data members |
|
80 private readonly static SymMask iExtractionMaskSubsequentOriginalScheme; |
|
81 private readonly static SymMask iExtractionMaskSubsequentAlternativeScheme; |
|
82 #endregion |
|
83 } |
|
84 } |