Home | History | Annotate | Download | only in AirLink_Managment
      1 /*
      2  * measurementMgrSM.h
      3  *
      4  * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  *
     11  *  * Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  *  * Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in
     15  *    the documentation and/or other materials provided with the
     16  *    distribution.
     17  *  * Neither the name Texas Instruments nor the names of its
     18  *    contributors may be used to endorse or promote products derived
     19  *    from this software without specific prior written permission.
     20  *
     21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  */
     33 
     34 
     35 /***************************************************************************/
     36 /*																		   */
     37 /*	  MODULE:	measurementMgrSM.h										   */
     38 /*    PURPOSE:	measurement Manager module State Machine header file       */
     39 /*																		   */
     40 /***************************************************************************/
     41 
     42 #ifndef __MEASUREMENTMGRSM_H__
     43 #define __MEASUREMENTMGRSM_H__
     44 
     45 #include "fsm.h"
     46 
     47 
     48 
     49 /** State machine states */
     50 typedef enum
     51 {
     52 	MEASUREMENTMGR_STATE_IDLE					= 0,
     53     MEASUREMENTMGR_STATE_PROCESSING_REQUEST		= 1,
     54     MEASUREMENTMGR_STATE_WAITING_FOR_SCR		= 2,
     55     MEASUREMENTMGR_STATE_MEASURING				= 3,
     56 	MEASUREMENTMGR_STATE_LAST					= 4
     57 } measurementMgrSM_States;
     58 
     59 
     60 /** State machine events */
     61 typedef enum
     62 {
     63 	MEASUREMENTMGR_EVENT_CONNECTED				= 0,
     64 	MEASUREMENTMGR_EVENT_DISCONNECTED			= 1,
     65 	MEASUREMENTMGR_EVENT_ENABLE					= 2,
     66 	MEASUREMENTMGR_EVENT_DISABLE				= 3,
     67     MEASUREMENTMGR_EVENT_FRAME_RECV				= 4,
     68     MEASUREMENTMGR_EVENT_SEND_REPORT			= 5,
     69 	MEASUREMENTMGR_EVENT_REQUEST_SCR			= 6,
     70     MEASUREMENTMGR_EVENT_SCR_WAIT				= 7,
     71     MEASUREMENTMGR_EVENT_SCR_RUN				= 8,
     72     MEASUREMENTMGR_EVENT_ABORT					= 9,
     73     MEASUREMENTMGR_EVENT_COMPLETE				= 10,
     74     MEASUREMENTMGR_EVENT_FW_RESET				= 11,
     75 	MEASUREMENTMGR_EVENT_LAST					= 12
     76 } measurementMgrSM_Events;
     77 
     78 
     79 #define MEASUREMENTMGR_NUM_STATES		MEASUREMENTMGR_STATE_LAST
     80 #define MEASUREMENTMGR_NUM_EVENTS		MEASUREMENTMGR_EVENT_LAST
     81 
     82 
     83 
     84 
     85 TI_STATUS measurementMgrSM_config(TI_HANDLE hMeasurementMgr);
     86 
     87 TI_STATUS measurementMgrSM_event(TI_UINT8 * currentState, TI_UINT8 event, TI_HANDLE hMeasurementMgr);
     88 
     89 
     90 #endif /* __MEASUREMENTMGRSM_H__*/
     91