static TI_STATUS measurementMgrSM_acFrameReceived_fromMeasuring(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	/* Process New Frame */
	return measurementMgrSM_acFrameReceived_fromIdle(pData);
}
static TI_STATUS measurementMgrSM_acDisable_fromMeasuring(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	pMeasurementMgr->Enabled = TI_FALSE;

	return TI_OK;
}
/**
 * Called when a firmware reset has been detected.
 *
 * @date 05-Jan-2006
 */
static TI_STATUS measurementMgrSM_acFirmwareReset(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Firmware Reset!!\n");

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	return TI_OK;
}
static TI_STATUS measurementMgrSM_acAbort_fromMeasuring(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	TWD_StopMeasurement (pMeasurementMgr->hTWD, TI_TRUE ,NULL, NULL);

	return TI_OK;
}
/**
 * Called if the SCR callbacked with a response other than RUN.
 *
 * @date 05-Jan-2006
 */
static TI_STATUS measurementMgrSM_acAbort_fromWaitForSCR(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* Release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Build a reject report */
	measurementMgr_rejectPendingRequests(pMeasurementMgr, MSR_REJECT_SCR_UNAVAILABLE);

	/* Clear Measurement fields */
	pMeasurementMgr->sendReportAndCleanObj(pMeasurementMgr);

	return TI_OK;
}
Пример #6
0
/** 
 * \fn     sme_Start
 * \brief  Starts SME operation
 * 
 * Starts SME operation. Send probe request templates and send a start event to the SM.
 * Only the DrvMain module could & is call that function !!!
 * 
 * \param  hSme - handle to the SME object
 * \return None
 * \sa     sme_Stop
 */ 
void sme_Start (TI_HANDLE hSme)
{
    TSme                *pSme = (TSme*)hSme;

    TRACE1(pSme->hReport, REPORT_SEVERITY_INFORMATION , "sme_Start: called, bRadioOn = %d\n", pSme->bRadioOn);

    pSme->bRunning = TI_TRUE;

    /* 
     * call setDefaultProbeReqTemplate at sme_Start() due to the fact in order to set prob req template 
     * all moudules need to be set already 
     */
    setDefaultProbeReqTemplate (pSme->hSiteMgr);

    /* if radio is on, start the SM */
    if (TI_TRUE == pSme->bRadioOn)
    {
        genSM_Event (pSme->hSmeSm, SME_SM_EVENT_START, hSme);
    }
}
/**
 * Called when we finished a measurement request.
 *
 * @date 05-Jan-2006
 */
static TI_STATUS measurementMgrSM_acMeasurementComplete(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
	requestHandler_t * pRequestH = (requestHandler_t *) pMeasurementMgr->hRequestH;

	TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Completing measurement operation and resuming normal behavior\n");

	/* advance the activeRequestID variable to get rid of the */
	/* measurement requests we've already executed */
	TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Increasing activeRequestID from %d to %d.\n", pRequestH->activeRequestID, pRequestH->activeRequestID + pMeasurementMgr->currentNumOfRequestsInParallel);

	pRequestH->activeRequestID += pMeasurementMgr->currentNumOfRequestsInParallel;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* move the driver result table to stable state and clear it */
	sme_MeansurementScanResult (pMeasurementMgr->hSme, SCAN_CRS_SCAN_COMPLETE_OK, NULL);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Process New Frame */
	return measurementMgr_activateNextRequest(pData);
}