|
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: Declaration of the WlanDot11MibDefaultConfigure class. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 13 % |
|
20 */ |
|
21 |
|
22 #ifndef WLANDOT11MIBDEFAULTCONFIGURE_H |
|
23 #define WLANDOT11MIBDEFAULTCONFIGURE_H |
|
24 |
|
25 #include "UmacDot11State.h" |
|
26 |
|
27 /** |
|
28 * State for setting the MIB elements to their default values |
|
29 * |
|
30 * @lib wlanumac.lib |
|
31 * @since S60 v3.1 |
|
32 */ |
|
33 class WlanDot11MibDefaultConfigure : public WlanDot11State |
|
34 { |
|
35 // events for the FSM |
|
36 enum TEvent |
|
37 { |
|
38 ESTATEENTRY, // state entry action to be executed |
|
39 // underlying sw layer tx delivery complete event |
|
40 ETXCOMPLETE, |
|
41 // abort FSM execution |
|
42 EABORT, |
|
43 EEVENTMAX // defined as an upper bound |
|
44 }; |
|
45 |
|
46 // states of the FSM |
|
47 enum TState |
|
48 { |
|
49 EINIT, // start state of the state machine |
|
50 ESETDOT11MAXRECEIVELIFETIME, |
|
51 ESETDOT11SLOTTIME, |
|
52 ESETDOT11GROUPADDRSTABLE, |
|
53 ESETDOT11WEPDEFAULTKEY, |
|
54 ESETDOT11CURRENTTXPOWERLEVEL, |
|
55 ESETDOT11RTSTHRESHOLD, |
|
56 ESETCTSTOSELF, |
|
57 ESETARPIPADDRSTABLE, |
|
58 ESETPROBEREQUESTTEMPLATE, |
|
59 ESETRXFILTER, |
|
60 ESETBEACONFILTERIETABLE, |
|
61 ESETBEACONFILTERENABLE, |
|
62 |
|
63 // omit setting sleepmode MIB as it is |
|
64 // set allways in dot11idle state entry |
|
65 // after we traverse through this state |
|
66 |
|
67 ESETWLANWAKEUPINTERVAL, |
|
68 ESETBEACONLOSTCOUNT, |
|
69 ESETRCPITHRESHOLD, |
|
70 ESETTXRATEPOLICY, |
|
71 ESETHTCAPABILITIES, |
|
72 ESETHTBSSOPERATION, |
|
73 ESETHTSECONDARYBEACON, |
|
74 ESETHTBLOCKACKCONFIGURE, |
|
75 ECONTINUEDOT11TRAVERSE, // continue dot11 state traversal |
|
76 ESTATEMAX // defined as an upper bound |
|
77 }; |
|
78 |
|
79 public: |
|
80 |
|
81 /** |
|
82 * C++ default constructor. |
|
83 */ |
|
84 WlanDot11MibDefaultConfigure() : iState( EINIT ), iMemory( NULL ) {}; |
|
85 |
|
86 /** |
|
87 * Destructor. |
|
88 */ |
|
89 virtual ~WlanDot11MibDefaultConfigure(); |
|
90 |
|
91 private: |
|
92 |
|
93 // Prohibit copy constructor |
|
94 WlanDot11MibDefaultConfigure( const WlanDot11MibDefaultConfigure& ); |
|
95 // Prohibit assigment operator |
|
96 WlanDot11MibDefaultConfigure& operator=( |
|
97 const WlanDot11MibDefaultConfigure& ); |
|
98 |
|
99 /** |
|
100 * ?member_description. |
|
101 * @since Series 60 3.1 |
|
102 * @param aCtxImpl global statemachine context |
|
103 */ |
|
104 void ChangeInternalState( |
|
105 WlanContextImpl& aCtxImpl, |
|
106 TState aNewState ); |
|
107 |
|
108 /** |
|
109 * ?member_description. |
|
110 * @since Series 60 3.1 |
|
111 * @param aCtxImpl global statemachine context |
|
112 */ |
|
113 void Fsm( |
|
114 WlanContextImpl& aCtxImpl, |
|
115 TEvent aEvent ); |
|
116 |
|
117 void SetDot11MaxReceiveLifeTime( WlanContextImpl& aCtxImpl ); |
|
118 void SetDot11SlotTime( WlanContextImpl& aCtxImpl ); |
|
119 void SetDot11GroupAddrsTable( WlanContextImpl& aCtxImpl ); |
|
120 void SetDot11WepDefaultKey( WlanContextImpl& aCtxImpl ); |
|
121 void SetDot11CurrentTxPowerLevel( WlanContextImpl& aCtxImpl ); |
|
122 void SetDot11RtsThreshold( WlanContextImpl& aCtxImpl ); |
|
123 void SetCtsToSelf( WlanContextImpl& aCtxImpl ); |
|
124 void SetArpIpAddrsTable( WlanContextImpl& aCtxImpl ); |
|
125 void SetProbeRequestTemplate( WlanContextImpl& aCtxImpl ); |
|
126 void SetRxFilter( WlanContextImpl& aCtxImpl ); |
|
127 void SetBeaconFilterIeTable( WlanContextImpl& aCtxImpl ); |
|
128 void SetBeaconFilterEnable( WlanContextImpl& aCtxImpl ); |
|
129 void SetWlanWakeupInterval( WlanContextImpl& aCtxImpl ); |
|
130 void SetBeaconLostCount( WlanContextImpl& aCtxImpl ); |
|
131 void SetRcpiThreshold( WlanContextImpl& aCtxImpl ); |
|
132 void SetTxRatePolicy( WlanContextImpl& aCtxImpl ); |
|
133 void SetHtCapabilities( WlanContextImpl& aCtxImpl ); |
|
134 void SetHtBssOperation( WlanContextImpl& aCtxImpl ); |
|
135 void SetHtSecondaryBeacon( WlanContextImpl& aCtxImpl ); |
|
136 void SetHtBlockAckConfigure( WlanContextImpl& aCtxImpl ); |
|
137 |
|
138 /** |
|
139 * ?member_description. |
|
140 * @since Series 60 3.1 |
|
141 * @param aCtxImpl global statemachine context |
|
142 */ |
|
143 void OnStateEntryEvent( WlanContextImpl& aCtxImpl ); |
|
144 |
|
145 /** |
|
146 * ?member_description. |
|
147 * @since Series 60 3.1 |
|
148 * @param aCtxImpl global statemachine context |
|
149 */ |
|
150 void OnTxCompleteEvent( WlanContextImpl& aCtxImpl ); |
|
151 |
|
152 /** |
|
153 * ?member_description. |
|
154 * @since Series 60 3.1 |
|
155 * @param aCtxImpl global statemachine context |
|
156 */ |
|
157 void OnAbortEvent( WlanContextImpl& aCtxImpl ); |
|
158 |
|
159 // Functions from base classes |
|
160 |
|
161 /** |
|
162 * From ?base_class ?member_description |
|
163 */ |
|
164 virtual void Entry( WlanContextImpl& aCtxImpl ); |
|
165 |
|
166 /** |
|
167 * From ?base_class ?member_description |
|
168 */ |
|
169 virtual void Exit( WlanContextImpl& aCtxImpl ); |
|
170 |
|
171 /** |
|
172 * From ?base_class ?member_description |
|
173 * Returns the states name |
|
174 */ |
|
175 #ifndef NDEBUG |
|
176 virtual const TInt8* GetStateName( TUint8& aLength ) const; |
|
177 #endif // !NDEBUG |
|
178 |
|
179 private: // Data |
|
180 |
|
181 // state of the object |
|
182 TState iState; |
|
183 |
|
184 // general purpose memory handle for the object |
|
185 TAny* iMemory; |
|
186 |
|
187 #ifndef NDEBUG |
|
188 // max length of state name for tracing |
|
189 enum { KMaxStateStringLength = 50 }; |
|
190 // max length of event name for tracing |
|
191 enum { KMaxEventStringLength = KMaxStateStringLength }; |
|
192 |
|
193 // state names for tracing |
|
194 static const TUint8 iStateName[ESTATEMAX][KMaxStateStringLength]; |
|
195 // event names for tracing |
|
196 static const TUint8 iEventName[EEVENTMAX][KMaxEventStringLength]; |
|
197 // name of the state |
|
198 static const TInt8 iName[]; |
|
199 #endif |
|
200 }; |
|
201 |
|
202 #endif // WLANDOT11MIBDEFAULTCONFIGURE_H |