wlan_bearer/wlanldd/wlan_common/umac_common/inc/UmacDot11PrepareForBssMode.h
changeset 0 c40eb8fe8501
equal deleted inserted replaced
-1:000000000000 0:c40eb8fe8501
       
     1 /*
       
     2 * Copyright (c) 2002-2007 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 WlanDot11PrepareForBssMode class
       
    15 *
       
    16 */
       
    17 
       
    18 /*
       
    19 * %version: 18 %
       
    20 */
       
    21 
       
    22 #ifndef WLANDOT11PREPAREFORBSSMODE_H
       
    23 #define WLANDOT11PREPAREFORBSSMODE_H
       
    24 
       
    25 #include "UmacDot11State.h"
       
    26 
       
    27 /**
       
    28 *  State to join to a BSS network
       
    29 *
       
    30 *  @lib wlanumac.lib
       
    31 *  @since S60 v3.1
       
    32 */
       
    33 class WlanDot11PrepareForBssMode : public WlanDot11State
       
    34     {
       
    35 
       
    36 public:
       
    37     
       
    38     /**
       
    39     * C++ default constructor.
       
    40     */
       
    41     WlanDot11PrepareForBssMode() : iState( EINIT ), iJoinFailed ( EFalse ) {};
       
    42     
       
    43     /**
       
    44     * Destructor.
       
    45     */
       
    46     virtual ~WlanDot11PrepareForBssMode() {};
       
    47 
       
    48             
       
    49 private:  // definitions
       
    50 
       
    51     // events for the FSM
       
    52     enum TEvent
       
    53         {
       
    54         // state entry action to be executed
       
    55         ESTATEENTRY,        
       
    56         // underlying sw layer tx delivery complete event 
       
    57         ETXCOMPLETE,        
       
    58         // abort FSM execution 
       
    59         EABORT,
       
    60         // defined as an upper bound            
       
    61         EEVENTMAX           
       
    62         };
       
    63 
       
    64     // states of the FSM
       
    65     enum TState
       
    66         {
       
    67         EINIT,                      // start state of the state machine
       
    68         ESETSLEEPMODE,              // configure sleep mode mib
       
    69         ESETDOT11SLOTTIME,          // configure slottime mib if 
       
    70                                     // supported by the WLAN vendor solution
       
    71         ESETCTSTOSELF,              // configure ctstoself mib 
       
    72         ECONFTXQUEUE,               // configure just the legacy tx queue
       
    73         ECONFTXQUEUEPARAMS,         // configure tx queue parameters
       
    74         ESETTXRATEPOLICY,           // set Tx rate policy
       
    75         ESETHTCAPABILITIES,         // configure HT capabilities mib 
       
    76         ESETHTBSSOPERATION,         // configure HT BSS operation mib
       
    77         ERESETHTCAPABILITIES,       // reset HT capabilities mib
       
    78         EISSUEJOIN,                 // issue join command
       
    79         ESETHTBLOCKACKCONF,         // configure HT Block Ack configure mib
       
    80         ERESETHTBLOCKACKCONF,       // reset HT Block Ack configure mib
       
    81         ECONTINUEDOT11TRAVERSE,     // continue dot11 fsm traversal
       
    82         ESTATEMAX                   // defined as an upper bound        
       
    83         }; 
       
    84 
       
    85 private:  
       
    86 
       
    87     /**
       
    88     * ?member_description.
       
    89     * @since Series 60 3.1
       
    90     * @param aCtxImpl global statemachine context
       
    91     */
       
    92     void ChangeInternalState( 
       
    93         WlanContextImpl& aCtxImpl, 
       
    94         TState aNewState );
       
    95 
       
    96     /**
       
    97     * ?member_description.
       
    98     * @since Series 60 3.1
       
    99     * @param aCtxImpl global statemachine context
       
   100     */
       
   101     void Fsm( 
       
   102         WlanContextImpl& aCtxImpl, 
       
   103         TEvent aEvent ); 
       
   104 
       
   105     /**
       
   106     * ?member_description.
       
   107     * @since Series 60 3.1
       
   108     * @param aCtxImpl global statemachine context
       
   109     */
       
   110     void OnStateEntryEvent( WlanContextImpl& aCtxImpl );
       
   111 
       
   112     /**
       
   113     * ?member_description.
       
   114     * @since Series 60 3.1
       
   115     * @param aCtxImpl global statemachine context
       
   116     */
       
   117     void OnTxCompleteEvent( WlanContextImpl& aCtxImpl );
       
   118 
       
   119     /**
       
   120     * ?member_description.
       
   121     * @since Series 60 3.1
       
   122     * @param aCtxImpl global statemachine context
       
   123     */
       
   124     void OnAbortEvent( WlanContextImpl& aCtxImpl );
       
   125 
       
   126     /**
       
   127     * ?member_description.
       
   128     * @since Series 60 3.1
       
   129     * @param aCtxImpl global statemachine context
       
   130     */
       
   131     void SetSleepMode( WlanContextImpl& aCtxImpl );
       
   132 
       
   133     /**
       
   134     * ?member_description.
       
   135     * @since Series 60 3.1
       
   136     * @param aCtxImpl global statemachine context
       
   137     */
       
   138     void SetDot11SlotTime( WlanContextImpl& aCtxImpl );
       
   139 
       
   140     /**
       
   141     * ?member_description.
       
   142     * @since Series 60 3.1
       
   143     * @param aCtxImpl global statemachine context
       
   144     */
       
   145     void SetCtsToSelf( WlanContextImpl& aCtxImpl );
       
   146 
       
   147     /**
       
   148      * ?member_description.
       
   149      *
       
   150      * @since Series 60 3.1
       
   151      * @param aCtxImpl global statemachine context
       
   152      */
       
   153     void ConfigureQueue( WlanContextImpl& aCtxImpl );
       
   154 
       
   155     /**
       
   156      * ?member_description.
       
   157      *
       
   158      * @since Series 60 3.1
       
   159      * @param aCtxImpl global statemachine context
       
   160      */
       
   161     void ConfigureTxQueueParams( WlanContextImpl& aCtxImpl );
       
   162 
       
   163     /**
       
   164      * ?member_description.
       
   165      *
       
   166      * @since Series 60 3.1
       
   167      * @param aCtxImpl global statemachine context
       
   168      */
       
   169     void SetTxRatePolicy( WlanContextImpl& aCtxImpl );
       
   170                 
       
   171     /**
       
   172     * Informs lower layer about the HT capabilities
       
   173     * of the target network
       
   174     * @param aCtxImpl global statemachine context
       
   175     */
       
   176     void SetHtCapabilities( WlanContextImpl& aCtxImpl );    
       
   177 
       
   178     /**
       
   179     * Informs lower layer about the dynamic HT configuration
       
   180     * of the target network
       
   181     * @param aCtxImpl statemachine context
       
   182     */
       
   183     void SetHtBssOperation( WlanContextImpl& aCtxImpl );    
       
   184 
       
   185     /**
       
   186     * Resets the HT Capabilities MIB to its default value
       
   187     * @param aCtxImpl statemachine context
       
   188     */
       
   189     void ResetHtCapabilities( WlanContextImpl& aCtxImpl );
       
   190     
       
   191     /**
       
   192     * Resets the HT Block Ack Configure MIB to its default value
       
   193     * @param aCtxImpl statemachine context
       
   194     */
       
   195     void ResetHtBlockAckConfiguration( WlanContextImpl& aCtxImpl );
       
   196 
       
   197     /**
       
   198     * Informs lower layer about the HT Block Ack configuration
       
   199     * of the target network
       
   200     * @param aCtxImpl statemachine context
       
   201     */
       
   202     void SetHtBlockAckConfiguration( WlanContextImpl& aCtxImpl );
       
   203 
       
   204     /**
       
   205     * ?member_description.
       
   206     * @since Series 60 3.1
       
   207     * @param aCtxImpl global statemachine context
       
   208     */
       
   209     void IssueJoin( WlanContextImpl& aCtxImpl );
       
   210 
       
   211     /**
       
   212     * ?member_description.
       
   213     * @since Series 60 3.1
       
   214     * @param aCtxImpl global statemachine context
       
   215     */
       
   216     void ContinueDot11StateTraversal( WlanContextImpl& aCtxImpl );
       
   217 
       
   218     // Functions from base classes
       
   219 
       
   220     /**
       
   221     * From ?base_class ?member_description
       
   222     */
       
   223     virtual void Entry( WlanContextImpl& aCtxImpl );
       
   224 
       
   225     /**
       
   226     * From ?base_class ?member_description
       
   227     */
       
   228     virtual void Exit( WlanContextImpl& aCtxImpl );
       
   229 
       
   230     /**
       
   231     * From ?base_class ?member_description
       
   232     */
       
   233     virtual void OnWhaCommandResponse( 
       
   234         WlanContextImpl& aCtxImpl, 
       
   235         WHA::TCommandId aCommandId, 
       
   236         WHA::TStatus aStatus,
       
   237         const WHA::UCommandResponseParams& aCommandResponseParams,
       
   238         TUint32 aAct );
       
   239         
       
   240     /**
       
   241     * From ?base_class ?member_description
       
   242     * Returns the states name
       
   243     */
       
   244 #ifndef NDEBUG 
       
   245         virtual const TInt8* GetStateName( TUint8& aLength ) const;
       
   246 #endif // !NDEBUG 
       
   247 
       
   248     // Prohibit copy constructor 
       
   249     WlanDot11PrepareForBssMode( const WlanDot11PrepareForBssMode& );
       
   250     // Prohibit assigment operator 
       
   251     WlanDot11PrepareForBssMode& operator=( 
       
   252         const WlanDot11PrepareForBssMode& );
       
   253 
       
   254 private:    // Data
       
   255 
       
   256     // state of the object
       
   257     TState iState;
       
   258     
       
   259     // true, if the Join operation failed
       
   260     TBool iJoinFailed;
       
   261 
       
   262 #ifndef NDEBUG
       
   263     // max length of state name for tracing 
       
   264     enum { KMaxStateStringLength = 50 };
       
   265     // max length of event name for tracing 
       
   266     enum { KMaxEventStringLength = KMaxStateStringLength };
       
   267 
       
   268     // state names for tracing 
       
   269     static const TUint8 iStateName[ESTATEMAX][KMaxStateStringLength];
       
   270     // event names for tracing 
       
   271     static const TUint8 iEventName[EEVENTMAX][KMaxEventStringLength];         
       
   272     // name of the state 
       
   273     static const TInt8 iName[];        
       
   274 #endif
       
   275     };
       
   276 
       
   277 #endif      // WLANDOT11PREPAREFORBSSMODE_H