|
1 /* |
|
2 * Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of ScanInfo inline methods. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "hssscanoffsets.h" |
|
21 |
|
22 // --------------------------------------------------------------------------- |
|
23 // |
|
24 // --------------------------------------------------------------------------- |
|
25 // |
|
26 inline TUint8 HssScanInfo::SignalNoiseRatio() const |
|
27 { |
|
28 return *( current_m + RX_SNR_OFFSET ); |
|
29 } |
|
30 |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 // --------------------------------------------------------------------------- |
|
34 // |
|
35 inline TUint8 HssScanInfo::RXLevel() const |
|
36 { |
|
37 return *( current_m + RX_LEVEL_OFFSET ); |
|
38 } |
|
39 |
|
40 // --------------------------------------------------------------------------- |
|
41 // |
|
42 // --------------------------------------------------------------------------- |
|
43 // |
|
44 inline void HssScanInfo::BSSID( TUint8 bssid[BSSID_LENGTH] ) const |
|
45 { |
|
46 TUint8* dst = bssid; |
|
47 const TUint8* src = current_m + BSSID_OFFSET; |
|
48 const TUint8* end = src + BSSID_LENGTH; |
|
49 |
|
50 for ( ; src < end; ++dst, ++src ) |
|
51 { |
|
52 *dst = *src; |
|
53 } |
|
54 } |
|
55 |
|
56 // --------------------------------------------------------------------------- |
|
57 // |
|
58 // --------------------------------------------------------------------------- |
|
59 // |
|
60 inline TUint16 HssScanInfo::BeaconInterval() const |
|
61 { |
|
62 return *( reinterpret_cast<const TUint16*>( current_m + BEACON_INTERVAL_OFFSET ) ); |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------------------------- |
|
66 // |
|
67 // --------------------------------------------------------------------------- |
|
68 // |
|
69 inline TUint16 HssScanInfo::Capability() const |
|
70 { |
|
71 return *( reinterpret_cast<const TUint16*>( current_m + CAPABILITY_OFFSET ) ); |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 inline TBool HssScanInfo::Privacy() const |
|
79 { |
|
80 if ( Capability() & SCAN_CAPABILITY_BIT_MASK_PRIVACY ) |
|
81 { |
|
82 return 1; |
|
83 } |
|
84 |
|
85 return 0; |
|
86 } |
|
87 |
|
88 // --------------------------------------------------------------------------- |
|
89 // |
|
90 // --------------------------------------------------------------------------- |
|
91 // |
|
92 inline void HssScanInfo::Timestamp( TUint8 timestamp[TIMESTAMP_LENGTH] ) const |
|
93 { |
|
94 TUint8* dst = timestamp; |
|
95 const TUint8* src = current_m + TIMESTAMP_OFFSET; |
|
96 const TUint8* end = src + TIMESTAMP_LENGTH; |
|
97 |
|
98 for ( ; src < end; ++dst, ++src ) |
|
99 { |
|
100 *dst = *src; |
|
101 } |
|
102 } |