• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #include "offload_hal_test_constants.h"
17 
18 namespace android {
19 namespace hardware {
20 namespace wifi {
21 namespace offload {
22 namespace V1_0 {
23 namespace implementation {
24 namespace offload_hal_test_constants {
25 
26 const uint8_t kSsid1[] = {'G', 'o', 'o', 'g', 'l', 'e'};
27 const size_t kSsid1_size = sizeof(kSsid1);
28 const uint8_t kSsid2[] = {'X', 'f', 'i', 'n', 'i', 't', 'y'};
29 const size_t kSsid2_size = sizeof(kSsid2);
30 const uint8_t kBssid[6] = {0x12, 0xef, 0xa1, 0x2c, 0x97, 0x8b};
31 const int16_t kRssi = -60;
32 const int16_t kRssiThreshold = -76;
33 const uint32_t kFrequency1 = 2412;
34 const uint32_t kFrequency2 = 2437;
35 const uint8_t kBssidSize = 6;
36 const uint64_t kTsf = 0;
37 const uint16_t kCapability = 0;
38 const uint8_t kNetworkFlags = 0;
39 const uint32_t kDisconnectedModeScanIntervalMs = 5000;
40 const uint64_t kSubscriptionDurationMs = 10000;
41 const uint64_t kScanDurationMs[2] = {2000, 500};
42 const uint32_t kNumChannelsScanned[] = {1, 2};
43 const uint8_t kChannelNotScanned = 0;
44 const uint32_t kDefaultNumScansRequestedByWifi = 2;
45 const uint32_t kDefaultNumScansServicedByWifi = 2;
46 const uint64_t kScanDurationTotalMs = 2000;
47 const uint32_t kNumChannelsTotalScanned = 3;
48 const uint32_t kNumChannelsInHistogram = 256;
49 const uint8_t kTestChannels[] = {1, 6, 11};
50 const uint32_t kNumTimesChannelScanned[] = {1, 1, 255};
51 const uint32_t kSystemStartTime = 32164;
52 const uint32_t kIncrementBetweenEvents = 10;
53 const size_t kRecordLength = 8;
54 const size_t kInvalidRecordLength = 4;
55 
56 const wifi_offload::RpcLogRecord::RpcLogRecordType kChreRecordTypeList[] = {
57     wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_INIT,
58     wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_CONFIG_SCANS,
59     wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_SUBSCRIBE_SCAN_RESULTS,
60     wifi_offload::RpcLogRecord::RpcLogRecordType::REQ_SCAN,
61     wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_RECVD_SCAN_RESULT,
62     wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_SENT_SCAN_RESULT,
63     wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_UNSUBSCRIBE_SCAN_RESULTS,
64     wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_GET_SCAN_STATS,
65 };
66 
67 const wifi_offload::RpcLogRecord::RpcLogRecordType kInvalidChreRecordTypeLog[] = {
68     wifi_offload::RpcLogRecord::RpcLogRecordType::CMD_LAST_ITEM,
69     wifi_offload::RpcLogRecord::RpcLogRecordType::REQ_LAST_ITEM,
70     wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_RECVD_LAST_ITEM,
71     wifi_offload::RpcLogRecord::RpcLogRecordType::EVENT_SENT_LAST_ITEM,
72 };
73 
74 const android::hardware::wifi::offload::V1_0::RecordName kHidlRecordNameList[] = {
75     android::hardware::wifi::offload::V1_0::RecordName::CMD_INT,
76     android::hardware::wifi::offload::V1_0::RecordName::CMD_CONFIG_SCANS,
77     android::hardware::wifi::offload::V1_0::RecordName::CMD_SUBSCRIBE_SCAN_RESULTS,
78     android::hardware::wifi::offload::V1_0::RecordName::REQ_SCAN,
79     android::hardware::wifi::offload::V1_0::RecordName::EVENT_RECVD_SCAN_RESULT,
80     android::hardware::wifi::offload::V1_0::RecordName::EVENT_SENT_SCAN_RESULT,
81     android::hardware::wifi::offload::V1_0::RecordName::CMD_UNSUBSCRIBE_SCAN_RESULTS,
82     android::hardware::wifi::offload::V1_0::RecordName::CMD_GET_SCAN_STATS,
83 };
84 
85 }  // namespace offload_hal_test_constants
86 }  // namespace implementation
87 }  // namespace V1_0
88 }  // namespace offload
89 }  // namespace wifi
90 }  // namespace hardware
91 }  // namespace android
92