1 /** \file ScanCncnRoamingContSM.h 2 * \brief This file include definitions for the scan concentrator continuous scan for roaming SM module. 3 * \author Ronen Kalish 4 * \date 02-Jan-2005 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 #ifndef __SCANCNCNROAMINGCONTSM_H__ 42 #define __SCANCNCNROAMINGCONTSM_H__ 43 44 #include "osApi.h" 45 #include "ScanCncn.h" 46 #include "fsm.h" 47 48 /* 49 *********************************************************************** 50 * Constant definitions. 51 *********************************************************************** 52 */ 53 54 /* 55 *********************************************************************** 56 * Enums. 57 *********************************************************************** 58 */ 59 60 /** \enum scan_contSMEvents_e 61 * \brief enumerates the different continuous scan for roaming SM events 62 */ 63 typedef enum 64 { 65 CONT_SCAN_EVENT_START_SCAN = 0, 66 CONT_SCAN_EVENT_SCR_RUN, 67 CONT_SCAN_EVENT_SCR_PEND, 68 CONT_SCAN_EVENT_SCR_REJECT, 69 CONT_SCAN_EVENT_ABORT_SCAN, 70 CONT_SCAN_EVENT_FW_RESET, 71 CONT_SCAN_EVENT_STOP_SCAN, 72 CONT_SCAN_EVENT_SCAN_COMPLETE, 73 CONT_SCAN_NUM_OF_EVENTS 74 } scan_contSMEvents_e; 75 76 /** \enum scan_contSMEvents_e 77 * \brief enumerates the different continuous scan for roaming SM states 78 */ 79 typedef enum 80 { 81 CONT_SCAN_STATE_IDLE = 0, 82 CONT_SCAN_STATE_SCR_REQUEST, 83 CONT_SCAN_STATE_SCR_WAIT, 84 CONT_SCAN_STATE_SCANNING, 85 CONT_SCAN_STATE_STOPPING, 86 CONT_SCAN_NUM_OF_STATES 87 } scan_contSMStates_e; 88 89 /* 90 *********************************************************************** 91 * Typedefs. 92 *********************************************************************** 93 */ 94 95 /* 96 *********************************************************************** 97 * Structure definitions. 98 *********************************************************************** 99 */ 100 101 /* 102 *********************************************************************** 103 * External data definitions. 104 *********************************************************************** 105 */ 106 107 /* 108 *********************************************************************** 109 * External functions definitions 110 *********************************************************************** 111 */ 112 113 /** 114 * \author Ronen Kalish\n 115 * \date 02-Jan-2005\n 116 * \brief Initialize the scan concentrator continuous scan for roaming SM. 117 * 118 * Function Scope \e Public.\n 119 * \param hScanCncn - handle to the scan concentrator object.\n 120 * \return OK if successful, NOK otherwise.\n 121 */ 122 TI_STATUS scanConcentratorRoamingContSM_init( TI_HANDLE hScanCncn ); 123 124 /** 125 * \author Ronen Kalish\n 126 * \date 02-Jan-2005\n 127 * \brief Processes an event. 128 * 129 * Function Scope \e Public.\n 130 * \param hScanCncn - handle to the scan concentrator object.\n 131 * \param currentState - the current continuous scan for roaming SM state.\n 132 * \param event - the event to handle.\n 133 * \return OK if successful, NOK otherwise.\n 134 */ 135 TI_STATUS scanConcentratorRoamingContSM_SMEvent( TI_HANDLE hScanCncn, scan_contSMStates_e* currentState, 136 scan_contSMEvents_e event ); 137 138 /** 139 * \author Ronen Kalish\n 140 * \date 02-Jan-2005\n 141 * \brief SM action - handles a start scan event (by requesting the SCR) 142 * 143 * Function Scope \e Public.\n 144 * \param hScanCncn - handle to the scan concentrator object.\n 145 * \return OK if successful, NOK otherwise.\n 146 */ 147 TI_STATUS scanConcentratorRoamingContSM_requestSCR( TI_HANDLE hScanCncn ); 148 149 /** 150 * \author Ronen Kalish\n 151 * \date 02-Jan-2005\n 152 * \brief SM action - handles a scr run event (by starting the actual scan) 153 * 154 * Function Scope \e Public.\n 155 * \param hScanCncn - handle to the scan concentrator object.\n 156 * \return OK if successful, NOK otherwise.\n 157 */ 158 TI_STATUS scanConcentratorRoamingContSM_startScan( TI_HANDLE hScanCncn ); 159 160 /** 161 * \author Ronen Kalish\n 162 * \date 02-Jan-2005\n 163 * \brief SM action - handles a stop scan or abort scan event (by stopping the actual scan) 164 * 165 * Function Scope \e Public.\n 166 * \param hScanCncn - handle to the scan concentrator object.\n 167 * \return OK if successful, NOK otherwise.\n 168 */ 169 TI_STATUS scanConcentratorRoamingContSM_abortScan( TI_HANDLE hScanCncn ); 170 171 /** 172 * \author Ronen Kalish\n 173 * \date 10-July-2005\n 174 * \brief SM action - handles a recovery event (calls the scan SRV abort on FW reset and than finishes scan) 175 * 176 * Function Scope \e Public.\n 177 * \param hScanCncn - handle to the scan concentrator object.\n 178 * \return OK if successful, NOK otherwise.\n 179 */ 180 TI_STATUS scanConcentratorRoamingContSM_recoveryDuringScan( TI_HANDLE hScanCncn ); 181 182 /** 183 * \author Ronen Kalish\n 184 * \date 02-Jan-2005\n 185 * \brief SM action - handles a scan complete event (by releasing the SCR and calling the scan complete CB). 186 * 187 * Function Scope \e Public.\n 188 * \param hScanCncn - handle to the scan concentrator object.\n 189 * \return OK if successful, NOK otherwise.\n 190 */ 191 TI_STATUS scanConcentratorRoamingContSM_scanComplete( TI_HANDLE hScanCncn ); 192 193 /** 194 * \author Ronen Kalish\n 195 * \date 02-Jan-2005\n 196 * \brief SM action - handles a scan reject event (abort scan before scan acrually started)\n 197 * 198 * Function Scope \e Public.\n 199 * \param hScanCncn - handle to the scan concentrator object.\n 200 * \return OK if successful, NOK otherwise.\n 201 */ 202 TI_STATUS scanConcentratorRoamingContSM_scanRejected( TI_HANDLE hScanCncn ); 203 204 #endif /* __SCANCNCNROAMINGCONTSM_H__ */ 205 206