1 /* 2 * measurementMgr.h 3 * 4 * Copyright(c) 1998 - 2010 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: measurementMgr.h */ 38 /* PURPOSE: measurement Manager module header file */ 39 /* */ 40 /***************************************************************************/ 41 42 43 44 45 #ifndef __MEASUREMENTMGR_H__ 46 #define __MEASUREMENTMGR_H__ 47 48 49 #include "report.h" 50 #include "timer.h" 51 #include "paramOut.h" 52 #include "requestHandler.h" 53 #include "measurementMgrSM.h" 54 #ifdef XCC_MODULE_INCLUDED 55 #include "XCCRMMngrParam.h" 56 #endif 57 58 59 /* Functions Pointers Definitions */ 60 typedef TI_STATUS (*parserFrameReq_t) (TI_HANDLE hMeasurementMgr, 61 TI_UINT8 *pData, TI_INT32 dataLen, 62 TMeasurementFrameRequest *frameReq); 63 64 typedef TI_BOOL (*isTypeValid_t) (TI_HANDLE hMeasurementMgr, 65 EMeasurementType type, 66 EMeasurementScanMode scanMode); 67 68 typedef TI_STATUS (*buildRejectReport_t) (TI_HANDLE hMeasurementMgr, 69 MeasurementRequest_t *pRequestArr[], 70 TI_UINT8 numOfRequestsInParallel, 71 EMeasurementRejectReason rejectReason); 72 73 typedef TI_STATUS (*buildReport_t) (TI_HANDLE hMeasurementMgr, 74 MeasurementRequest_t request, 75 TMeasurementTypeReply * reply); 76 77 typedef TI_STATUS (*sendReportAndCleanObj_t)(TI_HANDLE hMeasurementMgr); 78 79 80 81 typedef struct 82 { 83 84 /* Timers */ 85 void * hActivationDelayTimer; 86 87 88 /* Methods */ 89 parserFrameReq_t parserFrameReq; 90 isTypeValid_t isTypeValid; 91 buildRejectReport_t buildRejectReport; 92 buildReport_t buildReport; 93 sendReportAndCleanObj_t sendReportAndCleanObj; 94 95 96 /* Data */ 97 TI_BOOL Enabled; 98 TI_BOOL Connected; 99 100 TI_UINT8 servingChannelID; 101 TI_UINT8 measuredChannelID; 102 103 EMeasurementMode Mode; 104 TI_UINT8 Capabilities; 105 TI_BOOL isModuleRegistered; 106 107 TI_UINT16 trafficIntensityThreshold; 108 TI_UINT16 maxDurationOnNonServingChannel; 109 110 TI_BOOL bMeasurementScanExecuted; /* flag indicating if measurment scan was 111 executed by AP after the last connection */ 112 113 /* State Machine Params */ 114 fsm_stateMachine_t * pMeasurementMgrSm; 115 measurementMgrSM_States currentState; 116 117 118 /* Report Frame Params */ 119 #ifdef XCC_MODULE_INCLUDED 120 RM_report_frame_t XCCFrameReport; 121 #endif 122 MeasurementReportFrame_t dot11hFrameReport; 123 TI_UINT16 nextEmptySpaceInReport; 124 TI_UINT16 frameLength; 125 126 127 /* Request Frame Params */ 128 MeasurementRequest_t * currentRequest[MAX_NUM_REQ]; 129 TI_UINT8 currentNumOfRequestsInParallel; 130 EMeasurementFrameType currentFrameType; 131 TI_UINT32 currentRequestStartTime; 132 TMeasurementFrameRequest newFrameRequest; 133 134 135 /* XCC Traffic Stream Metrics measurement parameters */ 136 TI_HANDLE hTsMetricsReportTimer[MAX_NUM_OF_AC]; 137 TI_BOOL isTsMetricsEnabled[MAX_NUM_OF_AC]; 138 139 /* Handles to other modules */ 140 TI_HANDLE hRequestH; 141 TI_HANDLE hRegulatoryDomain; 142 TI_HANDLE hXCCMngr; 143 TI_HANDLE hSiteMgr; 144 TI_HANDLE hTWD; 145 TI_HANDLE hMlme; 146 TI_HANDLE hTrafficMonitor; 147 TI_HANDLE hReport; 148 TI_HANDLE hOs; 149 TI_HANDLE hScr; 150 TI_HANDLE hApConn; 151 TI_HANDLE hTxCtrl; 152 TI_HANDLE hTimer; 153 TI_HANDLE hSme; 154 } measurementMgr_t; 155 156 157 158 159 TI_STATUS measurementMgr_activateNextRequest(TI_HANDLE pContext); 160 161 162 163 164 #endif /* __MEASUREMENTMGR_H__*/ 165 166