Files
bluetooth_low_energy/proto/message.proto
2021-06-10 18:06:02 +08:00

34 lines
603 B
Protocol Buffer

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;
}