|
1 /* |
|
2 * Copyright (c) 2006 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: Declaration of the WlanConfigureTxQueueParams class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 10 % |
|
20 */ |
|
21 |
|
22 #ifndef WLAN_CONFIGURE_TX_QUEUE_PARAMS_H |
|
23 #define WLAN_CONFIGURE_TX_QUEUE_PARAMS_H |
|
24 |
|
25 #include "UmacWsaComplexCommand.h" |
|
26 |
|
27 /** |
|
28 * configures tx queue parameters of the device |
|
29 * |
|
30 * |
|
31 * @lib wlanumac.lib |
|
32 * @since S60 v3.1 |
|
33 */ |
|
34 class WlanConfigureTxQueueParams : public WlanWsaComplexCommand |
|
35 { |
|
36 |
|
37 public: |
|
38 |
|
39 /** |
|
40 * C++ default constructor. |
|
41 */ |
|
42 WlanConfigureTxQueueParams() : |
|
43 iState( EINIT ) {}; |
|
44 |
|
45 /** |
|
46 * Destructor. |
|
47 */ |
|
48 virtual ~WlanConfigureTxQueueParams() {}; |
|
49 |
|
50 private: |
|
51 |
|
52 // Types for the FSM |
|
53 |
|
54 // events for the FSM |
|
55 enum TEvent |
|
56 { |
|
57 ESTATEENTRY, // state entry action to be executed |
|
58 ETXCOMPLETE, // underlying sw layer tx delivery complete event |
|
59 EEVENTMAX // defined as an upper bound |
|
60 }; |
|
61 |
|
62 // states of the FSM |
|
63 enum TState |
|
64 { |
|
65 EINIT, // start state of the state machine |
|
66 ECONFIGUREBESTEFFORTQUEUE, |
|
67 ECONFIGUREVOICEQUEUE, |
|
68 ECONFIGUREVIDEOQUEUE, |
|
69 ECONFIGUREBACKGROUNDQUEUE, |
|
70 ECONFIGUREAC, |
|
71 EFINIT, |
|
72 ESTATEMAX // defined as an upper bound |
|
73 }; |
|
74 |
|
75 /** |
|
76 * ?member_description. |
|
77 * @since S60 3.1 |
|
78 * @param aCtxImpl global statemachine context |
|
79 */ |
|
80 void Fsm( |
|
81 WlanContextImpl& aCtxImpl, |
|
82 TEvent aEvent ); |
|
83 |
|
84 /** |
|
85 * ?member_description. |
|
86 * @since S60 3.1 |
|
87 * @param aCtxImpl global statemachine context |
|
88 */ |
|
89 void OnStateEntryEvent( WlanContextImpl& aCtxImpl ); |
|
90 |
|
91 /** |
|
92 * ?member_description. |
|
93 * @since S60 3.1 |
|
94 * @param aCtxImpl global statemachine context |
|
95 */ |
|
96 void OnTxCompleteEvent( WlanContextImpl& aCtxImpl ); |
|
97 |
|
98 /** |
|
99 * ?member_description. |
|
100 * @since S60 3.1 |
|
101 * @param aCtxImpl global statemachine context |
|
102 */ |
|
103 void ChangeInternalState( |
|
104 WlanContextImpl& aCtxImpl, |
|
105 TState aNewState ); |
|
106 |
|
107 /** |
|
108 * ?member_description. |
|
109 * @since Series 60 3.1 |
|
110 * @param aCtxImpl global statemachine context |
|
111 */ |
|
112 void ConfigureQueue( |
|
113 WlanContextImpl& aCtxImpl, |
|
114 WHA::TQueueId aQueueId ); |
|
115 |
|
116 /** |
|
117 * ?member_description. |
|
118 * @since Series 60 3.1 |
|
119 * @param aCtxImpl global statemachine context |
|
120 */ |
|
121 void ConfigureAc( WlanContextImpl& aCtxImpl ); |
|
122 |
|
123 /** |
|
124 * From ?base_class1. |
|
125 * ?description |
|
126 * |
|
127 * @since Series 60 3.1 |
|
128 * @param aCtxImpl global statemachine context |
|
129 */ |
|
130 virtual void Entry( WlanContextImpl& aCtxImpl ); |
|
131 |
|
132 /** |
|
133 * From ?base_class1. |
|
134 * ?description |
|
135 * |
|
136 * @since Series 60 3.1 |
|
137 * @param aCtxImpl global statemachine context |
|
138 */ |
|
139 virtual void Exit( WlanContextImpl& aCtxImpl); |
|
140 |
|
141 /** |
|
142 * From ?base_class1. |
|
143 * ?description |
|
144 * |
|
145 * @since Series 60 3.1 |
|
146 * @param |
|
147 */ |
|
148 #ifndef NDEBUG |
|
149 virtual const TInt8* GetStateName( TUint8& aLength ) const; |
|
150 #endif // !NDEBUG |
|
151 |
|
152 // Prohibit copy constructor. |
|
153 WlanConfigureTxQueueParams( const WlanConfigureTxQueueParams& ); |
|
154 // Prohibit assignment operator. |
|
155 WlanConfigureTxQueueParams& operator= |
|
156 ( const WlanConfigureTxQueueParams& ); |
|
157 |
|
158 private: // Data |
|
159 |
|
160 TState iState; |
|
161 |
|
162 #ifndef NDEBUG |
|
163 /** max length of state name for tracing */ |
|
164 enum { KMaxStateStringLength = 50 }; |
|
165 /** max length of event name for tracing */ |
|
166 enum { KMaxEventStringLength = KMaxStateStringLength }; |
|
167 |
|
168 /** state names for tracing */ |
|
169 static const TUint8 iStateName[ESTATEMAX][KMaxStateStringLength]; |
|
170 /** event names for tracing */ |
|
171 static const TUint8 iEventName[EEVENTMAX][KMaxEventStringLength]; |
|
172 static const TInt8 iName[]; |
|
173 #endif // !NDEBUG |
|
174 |
|
175 }; |
|
176 |
|
177 #endif // WLAN_CONFIGURE_TX_QUEUE_PARAMS_H |
|
178 |
|
179 // End of File |