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 } 36 37 // The state of this feature at the system level. 38 enum State { 39 STATE_UNDEFINED = 0; 40 DISABLED = 1; 41 ENABLED = 2; 42 } 43 44 // The test step for the nanoapp to take. 45 enum Step { 46 STEP_UNDEFINED = 0; 47 // Sets up the nanoapp for an upcoming START test step (e.g. perform a WiFi 48 // scan for a WiFi RTT test). 49 SETUP = 1; 50 // Begin the test (after optionally receiving a SETUP test step). 51 START = 2; 52 } 53 54 // The feature to test. 55 optional Feature feature = 1; 56 57 // The feature state (e.g. enabled or disabled), only used if the test step is 58 // START. 59 optional State state = 2 [default = ENABLED]; 60 61 // The test step. 62 optional Step step = 3 [default = START]; 63} 64 65// A message used to provide the test result. 66message TestResult { 67 enum Code { 68 PASSED = 0; 69 FAILED = 1; 70 } 71 72 optional Code code = 1 [default = FAILED]; 73 optional bytes errorMessage = 2; 74} 75