1/* 2 * measurementMgr.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: 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 */ 60typedef TI_STATUS (*parserFrameReq_t) (TI_HANDLE hMeasurementMgr, 61 TI_UINT8 *pData, TI_INT32 dataLen, 62 TMeasurementFrameRequest *frameReq); 63 64typedef TI_BOOL (*isTypeValid_t) (TI_HANDLE hMeasurementMgr, 65 EMeasurementType type, 66 EMeasurementScanMode scanMode); 67 68typedef TI_STATUS (*buildRejectReport_t) (TI_HANDLE hMeasurementMgr, 69 MeasurementRequest_t *pRequestArr[], 70 TI_UINT8 numOfRequestsInParallel, 71 EMeasurementRejectReason rejectReason); 72 73typedef TI_STATUS (*buildReport_t) (TI_HANDLE hMeasurementMgr, 74 MeasurementRequest_t request, 75 TMeasurementTypeReply * reply); 76 77typedef TI_STATUS (*sendReportAndCleanObj_t)(TI_HANDLE hMeasurementMgr); 78 79 80 81typedef 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 111 /* State Machine Params */ 112 fsm_stateMachine_t * pMeasurementMgrSm; 113 measurementMgrSM_States currentState; 114 115 116 /* Report Frame Params */ 117#ifdef XCC_MODULE_INCLUDED 118 RM_report_frame_t XCCFrameReport; 119#endif 120 MeasurementReportFrame_t dot11hFrameReport; 121 TI_UINT16 nextEmptySpaceInReport; 122 TI_UINT16 frameLength; 123 124 125 /* Request Frame Params */ 126 MeasurementRequest_t * currentRequest[MAX_NUM_REQ]; 127 TI_UINT8 currentNumOfRequestsInParallel; 128 EMeasurementFrameType currentFrameType; 129 TI_UINT32 currentRequestStartTime; 130 TMeasurementFrameRequest newFrameRequest; 131 132 133 /* XCC Traffic Stream Metrics measurement parameters */ 134 TI_HANDLE hTsMetricsReportTimer[MAX_NUM_OF_AC]; 135 TI_BOOL isTsMetricsEnabled[MAX_NUM_OF_AC]; 136 137 /* Handles to other modules */ 138 TI_HANDLE hRequestH; 139 TI_HANDLE hRegulatoryDomain; 140 TI_HANDLE hXCCMngr; 141 TI_HANDLE hSiteMgr; 142 TI_HANDLE hTWD; 143 TI_HANDLE hMlme; 144 TI_HANDLE hTrafficMonitor; 145 TI_HANDLE hReport; 146 TI_HANDLE hOs; 147 TI_HANDLE hScr; 148 TI_HANDLE hApConn; 149 TI_HANDLE hTxCtrl; 150 TI_HANDLE hTimer; 151 TI_HANDLE hSme; 152} measurementMgr_t; 153 154 155 156 157TI_STATUS measurementMgr_activateNextRequest(TI_HANDLE pContext); 158 159 160 161 162#endif /* __MEASUREMENTMGR_H__*/ 163 164