1syntax = "proto2";
2
3package chre_settings_test;
4
5option java_package = "com.google.android.chre.nanoapp.proto";
6option java_outer_classname = "ChreSettingsTest";
7
8// Nanoappp message type can be either host to chre (H2C) or chre to host (C2H)
9enum MessageType {
10  // Reserved for corrupted messages
11  UNDEFINED = 0;
12
13  // H2C: A message to start the test.
14  // Payload must be TestCommand.
15  TEST_COMMAND = 1;
16
17  // C2H: A message indicating the test result.
18  TEST_RESULT = 2;
19
20  // C2H: A message indicating a previously received SETUP step from a
21  // TEST_COMMAND message has completed. No payload.
22  TEST_SETUP_COMPLETE = 3;
23}
24
25// A message to start the test.
26message TestCommand {
27  enum Feature {
28    FEATURE_UNDEFINED = 0;
29    WIFI_SCANNING = 1;
30    WIFI_RTT = 2;
31    GNSS_LOCATION = 3;
32    GNSS_MEASUREMENT = 4;
33    WWAN_CELL_INFO = 5;
34    AUDIO = 6;
35    BLE_SCANNING = 7;
36  }
37
38  // The state of this feature at the system level.
39  enum State {
40    STATE_UNDEFINED = 0;
41    DISABLED = 1;
42    ENABLED = 2;
43  }
44
45  // The test step for the nanoapp to take.
46  enum Step {
47    STEP_UNDEFINED = 0;
48    // Sets up the nanoapp for an upcoming START test step (e.g. perform a WiFi
49    // scan for a WiFi RTT test).
50    SETUP = 1;
51    // Begin the test (after optionally receiving a SETUP test step).
52    START = 2;
53  }
54
55  // The feature to test.
56  optional Feature feature = 1;
57
58  // The feature state (e.g. enabled or disabled), only used if the test step is
59  // START.
60  optional State state = 2 [default = ENABLED];
61
62  // The test step.
63  optional Step step = 3 [default = START];
64}
65
66// A message used to provide the test result.
67message TestResult {
68  enum Code {
69    PASSED = 0;
70    FAILED = 1;
71  }
72
73  optional Code code = 1 [default = FAILED];
74  optional bytes errorMessage = 2;
75}
76