0
|
1 |
/*
|
|
2 |
* measurementSrvDbgPrint.c
|
|
3 |
*
|
|
4 |
* Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved.
|
|
5 |
* All rights reserved.
|
|
6 |
*
|
|
7 |
* This program and the accompanying materials are made available under the
|
|
8 |
* terms of the Eclipse Public License v1.0 or BSD License which accompanies
|
|
9 |
* this distribution. The Eclipse Public License is available at
|
|
10 |
* http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below.
|
|
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 |
/** \file measurementSrvDbgPrint.c
|
|
40 |
* \brief This file include variuos measurement SRV debug print facilities
|
|
41 |
* \author Ronen Kalish
|
|
42 |
* \date 23-December-2005
|
|
43 |
*/
|
|
44 |
|
|
45 |
#define __FILE_ID__ FILE_ID_111
|
|
46 |
#include "report.h"
|
|
47 |
#include "TWDriver.h"
|
|
48 |
#include "MeasurementSrvSM.h"
|
|
49 |
#include "MeasurementSrv.h"
|
|
50 |
#include "measurementSrvDbgPrint.h"
|
|
51 |
|
|
52 |
|
|
53 |
/**
|
|
54 |
* \author Ronen Kalish\n
|
|
55 |
* \date 23-December-2005\n
|
|
56 |
* \brief Prints a measurement request.\n
|
|
57 |
*
|
|
58 |
* Function Scope \e Public.\n
|
|
59 |
* \param hMeasurementSRV - handle to the measurement SRV object.\n
|
|
60 |
* \param pMsrRequest - the measurement request.\n
|
|
61 |
*/
|
|
62 |
void measurementSRVPrintRequest( TI_HANDLE hMeasurementSRV, TMeasurementRequest *pMsrRequest )
|
|
63 |
{
|
|
64 |
#ifdef TI_DBG
|
|
65 |
measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
|
|
66 |
TI_INT32 i;
|
|
67 |
|
|
68 |
TRACE0( pMeasurementSRV->hReport, REPORT_SEVERITY_INFORMATION, "Measurement request:\n");
|
|
69 |
TRACE5( 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));
|
|
70 |
for ( i = 0; i < pMsrRequest->numberOfTypes; i++ )
|
|
71 |
{
|
|
72 |
measurementSRVPrintTypeRequest( hMeasurementSRV, &(pMsrRequest->msrTypes[ i ]));
|
|
73 |
}
|
|
74 |
#endif /* TI_DBG */
|
|
75 |
|
|
76 |
}
|
|
77 |
|
|
78 |
/**
|
|
79 |
* \author Ronen Kalish\n
|
|
80 |
* \date 23-December-2005\n
|
|
81 |
* \brief Prints a measurement type request.\n
|
|
82 |
*
|
|
83 |
* Function Scope \e Public.\n
|
|
84 |
* \param hMeasurementSRV - handle to the measurement SRV object.\n
|
|
85 |
* \param pMsrTypeRequest - the measurement type request.\n
|
|
86 |
*/
|
|
87 |
void measurementSRVPrintTypeRequest( TI_HANDLE hMeasurementSRV, TMeasurementTypeRequest* pMsrTypeRequest )
|
|
88 |
{
|
|
89 |
#ifdef TI_DBG
|
|
90 |
measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
|
|
91 |
|
|
92 |
TRACE4( 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);
|
|
93 |
|
|
94 |
#endif /* TI_DBG */
|
|
95 |
}
|
|
96 |
|