fix:调整proto
This commit is contained in:
parent
05fb0689c9
commit
4aeda1bfdf
@ -19,14 +19,10 @@ export 'ble_message.pbenum.dart';
|
|||||||
|
|
||||||
class BleReq extends $pb.GeneratedMessage {
|
class BleReq extends $pb.GeneratedMessage {
|
||||||
factory BleReq({
|
factory BleReq({
|
||||||
$core.int? iD,
|
|
||||||
$core.String? bluetoothDeviceName,
|
$core.String? bluetoothDeviceName,
|
||||||
$core.List<$core.int>? structData,
|
$core.List<$core.int>? structData,
|
||||||
}) {
|
}) {
|
||||||
final $result = create();
|
final $result = create();
|
||||||
if (iD != null) {
|
|
||||||
$result.iD = iD;
|
|
||||||
}
|
|
||||||
if (bluetoothDeviceName != null) {
|
if (bluetoothDeviceName != null) {
|
||||||
$result.bluetoothDeviceName = bluetoothDeviceName;
|
$result.bluetoothDeviceName = bluetoothDeviceName;
|
||||||
}
|
}
|
||||||
@ -40,7 +36,6 @@ class BleReq extends $pb.GeneratedMessage {
|
|||||||
factory BleReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
factory BleReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||||
|
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BleReq', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BleReq', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||||
..a<$core.int>(1, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
|
||||||
..aOS(2, _omitFieldNames ? '' : 'bluetoothDeviceName', protoName: 'bluetoothDeviceName')
|
..aOS(2, _omitFieldNames ? '' : 'bluetoothDeviceName', protoName: 'bluetoothDeviceName')
|
||||||
..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
|
..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
|
||||||
..hasRequiredFields = false
|
..hasRequiredFields = false
|
||||||
@ -67,33 +62,23 @@ class BleReq extends $pb.GeneratedMessage {
|
|||||||
static BleReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BleReq>(create);
|
static BleReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BleReq>(create);
|
||||||
static BleReq? _defaultInstance;
|
static BleReq? _defaultInstance;
|
||||||
|
|
||||||
/// 自增ID,用于匹配请求和响应
|
|
||||||
@$pb.TagNumber(1)
|
|
||||||
$core.int get iD => $_getIZ(0);
|
|
||||||
@$pb.TagNumber(1)
|
|
||||||
set iD($core.int v) { $_setUnsignedInt32(0, v); }
|
|
||||||
@$pb.TagNumber(1)
|
|
||||||
$core.bool hasID() => $_has(0);
|
|
||||||
@$pb.TagNumber(1)
|
|
||||||
void clearID() => clearField(1);
|
|
||||||
|
|
||||||
/// 用唯一的设备名来进行匹配而不是mac地址
|
/// 用唯一的设备名来进行匹配而不是mac地址
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
$core.String get bluetoothDeviceName => $_getSZ(1);
|
$core.String get bluetoothDeviceName => $_getSZ(0);
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
set bluetoothDeviceName($core.String v) { $_setString(1, v); }
|
set bluetoothDeviceName($core.String v) { $_setString(0, v); }
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
$core.bool hasBluetoothDeviceName() => $_has(1);
|
$core.bool hasBluetoothDeviceName() => $_has(0);
|
||||||
@$pb.TagNumber(2)
|
@$pb.TagNumber(2)
|
||||||
void clearBluetoothDeviceName() => clearField(2);
|
void clearBluetoothDeviceName() => clearField(2);
|
||||||
|
|
||||||
/// 下面是蓝牙结构内容,未加密状态
|
/// 下面是蓝牙结构内容,未加密状态
|
||||||
@$pb.TagNumber(3)
|
@$pb.TagNumber(3)
|
||||||
$core.List<$core.int> get structData => $_getN(2);
|
$core.List<$core.int> get structData => $_getN(1);
|
||||||
@$pb.TagNumber(3)
|
@$pb.TagNumber(3)
|
||||||
set structData($core.List<$core.int> v) { $_setBytes(2, v); }
|
set structData($core.List<$core.int> v) { $_setBytes(1, v); }
|
||||||
@$pb.TagNumber(3)
|
@$pb.TagNumber(3)
|
||||||
$core.bool hasStructData() => $_has(2);
|
$core.bool hasStructData() => $_has(1);
|
||||||
@$pb.TagNumber(3)
|
@$pb.TagNumber(3)
|
||||||
void clearStructData() => clearField(3);
|
void clearStructData() => clearField(3);
|
||||||
}
|
}
|
||||||
@ -101,16 +86,12 @@ class BleReq extends $pb.GeneratedMessage {
|
|||||||
class BleResp extends $pb.GeneratedMessage {
|
class BleResp extends $pb.GeneratedMessage {
|
||||||
factory BleResp({
|
factory BleResp({
|
||||||
BleResp_StatusE? status,
|
BleResp_StatusE? status,
|
||||||
$core.int? iD,
|
|
||||||
$core.List<$core.int>? structData,
|
$core.List<$core.int>? structData,
|
||||||
}) {
|
}) {
|
||||||
final $result = create();
|
final $result = create();
|
||||||
if (status != null) {
|
if (status != null) {
|
||||||
$result.status = status;
|
$result.status = status;
|
||||||
}
|
}
|
||||||
if (iD != null) {
|
|
||||||
$result.iD = iD;
|
|
||||||
}
|
|
||||||
if (structData != null) {
|
if (structData != null) {
|
||||||
$result.structData = structData;
|
$result.structData = structData;
|
||||||
}
|
}
|
||||||
@ -122,7 +103,6 @@ class BleResp extends $pb.GeneratedMessage {
|
|||||||
|
|
||||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BleResp', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'BleResp', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||||
..e<BleResp_StatusE>(1, _omitFieldNames ? '' : 'Status', $pb.PbFieldType.OE, protoName: 'Status', defaultOrMaker: BleResp_StatusE.SUCCESS, valueOf: BleResp_StatusE.valueOf, enumValues: BleResp_StatusE.values)
|
..e<BleResp_StatusE>(1, _omitFieldNames ? '' : 'Status', $pb.PbFieldType.OE, protoName: 'Status', defaultOrMaker: BleResp_StatusE.SUCCESS, valueOf: BleResp_StatusE.valueOf, enumValues: BleResp_StatusE.values)
|
||||||
..a<$core.int>(2, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
|
||||||
..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
|
..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
|
||||||
..hasRequiredFields = false
|
..hasRequiredFields = false
|
||||||
;
|
;
|
||||||
@ -158,23 +138,13 @@ class BleResp extends $pb.GeneratedMessage {
|
|||||||
@$pb.TagNumber(1)
|
@$pb.TagNumber(1)
|
||||||
void clearStatus() => clearField(1);
|
void clearStatus() => clearField(1);
|
||||||
|
|
||||||
/// 自增ID,需要返回请求里面的ID
|
|
||||||
@$pb.TagNumber(2)
|
|
||||||
$core.int get iD => $_getIZ(1);
|
|
||||||
@$pb.TagNumber(2)
|
|
||||||
set iD($core.int v) { $_setUnsignedInt32(1, v); }
|
|
||||||
@$pb.TagNumber(2)
|
|
||||||
$core.bool hasID() => $_has(1);
|
|
||||||
@$pb.TagNumber(2)
|
|
||||||
void clearID() => clearField(2);
|
|
||||||
|
|
||||||
/// 下面是蓝牙结构内容,未加密状态
|
/// 下面是蓝牙结构内容,未加密状态
|
||||||
@$pb.TagNumber(4)
|
@$pb.TagNumber(4)
|
||||||
$core.List<$core.int> get structData => $_getN(2);
|
$core.List<$core.int> get structData => $_getN(1);
|
||||||
@$pb.TagNumber(4)
|
@$pb.TagNumber(4)
|
||||||
set structData($core.List<$core.int> v) { $_setBytes(2, v); }
|
set structData($core.List<$core.int> v) { $_setBytes(1, v); }
|
||||||
@$pb.TagNumber(4)
|
@$pb.TagNumber(4)
|
||||||
$core.bool hasStructData() => $_has(2);
|
$core.bool hasStructData() => $_has(1);
|
||||||
@$pb.TagNumber(4)
|
@$pb.TagNumber(4)
|
||||||
void clearStructData() => clearField(4);
|
void clearStructData() => clearField(4);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import 'dart:typed_data' as $typed_data;
|
|||||||
const BleReq$json = {
|
const BleReq$json = {
|
||||||
'1': 'BleReq',
|
'1': 'BleReq',
|
||||||
'2': [
|
'2': [
|
||||||
{'1': 'ID', '3': 1, '4': 1, '5': 13, '10': 'ID'},
|
|
||||||
{'1': 'bluetoothDeviceName', '3': 2, '4': 1, '5': 9, '10': 'bluetoothDeviceName'},
|
{'1': 'bluetoothDeviceName', '3': 2, '4': 1, '5': 9, '10': 'bluetoothDeviceName'},
|
||||||
{'1': 'StructData', '3': 3, '4': 1, '5': 12, '10': 'StructData'},
|
{'1': 'StructData', '3': 3, '4': 1, '5': 12, '10': 'StructData'},
|
||||||
],
|
],
|
||||||
@ -25,15 +24,14 @@ const BleReq$json = {
|
|||||||
|
|
||||||
/// Descriptor for `BleReq`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `BleReq`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List bleReqDescriptor = $convert.base64Decode(
|
final $typed_data.Uint8List bleReqDescriptor = $convert.base64Decode(
|
||||||
'CgZCbGVSZXESDgoCSUQYASABKA1SAklEEjAKE2JsdWV0b290aERldmljZU5hbWUYAiABKAlSE2'
|
'CgZCbGVSZXESMAoTYmx1ZXRvb3RoRGV2aWNlTmFtZRgCIAEoCVITYmx1ZXRvb3RoRGV2aWNlTm'
|
||||||
'JsdWV0b290aERldmljZU5hbWUSHgoKU3RydWN0RGF0YRgDIAEoDFIKU3RydWN0RGF0YQ==');
|
'FtZRIeCgpTdHJ1Y3REYXRhGAMgASgMUgpTdHJ1Y3REYXRh');
|
||||||
|
|
||||||
@$core.Deprecated('Use bleRespDescriptor instead')
|
@$core.Deprecated('Use bleRespDescriptor instead')
|
||||||
const BleResp$json = {
|
const BleResp$json = {
|
||||||
'1': 'BleResp',
|
'1': 'BleResp',
|
||||||
'2': [
|
'2': [
|
||||||
{'1': 'Status', '3': 1, '4': 1, '5': 14, '6': '.main.BleResp.StatusE', '10': 'Status'},
|
{'1': 'Status', '3': 1, '4': 1, '5': 14, '6': '.main.BleResp.StatusE', '10': 'Status'},
|
||||||
{'1': 'ID', '3': 2, '4': 1, '5': 13, '10': 'ID'},
|
|
||||||
{'1': 'StructData', '3': 4, '4': 1, '5': 12, '10': 'StructData'},
|
{'1': 'StructData', '3': 4, '4': 1, '5': 12, '10': 'StructData'},
|
||||||
],
|
],
|
||||||
'4': [BleResp_StatusE$json],
|
'4': [BleResp_StatusE$json],
|
||||||
@ -55,7 +53,7 @@ const BleResp_StatusE$json = {
|
|||||||
/// Descriptor for `BleResp`. Decode as a `google.protobuf.DescriptorProto`.
|
/// Descriptor for `BleResp`. Decode as a `google.protobuf.DescriptorProto`.
|
||||||
final $typed_data.Uint8List bleRespDescriptor = $convert.base64Decode(
|
final $typed_data.Uint8List bleRespDescriptor = $convert.base64Decode(
|
||||||
'CgdCbGVSZXNwEi0KBlN0YXR1cxgBIAEoDjIVLm1haW4uQmxlUmVzcC5TdGF0dXNFUgZTdGF0dX'
|
'CgdCbGVSZXNwEi0KBlN0YXR1cxgBIAEoDjIVLm1haW4uQmxlUmVzcC5TdGF0dXNFUgZTdGF0dX'
|
||||||
'MSDgoCSUQYAiABKA1SAklEEh4KClN0cnVjdERhdGEYBCABKAxSClN0cnVjdERhdGEiYQoHU3Rh'
|
'MSHgoKU3RydWN0RGF0YRgEIAEoDFIKU3RydWN0RGF0YSJhCgdTdGF0dXNFEgsKB1NVQ0NFU1MQ'
|
||||||
'dHVzRRILCgdTVUNDRVNTEAASCAoERkFJTBABEg0KCU5PVF9GT1VORBACEhIKDkNBTk5PVF9DT0'
|
'ABIICgRGQUlMEAESDQoJTk9UX0ZPVU5EEAISEgoOQ0FOTk9UX0NPTk5FQ1QQAxIPCgtDQU5OT1'
|
||||||
'5ORUNUEAMSDwoLQ0FOTk9UX1NFTkQQBBILCgdUSU1FT1VUEAU=');
|
'RfU0VORBAEEgsKB1RJTUVPVVQQBQ==');
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user