• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto3";
18
19package android.hardware.automotive.remoteaccess;
20
21/**
22 * Service provided by a wakeup client running on TCU.
23 */
24service WakeupClient {
25    /**
26     * Establish a long-live connection to receive remote tasks.
27     *
28     * <p>For the server, whenever a remote task arrives, if the connection is
29     * alive, it will use the return stream to return a task's information.
30     *
31     * <p>If the connection is not alive, the server must stores the remote task
32     * until a new connection is established (which means AP is ready to
33     * receive remote task again) and send the stored tasks.
34     *
35     * <p>If the server closes the connection, the client will try to
36     * reestablish the connection.
37     */
38    rpc GetRemoteTasks(GetRemoteTasksRequest) returns (stream GetRemoteTasksResponse) {}
39
40    /**
41     * Notifies whether AP is required to be waken up when remote task arrives.
42     *
43     * <p>Wakeup client should store and use this state until a new call with a
44     * different state arrives.
45     *
46     * <p>If {@code isWakeupRequired} in the request is true, it must wake up AP
47     * when a remote task arrives.
48     *
49     * <p>If {@code isWakeupRequired} in the request is false, it must not try
50     * to wake up AP.
51     */
52    rpc NotifyWakeupRequired(NotifyWakeupRequiredRequest) returns (NotifyWakeupRequiredResponse) {}
53}
54
55message GetRemoteTasksRequest {}
56
57message GetRemoteTasksResponse {
58    string clientId = 1;
59    bytes data = 2;
60}
61
62message NotifyWakeupRequiredRequest {
63    bool isWakeupRequired = 1;
64}
65
66message NotifyWakeupRequiredResponse {}
67