1 /** \file requestHandler.h 2 * \brief Request Handler module interface header file 3 * 4 * \see requestHandler.c 5 */ 6 /**************************************************************************** 7 **+-----------------------------------------------------------------------+** 8 **| |** 9 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 10 **| All rights reserved. |** 11 **| |** 12 **| Redistribution and use in source and binary forms, with or without |** 13 **| modification, are permitted provided that the following conditions |** 14 **| are met: |** 15 **| |** 16 **| * Redistributions of source code must retain the above copyright |** 17 **| notice, this list of conditions and the following disclaimer. |** 18 **| * Redistributions in binary form must reproduce the above copyright |** 19 **| notice, this list of conditions and the following disclaimer in |** 20 **| the documentation and/or other materials provided with the |** 21 **| distribution. |** 22 **| * Neither the name Texas Instruments nor the names of its |** 23 **| contributors may be used to endorse or promote products derived |** 24 **| from this software without specific prior written permission. |** 25 **| |** 26 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 27 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 28 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 29 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 30 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 31 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 32 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 33 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 34 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 35 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 36 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 37 **| |** 38 **+-----------------------------------------------------------------------+** 39 ****************************************************************************/ 40 41 /***************************************************************************/ 42 /* */ 43 /* MODULE: requestHandler.h */ 44 /* PURPOSE: Request Handler module interface header file */ 45 /* */ 46 /***************************************************************************/ 47 #ifndef __REQUEST_HANDLER_H__ 48 #define __REQUEST_HANDLER_H__ 49 50 #include "paramOut.h" 51 #include "802_11Defs.h" 52 #include "measurementMgrApi.h" 53 54 PACKED_STRUCT( MeasurementRequest_t , 55 56 measurement_type_e Type; 57 BOOL isParallel; 58 UINT16 frameToken; 59 UINT16 measurementToken; 60 UINT8 channelNumber; 61 UINT16 DurationTime; 62 UINT8 ActualDurationTime; 63 measurement_scanMode_e ScanMode; 64 ); 65 66 67 /* Functions Pointers Definitions */ 68 typedef TI_STATUS (*parserRequestIEHdr_t) (UINT8 *pData, UINT16 *reqestLen, 69 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 UINT8 numOfWaitingRequests; 79 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 measurement_mode_e measurementMode, 104 measurement_frameRequest_t measurementFrameReq); 105 106 TI_STATUS requestHandler_getNextReq(TI_HANDLE hRequestHandler, 107 BOOL isForActivation, 108 MeasurementRequest_t *pRequest[], 109 UINT8* numOfRequests); 110 111 TI_STATUS requestHandler_getCurrentExpiredReq(TI_HANDLE hRequestHandler, 112 UINT8 requestIndex, 113 MeasurementRequest_t **pRequest); 114 115 TI_STATUS requestHandler_clearRequests(TI_HANDLE hRequestHandler); 116 117 TI_STATUS requestHandler_getFrameToken(TI_HANDLE hRequestHandler,UINT16 *frameToken ); 118 119 TI_STATUS requestHandler_setRequestParserFunction(TI_HANDLE hRequestHandler, 120 parserRequestIEHdr_t parserRequestIEHdr); 121 122 123 #endif /* __REQUEST_HANDLER_H__*/ 124