1syntax = "proto2"; 2 3package pts_chre; 4 5option java_package = "com.google.android.chre.pts.app"; 6option java_outer_classname = "PtsChreMessages"; 7 8// The message types used in PTS test nanoapps. Some of them are H2C 9// (Host-To-CHRE) and others are C2H (CHRE-To-Host). One message type must be 10// either H2C or C2H. Each message type can choose to have payload or not. 11// Payload can be added to a message type with no payload initially. But once 12// one message type has payload, the payload message should not be changed. 13enum MessageType { 14 // 0 is reserved to avoid misinterpret corrupted data. 15 UNDEFINED = 0; 16 17 // H2C: Tells the nanoapp to begin the test. No payload. 18 PTS_TEST_START = 1; 19 20 // C2H: TestResult message payload. 21 PTS_TEST_RESULT = 2; 22} 23 24// A message sent by the nanoapp to indicate the result of a test, optionally 25// containing an error message. 26message TestResult { 27 enum Code { 28 TEST_PASSED = 0; 29 30 TEST_FAILED = 1; 31 } 32 33 optional Code code = 1 [default = TEST_FAILED]; 34 optional bytes errorMessage = 2; 35} 36