first commit

This commit is contained in:
闫守旺
2021-06-10 18:06:02 +08:00
commit f138b8e11e
107 changed files with 2859 additions and 0 deletions

34
proto/message.proto Normal file
View File

@ -0,0 +1,34 @@
syntax = "proto3";
message Message {
MessageCategory category = 1;
oneof value {
BluetoothManagerState state = 2;
}
}
message Discovery {
Peripheral peripheral = 1;
sint32 rssi = 2;
map<uint32, bytes> advertisements = 3;
}
message Peripheral {
bytes address = 1;
}
enum MessageCategory {
BLUETOOTH_MANAGER_STATE = 0;
CENTRAL_MANAGER_START_DISCOVERY = 1;
CENTRAL_MANAGER_STOP_DISCOVERY = 2;
CENTRAL_MANAGER_DISCOVERED = 3;
}
enum BluetoothManagerState {
UNKNOWN = 0;
RESETTING = 1;
UNSUPPORTED = 2;
UNAUTHORIZED = 3;
POWERED_OFF = 4;
POWERED_ON = 5;
}