• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3.4
2#
3#   Copyright 2017 - Google
4#
5#   Licensed under the Apache License, Version 2.0 (the "License");
6#   you may not use this file except in compliance with the License.
7#   You may obtain a copy of the License at
8#
9#       http://www.apache.org/licenses/LICENSE-2.0
10#
11#   Unless required by applicable law or agreed to in writing, software
12#   distributed under the License is distributed on an "AS IS" BASIS,
13#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14#   See the License for the specific language governing permissions and
15#   limitations under the License.
16
17######################################################
18# Broadcast events
19######################################################
20BROADCAST_WIFI_RTT_AVAILABLE = "WifiRttAvailable"
21BROADCAST_WIFI_RTT_NOT_AVAILABLE = "WifiRttNotAvailable"
22
23######################################################
24# RangingResultCallback events
25######################################################
26EVENT_CB_RANGING_ON_FAIL = "WifiRttRangingFailure"
27EVENT_CB_RANGING_ON_RESULT = "WifiRttRangingResults"
28
29EVENT_CB_RANGING_KEY_RESULTS = "Results"
30
31EVENT_CB_RANGING_KEY_STATUS = "status"
32EVENT_CB_RANGING_KEY_DISTANCE_MM = "distanceMm"
33EVENT_CB_RANGING_KEY_DISTANCE_STD_DEV_MM = "distanceStdDevMm"
34EVENT_CB_RANGING_KEY_RSSI = "rssi"
35EVENT_CB_RANGING_KEY_NUM_ATTEMPTED_MEASUREMENTS = "numAttemptedMeasurements"
36EVENT_CB_RANGING_KEY_NUM_SUCCESSFUL_MEASUREMENTS = "numSuccessfulMeasurements"
37EVENT_CB_RANGING_KEY_LCI = "lci"
38EVENT_CB_RANGING_KEY_LCR = "lcr"
39EVENT_CB_RANGING_KEY_TIMESTAMP = "timestamp"
40EVENT_CB_RANGING_KEY_MAC = "mac"
41EVENT_CB_RANGING_KEY_PEER_ID = "peerId"
42EVENT_CB_RANGING_KEY_MAC_AS_STRING = "macAsString"
43
44EVENT_CB_RANGING_STATUS_SUCCESS = 0
45EVENT_CB_RANGING_STATUS_FAIL = 1
46EVENT_CB_RANGING_STATUS_RESPONDER_DOES_NOT_SUPPORT_IEEE80211MC = 2
47
48######################################################
49# status codes
50######################################################
51
52RANGING_FAIL_CODE_GENERIC = 1
53RANGING_FAIL_CODE_RTT_NOT_AVAILABLE = 2
54
55######################################################
56# ScanResults keys
57######################################################
58
59SCAN_RESULT_KEY_RTT_RESPONDER = "is80211McRTTResponder"
60
61######################################################
62# Capabilities keys
63######################################################
64
65CAP_RTT_ONE_SIDED_SUPPORTED = "rttOneSidedSupported"
66CAP_FTM_SUPPORTED = "rttFtmSupported"
67CAP_LCI_SUPPORTED = "lciSupported"
68CAP_LCR_SUPPORTED = "lcrSupported"
69CAP_RESPONDER_SUPPORTED = "responderSupported"
70CAP_MC_VERSION = "mcVersion"
71