xref: /aosp_15_r20/system/chre/apps/test/common/proto/chre_cross_validation_wifi.proto (revision 84e339476a462649f82315436d70fd732297a399)
1syntax = "proto2";
2
3package chre_cross_validation_wifi;
4
5option java_package = "com.google.android.chre.nanoapp.proto";
6option java_outer_classname = "ChreCrossValidationWifi";
7
8enum MessageType {
9  // Reserved for corrupted messages
10  UNDEFINED = 0;
11
12  // H2C: Host informing nanoapp to start a new step
13  // Payload must be StepStartCommand Message
14  STEP_START = 1;
15
16  // C2H: Nanoapp informing host on the result of a step
17  // Payload must be chre_test_common::TestResult message.
18  // This will also include the final validation result if this is the step
19  // result for the VALIDATE step.
20  STEP_RESULT = 2;
21
22  // H2C: Host passing down wifi scan result data to CHRE to validate.
23  // There may be multiple messages with this type sent.
24  SCAN_RESULT = 3;
25
26  // C2H: Nanoapp informing host about the wifi capabilities it has.
27  // The payload must be a WifiCapabilities message.
28  WIFI_CAPABILITIES = 4;
29}
30
31enum Step {
32  // The initial step where no action is performed.
33  INIT = 0;
34  // The step where the nanoapp is configured to monitor for wifi scans and the
35  // scan results threshold message is sent.
36  SETUP = 1;
37  // The validate step where the data is gathered and compared.
38  VALIDATE = 2;
39  // The step where the wifi capabilities are gathered from the nanoapp.
40  CAPABILITIES = 3;
41}
42
43message StepStartCommand {
44  optional Step step = 1;
45  // The maxinum number of WiFi scans that can be delivered to CHRE, which
46  // will be used to limit the cross-validation check. This value is only
47  // valid if the step value is SETUP.
48  optional int32 chreScanCapacity = 2;
49}
50
51/*
52 * The fields that are common between the AP framework ScanResult object @
53 * //frameworks/base/wifi/java/android/net/wifi/ScanResult.java
54 * and the chreWifiScanResult in the WiFi CHRE API @
55 * //system/chre/chre_api/include/chre_api/chre/wifi.h
56 */
57message WifiScanResult {
58  // The name of the access point
59  optional string ssid = 1;
60  // The mac address of the access point
61  optional bytes bssid = 2;
62  // The total number of results that will be sent from AP.
63  optional uint32 totalNumResults = 3;
64  // The index of this result in relation to the entire set of results.
65  // [0 - totalNumResults)
66  optional uint32 resultIndex = 4;
67}
68
69/*
70 * The wifi capabilities listed in
71 * //system/chre/chre_api/include/chre_api/chre/wifi.h
72 */
73message WifiCapabilities {
74  optional uint32 wifiCapabilities = 1;
75}
76
77message UseScanResultsSizeThreshold {
78  optional bool useThreshold = 1;
79}
80