app-starlock/lib/talk/startChart/proto/ble_message.proto

33 lines
796 B
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package main;
option go_package = "./spb";
// 用于蓝牙透传的数据结构
message BleReq {
// 自增ID用于匹配请求和响应
uint32 ID = 1;
// 用唯一的设备名来进行匹配而不是mac地址
string bluetoothDeviceName = 2;
// 下面是蓝牙结构内容,未加密状态
bytes StructData = 3;
}
message BleResp {
// 定义一个枚举状态【成功,失败,找不到设备,无法建立连接,无法发送数据,超时】
enum StatusE {
SUCCESS = 0;
FAIL = 1;
NOT_FOUND = 2;
CANNOT_CONNECT = 3;
CANNOT_SEND = 4;
TIMEOUT = 5;
}
// 状态
StatusE Status = 1;
// 自增ID需要返回请求里面的ID
uint32 ID = 2;
// 下面是蓝牙结构内容,未加密状态
bytes StructData = 4;
}