1/*
2 * measurementSrvDbgPrint.c
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 measurementSrvDbgPrint.c
35 *  \brief This file include variuos measurement SRV debug print facilities
36 *  \author Ronen Kalish
37 *  \date 23-December-2005
38 */
39
40#define __FILE_ID__  FILE_ID_111
41#include "report.h"
42#include "TWDriver.h"
43#include "MeasurementSrvSM.h"
44#include "MeasurementSrv.h"
45#include "measurementSrvDbgPrint.h"
46
47
48/**
49 * \author Ronen Kalish\n
50 * \date 23-December-2005\n
51 * \brief Prints a measurement request.\n
52 *
53 * Function Scope \e Public.\n
54 * \param hMeasurementSRV - handle to the measurement SRV object.\n
55 * \param pMsrRequest - the measurement request.\n
56 */
57void measurementSRVPrintRequest( TI_HANDLE hMeasurementSRV, TMeasurementRequest *pMsrRequest )
58{
59#ifdef TI_DBG
60	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
61	TI_INT32 i;
62
63TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "Measurement request:\n");
64TRACE5( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "band: %d, channel:%d, TX power level: %d, start time: %x-%x\n", pMsrRequest->band, pMsrRequest->channel, pMsrRequest->txPowerDbm, INT64_HIGHER(pMsrRequest->startTime), INT64_LOWER(pMsrRequest->startTime));
65	for ( i = 0; i < pMsrRequest->numberOfTypes; i++ )
66	{
67		measurementSRVPrintTypeRequest( hMeasurementSRV, &(pMsrRequest->msrTypes[ i ]));
68	}
69#endif /* TI_DBG */
70
71}
72
73/**
74 * \author Ronen Kalish\n
75 * \date 23-December-2005\n
76 * \brief Prints a measurement type request.\n
77 *
78 * Function Scope \e Public.\n
79 * \param hMeasurementSRV - handle to the measurement SRV object.\n
80 * \param pMsrTypeRequest - the measurement type request.\n
81 */
82void measurementSRVPrintTypeRequest( TI_HANDLE hMeasurementSRV, TMeasurementTypeRequest* pMsrTypeRequest )
83{
84#ifdef TI_DBG
85	measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
86
87TRACE4( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "Measurement type request: type: %d, duration:%d, scan mode: %d, reserved: %d", pMsrTypeRequest->msrType, pMsrTypeRequest->duration, pMsrTypeRequest->scanMode, pMsrTypeRequest->reserved);
88
89#endif /* TI_DBG */
90}
91
92