• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2023 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package casimircontrolserver;
18
19import "google/protobuf/empty.proto";
20
21service CasimirControlService {
22  rpc SendApdu (SendApduRequest) returns (SendApduReply) {}
23  rpc PollA (Void) returns (SenderId) {}
24  rpc SetRadioState(RadioState) returns (Void) {}
25  rpc SetPowerLevel(PowerLevel) returns (Void) {}
26  rpc SendBroadcast (SendBroadcastRequest) returns (SendBroadcastResponse) {}
27  rpc Init(Void) returns (Void) {}
28  rpc Close(Void) returns (Void) {}
29}
30
31message SendApduRequest {
32  repeated string apdu_hex_strings = 1;
33  optional uint32 sender_id = 2;
34}
35
36message SendApduReply {
37  repeated string response_hex_strings = 1;
38}
39
40message SenderId {
41  uint32 sender_id = 1;
42}
43
44message Void {
45}
46
47message RadioState {
48  bool radio_on = 1;
49}
50
51message PowerLevel {
52  uint32 power_level = 1;
53}
54
55message TransceiveConfiguration {
56    // A, B, F, V
57    optional string type = 1;
58    optional bool crc = 2;
59    // 0 to 8
60    optional uint32 bits = 3;
61    // 106, 212, 424, 848, 53, 26
62    optional uint32 bitrate = 4;
63    // value in microseconds
64    optional uint32 timeout = 5;
65    // 0 to 100
66    optional double power = 6;
67}
68
69message SendBroadcastRequest {
70    string data = 1;
71    optional TransceiveConfiguration configuration = 2;
72}
73
74message SendBroadcastResponse {
75}
76