1syntax = "proto2";
2
3package android.automotive.computepipe.proto;
4
5enum RemoteGraphStatusCode {
6    SUCCESS = 0;
7    INTERNAL_ERROR = 1;
8    INVALID_ARGUMENT = 2;
9    ILLEGAL_STATE = 3;
10    NO_MEMORY = 4;
11    FATAL_ERROR = 5;
12}
13
14message StatusResponse {
15    optional RemoteGraphStatusCode code = 1;
16    optional string message = 2;
17}
18
19message GraphOptionsRequest {}
20
21message GraphOptionsResponse {
22    optional string serialized_options = 1;
23}
24
25message SetGraphConfigRequest {
26    optional string serialized_config = 1;
27}
28
29message OutputStreamMetadata {
30    optional int32 stream_id = 1;
31}
32
33message ObserveOutputStreamRequest {
34    optional int32 stream_id = 1;
35}
36
37enum PixelFormat {
38    RGB = 0;
39    RGBA = 1;
40    GRAY = 2;
41}
42
43message PixelData {
44    optional int32 width = 1;
45    optional int32 height = 2;
46    optional int32 step = 3;
47    optional PixelFormat format = 4;
48    optional bytes data = 5;
49}
50
51message OutputStreamResponse {
52    oneof data {
53        string semantic_data = 1;
54        PixelData pixel_data = 2;
55    }
56    optional int32 stream_id = 3;
57    optional int64 timestamp_us = 4;
58}
59
60message SetDebugRequest {
61    optional bool enabled = 1;
62}
63
64message ProfilingDataRequest {}
65
66message ProfilingDataResponse {
67    optional string data = 1;
68}
69
70message StartGraphExecutionRequest {}
71
72message StopGraphExecutionRequest {
73    optional bool stop_immediate = 1;
74}
75
76message StartGraphProfilingRequest {}
77
78message StopGraphProfilingRequest {}
79
80message ResetGraphRequest {}
81
82service GrpcGraphService {
83    rpc GetGraphOptions(GraphOptionsRequest) returns (GraphOptionsResponse) {}
84
85    rpc SetGraphConfig(SetGraphConfigRequest) returns (StatusResponse) {}
86
87    rpc SetDebugOption(SetDebugRequest) returns (StatusResponse) {}
88
89    rpc StartGraphExecution(StartGraphExecutionRequest) returns (StatusResponse) {}
90
91    rpc ObserveOutputStream(ObserveOutputStreamRequest) returns (stream OutputStreamResponse) {}
92
93    rpc StopGraphExecution(StopGraphExecutionRequest) returns (StatusResponse) {}
94
95    rpc ResetGraph(ResetGraphRequest) returns (StatusResponse) {}
96
97    rpc StartGraphProfiling(StartGraphProfilingRequest) returns (StatusResponse) {}
98
99    rpc StopGraphProfiling(StopGraphProfilingRequest) returns (StatusResponse) {}
100
101    rpc GetProfilingData(ProfilingDataRequest) returns (ProfilingDataResponse) {}
102}
103