blob: b5db7e3fbff11c6ee9970b381d74e3f7ee3a0eb8 [file] [log] [blame]
// Copyright 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto2";
package android.vts;
// Type of a command.
enum VtsDriverCommandType {
UNKNOWN_VTS_DRIVER_COMMAND_TYPE = 0;
// To request to exit a driver.
EXIT = 1;
// To get the status of a driver.
GET_STATUS = 2;
// for a HAL driver
// To request to load a HAL.
LOAD_HAL = 101;
// To get a list of available functions.
LIST_FUNCTIONS = 102;
// To call a function.
CALL_FUNCTION = 103;
// To get the value of an attribute.
GET_ATTRIBUTE = 104;
// To read the specification message of a component.
VTS_DRIVER_COMMAND_READ_SPECIFICATION = 105;
// for a shell driver
// To execute a shell command.
EXECUTE_COMMAND = 201;
// To invoke a system call.
INVOKE_SYSCALL = 202;
}
// Type of a response.
enum VtsDriverResponseCode {
UNKNOWN_VTS_DRIVER_RESPONSE_CODE = 0;
// successful
VTS_DRIVER_RESPONSE_SUCCESS = 1;
// failed
VTS_DRIVER_RESPONSE_FAIL = 2;
}
// To specify a command.
message VtsDriverControlCommandMessage {
// Command type.
optional VtsDriverCommandType command_type = 1;
// for EXIT
// none
// for GET_STATUS
optional int32 status_type = 1101;
// for LOAD_HAL
// The name of a target.
optional bytes file_path = 1201;
// target class
optional int32 target_class = 1202;
// target type
optional int32 target_type = 1203;
// target version (should be divided by 100) - float has a compatibility issue
// between C/C++ and python protoc.
optional float target_version = 1204;
// the name of a HAL module to open.
optional bytes module_name = 1205;
// for LIST_FUNCTIONS
// none
// for CALL_FUNCTION
optional bytes arg = 1401;
// for EXECUTE_COMMAND
repeated bytes shell_command = 2001;
}
// To specify a response.
message VtsDriverControlResponseMessage {
// Response type.
optional VtsDriverResponseCode response_code = 1;
// Return value.
optional int32 return_value = 11;
// Return message.
optional bytes return_message = 12;
// The stdout message for each command
repeated bytes stdout = 1001;
// The stderr message for each command
repeated bytes stderr = 1002;
// The exit code for each command
repeated int32 exit_code = 1003;
// The retrieved specifications.
repeated bytes spec = 2001;
}