1 2 /**************************************************************************** 3 **+-----------------------------------------------------------------------+** 4 **| |** 5 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 6 **| All rights reserved. |** 7 **| |** 8 **| Redistribution and use in source and binary forms, with or without |** 9 **| modification, are permitted provided that the following conditions |** 10 **| are met: |** 11 **| |** 12 **| * Redistributions of source code must retain the above copyright |** 13 **| notice, this list of conditions and the following disclaimer. |** 14 **| * Redistributions in binary form must reproduce the above copyright |** 15 **| notice, this list of conditions and the following disclaimer in |** 16 **| the documentation and/or other materials provided with the |** 17 **| distribution. |** 18 **| * Neither the name Texas Instruments nor the names of its |** 19 **| contributors may be used to endorse or promote products derived |** 20 **| from this software without specific prior written permission. |** 21 **| |** 22 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 23 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 24 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 25 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 26 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 27 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 28 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 29 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 30 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 31 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 32 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 33 **| |** 34 **+-----------------------------------------------------------------------+** 35 ****************************************************************************/ 36 37 /***************************************************************************/ 38 /* */ 39 /* MODULE: measurementMgr.h */ 40 /* PURPOSE: measurement Manager module header file */ 41 /* */ 42 /***************************************************************************/ 43 44 45 46 47 #ifndef __MEASUREMENTMGR_H__ 48 #define __MEASUREMENTMGR_H__ 49 50 51 #include "report.h" 52 #include "paramOut.h" 53 #include "requestHandler.h" 54 #include "measurementMgrSM.h" 55 #ifdef EXC_MODULE_INCLUDED 56 #include "excRMMngrParam.h" 57 #endif 58 59 60 /* Functions Pointers Definitions */ 61 typedef TI_STATUS (*parserFrameReq_t) (TI_HANDLE hMeasurementMgr, 62 UINT8 *pData, INT32 dataLen, 63 measurement_frameRequest_t *frameReq); 64 65 typedef BOOL (*isTypeValid_t) (TI_HANDLE hMeasurementMgr, 66 measurement_type_e type, 67 measurement_scanMode_e scanMode); 68 69 typedef TI_STATUS (*buildRejectReport_t) (TI_HANDLE hMeasurementMgr, 70 MeasurementRequest_t *pRequestArr[], 71 UINT8 numOfRequestsInParallel, 72 measurement_rejectReason_e rejectReason); 73 74 typedef TI_STATUS (*buildReport_t) (TI_HANDLE hMeasurementMgr, 75 MeasurementRequest_t request, 76 measurement_typeReply_t * reply); 77 78 typedef TI_STATUS (*sendReportAndCleanObj_t)(TI_HANDLE hMeasurementMgr); 79 80 81 82 typedef struct 83 { 84 85 /* Timers */ 86 void * pActivationDelayTimer; 87 88 89 /* Methods */ 90 parserFrameReq_t parserFrameReq; 91 isTypeValid_t isTypeValid; 92 buildRejectReport_t buildRejectReport; 93 buildReport_t buildReport; 94 sendReportAndCleanObj_t sendReportAndCleanObj; 95 96 97 /* Data */ 98 BOOL Enabled; 99 BOOL Connected; 100 101 UINT8 servingChannelID; 102 UINT8 measuredChannelID; 103 104 measurement_mode_e Mode; 105 UINT8 Capabilities; 106 BOOL isModuleRegistered; 107 108 UINT16 trafficIntensityThreshold; 109 UINT16 maxDurationOnNonServingChannel; 110 111 112 /* State Machine Params */ 113 fsm_stateMachine_t * pMeasurementMgrSm; 114 measurementMgrSM_States currentState; 115 116 117 /* Report Frame Params */ 118 #ifdef EXC_MODULE_INCLUDED 119 RM_report_frame_t excFrameReport; 120 #endif 121 MeasurementReportFrame_t dot11hFrameReport; 122 UINT16 nextEmptySpaceInReport; 123 UINT16 frameLength; 124 125 126 /* Request Frame Params */ 127 MeasurementRequest_t * currentRequest[MAX_NUM_REQ]; 128 UINT8 currentNumOfRequestsInParallel; 129 measurement_frameType_e currentFrameType; 130 UINT32 currentRequestStartTime; 131 measurement_frameRequest_t newFrameRequest; 132 133 134 /* EXC Traffic Stream Metrics measurement parameters */ 135 void *pTsMetricsReportTimer[MAX_NUM_OF_AC]; 136 BOOL isTsMetricsEnabled[MAX_NUM_OF_AC]; 137 138 /* Handles to other modules */ 139 TI_HANDLE hRequestH; 140 TI_HANDLE hMacServices; 141 TI_HANDLE hRegulatoryDomain; 142 TI_HANDLE hExcMngr; 143 TI_HANDLE hSiteMgr; 144 TI_HANDLE hHalCtrl; 145 TI_HANDLE hMlme; 146 TI_HANDLE hTrafficMonitor; 147 TI_HANDLE hReport; 148 TI_HANDLE hOs; 149 TI_HANDLE hScr; 150 TI_HANDLE hHealthMonitor; 151 TI_HANDLE hApConn; 152 TI_HANDLE hTx; 153 } measurementMgr_t; 154 155 156 157 158 TI_STATUS measurementMgr_activateNextRequest(TI_HANDLE pContext); 159 160 161 162 163 #endif /* __MEASUREMENTMGR_H__*/ 164 165