|
1 /* |
|
2 * Copyright (c) 2002-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 UmacDot11Synchronize class |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 18 % |
|
20 */ |
|
21 |
|
22 #ifndef WLANDOT11SYNCHRONIZE_H |
|
23 #define WLANDOT11SYNCHRONIZE_H |
|
24 |
|
25 #include "UmacDot11Roam.h" |
|
26 |
|
27 |
|
28 /** |
|
29 * Joins to a new BSS network so that reassociation to that network |
|
30 * can be performed. |
|
31 * |
|
32 * @lib wlanumac.lib |
|
33 * @since S60 v3.1 |
|
34 */ |
|
35 class WlanDot11Synchronize : public WlanDot11Roam |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * C++ default constructor. |
|
41 */ |
|
42 WlanDot11Synchronize(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~WlanDot11Synchronize(); |
|
48 |
|
49 protected: |
|
50 |
|
51 // Types for the FSMs |
|
52 // |
|
53 |
|
54 // events for the FSM |
|
55 enum TEvent |
|
56 { |
|
57 // state entry action to be executed |
|
58 ESTATEENTRY, |
|
59 // underlying sw layer tx delivery complete event |
|
60 ETXCOMPLETE, |
|
61 // abort FSM execution |
|
62 EABORT, |
|
63 // defined as an upper bound |
|
64 EEVENTMAX |
|
65 }; |
|
66 |
|
67 // states of the FSM |
|
68 enum TState |
|
69 { |
|
70 // start state of the state machine |
|
71 EINIT, |
|
72 ESETDOT11SLOTTIME, // configure slottime mib if |
|
73 // supported by the WLAN vendor solution |
|
74 ESETCTSTOSELF, // configure ctstoself mib |
|
75 ECONFTXQUEUE, // configure just the legacy tx queue |
|
76 ECONFTXQUEUEPARAMS, // configure tx queue parameters |
|
77 ESETTXRATEPOLICY, // set Tx rate policy |
|
78 ESETHTCAPABILITIES, // configure HT capabilities mib |
|
79 ESETHTBSSOPERATION, // configure HT BSS operation mib |
|
80 ERESETHTCAPABILITIES, // reset HT capabilities mib |
|
81 EISSUEJOIN, // issue join command |
|
82 ESETHTBLOCKACKCONF, // configure HT Block Ack configure mib |
|
83 ERESETHTBLOCKACKCONF, // reset HT Block Ack configure mib |
|
84 ECONTINUEDOT11TRAVERSE, // continue dot11 fsm traversal |
|
85 ESTATEMAX // defined as an upper bound |
|
86 }; |
|
87 |
|
88 void Fsm( |
|
89 WlanContextImpl& aCtxImpl, |
|
90 TEvent aEvent ); |
|
91 |
|
92 void OnStateEntryEvent( |
|
93 WlanContextImpl& aCtxImpl ); |
|
94 |
|
95 void OnTxCompleteEvent( |
|
96 WlanContextImpl& aCtxImpl ); |
|
97 |
|
98 void OnAbortEvent( WlanContextImpl& aCtxImpl ); |
|
99 |
|
100 void ContinueDot11StateTraversal( |
|
101 WlanContextImpl& aCtxImpl ); |
|
102 |
|
103 void ChangeInternalState( |
|
104 WlanContextImpl& aCtxImpl, |
|
105 TState aNewState ); |
|
106 |
|
107 TBool InitActions( |
|
108 WlanContextImpl& aCtxImpl ); |
|
109 |
|
110 void SetDot11SlotTime( |
|
111 WlanContextImpl& aCtxImpl ); |
|
112 |
|
113 void SetCtsToSelf( WlanContextImpl& aCtxImpl ); |
|
114 |
|
115 void ConfigureQueue( WlanContextImpl& aCtxImpl ); |
|
116 |
|
117 void ConfigureTxQueueParams( WlanContextImpl& aCtxImpl ); |
|
118 |
|
119 void SetTxRatePolicy( WlanContextImpl& aCtxImpl ); |
|
120 |
|
121 /** |
|
122 * Informs lower layer about the HT capabilities |
|
123 * of the target network |
|
124 * @param aCtxImpl global statemachine context |
|
125 */ |
|
126 void SetHtCapabilities( WlanContextImpl& aCtxImpl ); |
|
127 |
|
128 /** |
|
129 * Informs lower layer about the dynamic HT configuration |
|
130 * of the target network |
|
131 * @param aCtxImpl statemachine context |
|
132 */ |
|
133 void SetHtBssOperation( WlanContextImpl& aCtxImpl ); |
|
134 |
|
135 /** |
|
136 * Resets the HT Capabilities MIB to its default value |
|
137 * @param aCtxImpl statemachine context |
|
138 */ |
|
139 void ResetHtCapabilities( WlanContextImpl& aCtxImpl ); |
|
140 |
|
141 /** |
|
142 * Resets the HT Block Ack Configure MIB to its default value |
|
143 * @param aCtxImpl statemachine context |
|
144 */ |
|
145 void ResetHtBlockAckConfiguration( WlanContextImpl& aCtxImpl ); |
|
146 |
|
147 void IssueJoin( |
|
148 WlanContextImpl& aCtxImpl ); |
|
149 |
|
150 /** |
|
151 * Informs lower layer about the HT Block Ack configuration |
|
152 * of the target network |
|
153 * @param aCtxImpl statemachine context |
|
154 */ |
|
155 void SetHtBlockAckConfiguration( WlanContextImpl& aCtxImpl ); |
|
156 |
|
157 #ifndef NDEBUG |
|
158 virtual const TInt8* GetStateName( TUint8& aLength ) const; |
|
159 #endif // !NDEBUG |
|
160 |
|
161 void Entry( WlanContextImpl& aCtxImpl ); |
|
162 |
|
163 void Exit( WlanContextImpl& aCtxImpl ); |
|
164 |
|
165 virtual void OnWhaCommandResponse( |
|
166 WlanContextImpl& aCtxImpl, |
|
167 WHA::TCommandId aCommandId, |
|
168 WHA::TStatus aStatus, |
|
169 const WHA::UCommandResponseParams& aCommandResponseParams, |
|
170 TUint32 aAct ); |
|
171 |
|
172 private: |
|
173 |
|
174 // Prohibit copy constructor. |
|
175 WlanDot11Synchronize( const WlanDot11Synchronize& ); |
|
176 // Prohibit assigment operator. |
|
177 WlanDot11Synchronize& operator=( const WlanDot11Synchronize& ); |
|
178 |
|
179 protected: // Data |
|
180 |
|
181 TState iState; |
|
182 |
|
183 // true, if the Join operation failed |
|
184 TBool iJoinFailed; |
|
185 |
|
186 #ifndef NDEBUG |
|
187 // max length of state name for tracing |
|
188 enum { KMaxStateStringLength = 50 }; |
|
189 // max length of event name for tracing |
|
190 enum { KMaxEventStringLength = KMaxStateStringLength }; |
|
191 |
|
192 // state names for tracing |
|
193 static const TUint8 iStateName[ESTATEMAX][KMaxStateStringLength]; |
|
194 // event names for tracing |
|
195 static const TUint8 iEventName[EEVENTMAX][KMaxEventStringLength]; |
|
196 // name of the state |
|
197 static const TInt8 iName[]; |
|
198 #endif |
|
199 }; |
|
200 |
|
201 #endif // WLANDOT11SYNCHRONIZE_H |