1 /* 2 * requestHandler.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 /** \file requestHandler.h 35 * \brief Request Handler module interface header file 36 * 37 * \see requestHandler.c 38 */ 39 40 /***************************************************************************/ 41 /* */ 42 /* MODULE: requestHandler.h */ 43 /* PURPOSE: Request Handler module interface header file */ 44 /* */ 45 /***************************************************************************/ 46 #ifndef __REQUEST_HANDLER_H__ 47 #define __REQUEST_HANDLER_H__ 48 49 #include "paramOut.h" 50 #include "802_11Defs.h" 51 #include "measurementMgrApi.h" 52 53 54 typedef struct 55 { 56 EMeasurementType Type; 57 TI_BOOL isParallel; 58 TI_UINT16 frameToken; 59 TI_UINT16 measurementToken; 60 TI_UINT8 channelNumber; 61 TI_UINT16 DurationTime; 62 TI_UINT8 ActualDurationTime; 63 EMeasurementScanMode ScanMode; 64 } MeasurementRequest_t; 65 66 67 /* Functions Pointers Definitions */ 68 typedef TI_STATUS (*parserRequestIEHdr_t) (TI_UINT8 *pData, TI_UINT16 *reqestLen, 69 TI_UINT16 *measurementToken); 70 71 typedef struct 72 { 73 /* Function to the Pointer */ 74 parserRequestIEHdr_t parserRequestIEHdr; 75 76 /* General Params */ 77 MeasurementRequest_t reqArr[MAX_NUM_REQ]; 78 TI_UINT8 numOfWaitingRequests; 79 TI_INT8 activeRequestID; 80 81 /* Handlers */ 82 TI_HANDLE hReport; 83 TI_HANDLE hOs; 84 } requestHandler_t; 85 86 87 88 TI_HANDLE requestHandler_create(TI_HANDLE hOs); 89 90 TI_STATUS RequestHandler_config(TI_HANDLE hRequestHandler, 91 TI_HANDLE hReport, 92 TI_HANDLE hOs); 93 94 TI_STATUS requestHandler_setParam(TI_HANDLE hRequestHandler, 95 paramInfo_t *pParam); 96 97 TI_STATUS requestHandler_getParam(TI_HANDLE hRequestHandler, 98 paramInfo_t *pParam); 99 100 TI_STATUS requestHandler_destroy(TI_HANDLE hRequestHandler); 101 102 TI_STATUS requestHandler_insertRequests(TI_HANDLE hRequestHandler, 103 EMeasurementMode measurementMode, 104 TMeasurementFrameRequest measurementFrameReq); 105 106 TI_STATUS requestHandler_getNextReq(TI_HANDLE hRequestHandler, 107 TI_BOOL isForActivation, 108 MeasurementRequest_t *pRequest[], 109 TI_UINT8* numOfRequests); 110 111 TI_STATUS requestHandler_getCurrentExpiredReq(TI_HANDLE hRequestHandler, 112 TI_UINT8 requestIndex, 113 MeasurementRequest_t **pRequest); 114 115 TI_STATUS requestHandler_clearRequests(TI_HANDLE hRequestHandler); 116 117 TI_STATUS requestHandler_getFrameToken(TI_HANDLE hRequestHandler,TI_UINT16 *frameToken ); 118 119 TI_STATUS requestHandler_setRequestParserFunction(TI_HANDLE hRequestHandler, 120 parserRequestIEHdr_t parserRequestIEHdr); 121 122 123 #endif /* __REQUEST_HANDLER_H__*/ 124