1syntax = "proto2"; 2 3package chre_stress_test; 4 5option java_package = "com.google.android.chre.nanoapp.proto"; 6option java_outer_classname = "ChreStressTest"; 7 8// Nanoapp 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/stop the test. 14 // Payload must be TestCommand. 15 TEST_COMMAND = 1; 16 17 // C2H: A message indicating the test result. The nanoapp will only use this 18 // message to report a failure. 19 // Payload must be chre_test_common.TestResult. 20 TEST_RESULT = 2; 21 22 // C2H: A message indicating that the stress test nanoapp has received a 23 // WiFi scan while enabling scan monitoring. This can be used for the host 24 // to verify that the scan monitoring feature is working. 25 // No payload. 26 TEST_WIFI_SCAN_MONITOR_TRIGGERED = 3; 27 28 // H2C: A message indicating that the host client has restarted. The nanoapp 29 // should use this message to update its host endpoint tracking when sending 30 // unicast messages. 31 // No payload. 32 TEST_HOST_RESTARTED = 4; 33 34 // H2C: Request Capabilities. 35 // No payload. 36 GET_CAPABILITIES = 5; 37 38 // C2H: Capabilities (response to a GET_CAPABILITIES request). 39 CAPABILITIES = 6; 40} 41 42// A message to start the test. 43message TestCommand { 44 enum Feature { 45 FEATURE_UNDEFINED = 0; 46 // WiFi stress testing, no scan monitoring. 47 WIFI_ON_DEMAND_SCAN = 1; 48 GNSS_LOCATION = 2; 49 GNSS_MEASUREMENT = 3; 50 WWAN = 4; 51 // Enables WiFi scan monitoring only. 52 WIFI_SCAN_MONITOR = 5; 53 } 54 55 // The feature to test. 56 optional Feature feature = 1; 57 58 // True to start the test, false to stop. 59 optional bool start = 2; 60} 61 62/* 63 * CHRE capabilities 64 */ 65message Capabilities { 66 // Wifi capabilities 67 // see //system/chre/chre_api/include/chre_api/chre/wifi.h 68 optional uint32 wifi = 1; 69} 70