|
1 /* |
|
2 * Copyright (c) 2005-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 the License "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: The one and only packet scheduler |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 9 % |
|
20 */ |
|
21 |
|
22 // --------------------------------------------------------------------------- |
|
23 // |
|
24 // --------------------------------------------------------------------------- |
|
25 // |
|
26 inline TBool WlanPacketScheduler::UnsentPackets() const |
|
27 { |
|
28 return ( iNumOfNotCompletedPackets > 0 ); |
|
29 } |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 // --------------------------------------------------------------------------- |
|
34 // |
|
35 inline void WlanPacketScheduler::TranmsitQueueFull( |
|
36 WHA::TQueueId aQueueId ) |
|
37 { |
|
38 iQueueStates[aQueueId] = EQueueFull; |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 inline void WlanPacketScheduler::StopTxPipeLine() |
|
46 { |
|
47 iTxPipelineActive = EFalse; |
|
48 } |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 inline void WlanPacketScheduler::StartTxPipeLine() |
|
55 { |
|
56 iTxPipelineActive = ETrue; |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 inline TBool WlanPacketScheduler::Full() const |
|
64 { |
|
65 return (iNumOfPackets == KNumOfElements); |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 inline TUint WlanPacketScheduler::Priority( WHA::TQueueId aQueueId) |
|
73 { |
|
74 // Defines a priority for every WHA Queue |
|
75 const TUint KWhaQueuePriorityTable[] = |
|
76 { 1, // priority of WHA::ELegacy |
|
77 0, // priority of WHA::EBackGround |
|
78 2, // priority of WHA::EVideo |
|
79 3 // priority of WHA::EVoice |
|
80 }; |
|
81 |
|
82 return KWhaQueuePriorityTable[aQueueId]; |
|
83 } |