feat:增加protobuf提供的实体类转换
This commit is contained in:
parent
a51b1c5c7b
commit
2429a107e1
184
lib/talk/startChart/proto/ble_message.pb.dart
Normal file
184
lib/talk/startChart/proto/ble_message.pb.dart
Normal file
@ -0,0 +1,184 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: ble_message.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
import 'ble_message.pbenum.dart';
|
||||
|
||||
export 'ble_message.pbenum.dart';
|
||||
|
||||
class BleReq extends $pb.GeneratedMessage {
|
||||
factory BleReq({
|
||||
$core.int? iD,
|
||||
$core.String? bluetoothDeviceName,
|
||||
$core.List<$core.int>? structData,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (iD != null) {
|
||||
$result.iD = iD;
|
||||
}
|
||||
if (bluetoothDeviceName != null) {
|
||||
$result.bluetoothDeviceName = bluetoothDeviceName;
|
||||
}
|
||||
if (structData != null) {
|
||||
$result.structData = structData;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
BleReq._() : super();
|
||||
factory BleReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(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)
|
||||
..a<$core.int>(1, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
||||
..aOS(2, _omitFieldNames ? '' : 'bluetoothDeviceName', protoName: 'bluetoothDeviceName')
|
||||
..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
BleReq clone() => BleReq()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
BleReq copyWith(void Function(BleReq) updates) => super.copyWith((message) => updates(message as BleReq)) as BleReq;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static BleReq create() => BleReq._();
|
||||
BleReq createEmptyInstance() => create();
|
||||
static $pb.PbList<BleReq> createRepeated() => $pb.PbList<BleReq>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static BleReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BleReq>(create);
|
||||
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地址
|
||||
@$pb.TagNumber(2)
|
||||
$core.String get bluetoothDeviceName => $_getSZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set bluetoothDeviceName($core.String v) { $_setString(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasBluetoothDeviceName() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearBluetoothDeviceName() => clearField(2);
|
||||
|
||||
/// 下面是蓝牙结构内容,未加密状态
|
||||
@$pb.TagNumber(3)
|
||||
$core.List<$core.int> get structData => $_getN(2);
|
||||
@$pb.TagNumber(3)
|
||||
set structData($core.List<$core.int> v) { $_setBytes(2, v); }
|
||||
@$pb.TagNumber(3)
|
||||
$core.bool hasStructData() => $_has(2);
|
||||
@$pb.TagNumber(3)
|
||||
void clearStructData() => clearField(3);
|
||||
}
|
||||
|
||||
class BleResp extends $pb.GeneratedMessage {
|
||||
factory BleResp({
|
||||
BleResp_StatusE? status,
|
||||
$core.int? iD,
|
||||
$core.List<$core.int>? structData,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (status != null) {
|
||||
$result.status = status;
|
||||
}
|
||||
if (iD != null) {
|
||||
$result.iD = iD;
|
||||
}
|
||||
if (structData != null) {
|
||||
$result.structData = structData;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
BleResp._() : super();
|
||||
factory BleResp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory BleResp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
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)
|
||||
..a<$core.int>(2, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
||||
..a<$core.List<$core.int>>(4, _omitFieldNames ? '' : 'StructData', $pb.PbFieldType.OY, protoName: 'StructData')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
BleResp clone() => BleResp()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
BleResp copyWith(void Function(BleResp) updates) => super.copyWith((message) => updates(message as BleResp)) as BleResp;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static BleResp create() => BleResp._();
|
||||
BleResp createEmptyInstance() => create();
|
||||
static $pb.PbList<BleResp> createRepeated() => $pb.PbList<BleResp>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static BleResp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<BleResp>(create);
|
||||
static BleResp? _defaultInstance;
|
||||
|
||||
/// 状态
|
||||
@$pb.TagNumber(1)
|
||||
BleResp_StatusE get status => $_getN(0);
|
||||
@$pb.TagNumber(1)
|
||||
set status(BleResp_StatusE v) { setField(1, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasStatus() => $_has(0);
|
||||
@$pb.TagNumber(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)
|
||||
$core.List<$core.int> get structData => $_getN(2);
|
||||
@$pb.TagNumber(4)
|
||||
set structData($core.List<$core.int> v) { $_setBytes(2, v); }
|
||||
@$pb.TagNumber(4)
|
||||
$core.bool hasStructData() => $_has(2);
|
||||
@$pb.TagNumber(4)
|
||||
void clearStructData() => clearField(4);
|
||||
}
|
||||
|
||||
|
||||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
|
||||
41
lib/talk/startChart/proto/ble_message.pbenum.dart
Normal file
41
lib/talk/startChart/proto/ble_message.pbenum.dart
Normal file
@ -0,0 +1,41 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: ble_message.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
/// 定义一个枚举状态【成功,失败,找不到设备,无法建立连接,无法发送数据,超时】
|
||||
class BleResp_StatusE extends $pb.ProtobufEnum {
|
||||
static const BleResp_StatusE SUCCESS = BleResp_StatusE._(0, _omitEnumNames ? '' : 'SUCCESS');
|
||||
static const BleResp_StatusE FAIL = BleResp_StatusE._(1, _omitEnumNames ? '' : 'FAIL');
|
||||
static const BleResp_StatusE NOT_FOUND = BleResp_StatusE._(2, _omitEnumNames ? '' : 'NOT_FOUND');
|
||||
static const BleResp_StatusE CANNOT_CONNECT = BleResp_StatusE._(3, _omitEnumNames ? '' : 'CANNOT_CONNECT');
|
||||
static const BleResp_StatusE CANNOT_SEND = BleResp_StatusE._(4, _omitEnumNames ? '' : 'CANNOT_SEND');
|
||||
static const BleResp_StatusE TIMEOUT = BleResp_StatusE._(5, _omitEnumNames ? '' : 'TIMEOUT');
|
||||
|
||||
static const $core.List<BleResp_StatusE> values = <BleResp_StatusE> [
|
||||
SUCCESS,
|
||||
FAIL,
|
||||
NOT_FOUND,
|
||||
CANNOT_CONNECT,
|
||||
CANNOT_SEND,
|
||||
TIMEOUT,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, BleResp_StatusE> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static BleResp_StatusE? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const BleResp_StatusE._($core.int v, $core.String n) : super(v, n);
|
||||
}
|
||||
|
||||
|
||||
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
|
||||
61
lib/talk/startChart/proto/ble_message.pbjson.dart
Normal file
61
lib/talk/startChart/proto/ble_message.pbjson.dart
Normal file
@ -0,0 +1,61 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: ble_message.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use bleReqDescriptor instead')
|
||||
const BleReq$json = {
|
||||
'1': 'BleReq',
|
||||
'2': [
|
||||
{'1': 'ID', '3': 1, '4': 1, '5': 13, '10': 'ID'},
|
||||
{'1': 'bluetoothDeviceName', '3': 2, '4': 1, '5': 9, '10': 'bluetoothDeviceName'},
|
||||
{'1': 'StructData', '3': 3, '4': 1, '5': 12, '10': 'StructData'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `BleReq`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List bleReqDescriptor = $convert.base64Decode(
|
||||
'CgZCbGVSZXESDgoCSUQYASABKA1SAklEEjAKE2JsdWV0b290aERldmljZU5hbWUYAiABKAlSE2'
|
||||
'JsdWV0b290aERldmljZU5hbWUSHgoKU3RydWN0RGF0YRgDIAEoDFIKU3RydWN0RGF0YQ==');
|
||||
|
||||
@$core.Deprecated('Use bleRespDescriptor instead')
|
||||
const BleResp$json = {
|
||||
'1': 'BleResp',
|
||||
'2': [
|
||||
{'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'},
|
||||
],
|
||||
'4': [BleResp_StatusE$json],
|
||||
};
|
||||
|
||||
@$core.Deprecated('Use bleRespDescriptor instead')
|
||||
const BleResp_StatusE$json = {
|
||||
'1': 'StatusE',
|
||||
'2': [
|
||||
{'1': 'SUCCESS', '2': 0},
|
||||
{'1': 'FAIL', '2': 1},
|
||||
{'1': 'NOT_FOUND', '2': 2},
|
||||
{'1': 'CANNOT_CONNECT', '2': 3},
|
||||
{'1': 'CANNOT_SEND', '2': 4},
|
||||
{'1': 'TIMEOUT', '2': 5},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `BleResp`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List bleRespDescriptor = $convert.base64Decode(
|
||||
'CgdCbGVSZXNwEi0KBlN0YXR1cxgBIAEoDjIVLm1haW4uQmxlUmVzcC5TdGF0dXNFUgZTdGF0dX'
|
||||
'MSDgoCSUQYAiABKA1SAklEEh4KClN0cnVjdERhdGEYBCABKAxSClN0cnVjdERhdGEiYQoHU3Rh'
|
||||
'dHVzRRILCgdTVUNDRVNTEAASCAoERkFJTBABEg0KCU5PVF9GT1VORBACEhIKDkNBTk5PVF9DT0'
|
||||
'5ORUNUEAMSDwoLQ0FOTk9UX1NFTkQQBBILCgdUSU1FT1VUEAU=');
|
||||
|
||||
14
lib/talk/startChart/proto/ble_message.pbserver.dart
Normal file
14
lib/talk/startChart/proto/ble_message.pbserver.dart
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: ble_message.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
export 'ble_message.pb.dart';
|
||||
|
||||
32
lib/talk/startChart/proto/ble_message.proto
Normal file
32
lib/talk/startChart/proto/ble_message.proto
Normal file
@ -0,0 +1,32 @@
|
||||
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;
|
||||
}
|
||||
169
lib/talk/startChart/proto/gateway_reset.pb.dart
Normal file
169
lib/talk/startChart/proto/gateway_reset.pb.dart
Normal file
@ -0,0 +1,169 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_reset.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
import 'gateway_reset.pbenum.dart';
|
||||
|
||||
export 'gateway_reset.pbenum.dart';
|
||||
|
||||
class GatewayResetReq extends $pb.GeneratedMessage {
|
||||
factory GatewayResetReq({
|
||||
$core.int? iD,
|
||||
$core.int? time,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (iD != null) {
|
||||
$result.iD = iD;
|
||||
}
|
||||
if (time != null) {
|
||||
$result.time = time;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
GatewayResetReq._() : super();
|
||||
factory GatewayResetReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory GatewayResetReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GatewayResetReq', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..a<$core.int>(1, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
||||
..a<$core.int>(2, _omitFieldNames ? '' : 'Time', $pb.PbFieldType.OU3, protoName: 'Time')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayResetReq clone() => GatewayResetReq()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayResetReq copyWith(void Function(GatewayResetReq) updates) => super.copyWith((message) => updates(message as GatewayResetReq)) as GatewayResetReq;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayResetReq create() => GatewayResetReq._();
|
||||
GatewayResetReq createEmptyInstance() => create();
|
||||
static $pb.PbList<GatewayResetReq> createRepeated() => $pb.PbList<GatewayResetReq>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayResetReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GatewayResetReq>(create);
|
||||
static GatewayResetReq? _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);
|
||||
|
||||
/// 操作时间
|
||||
@$pb.TagNumber(2)
|
||||
$core.int get time => $_getIZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set time($core.int v) { $_setUnsignedInt32(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasTime() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearTime() => clearField(2);
|
||||
}
|
||||
|
||||
class GatewayResetResp extends $pb.GeneratedMessage {
|
||||
factory GatewayResetResp({
|
||||
$core.int? iD,
|
||||
$core.int? time,
|
||||
GatewayResetResp_StatusE? status,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (iD != null) {
|
||||
$result.iD = iD;
|
||||
}
|
||||
if (time != null) {
|
||||
$result.time = time;
|
||||
}
|
||||
if (status != null) {
|
||||
$result.status = status;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
GatewayResetResp._() : super();
|
||||
factory GatewayResetResp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory GatewayResetResp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GatewayResetResp', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..a<$core.int>(1, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
||||
..a<$core.int>(2, _omitFieldNames ? '' : 'Time', $pb.PbFieldType.OU3, protoName: 'Time')
|
||||
..e<GatewayResetResp_StatusE>(3, _omitFieldNames ? '' : 'Status', $pb.PbFieldType.OE, protoName: 'Status', defaultOrMaker: GatewayResetResp_StatusE.OK, valueOf: GatewayResetResp_StatusE.valueOf, enumValues: GatewayResetResp_StatusE.values)
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayResetResp clone() => GatewayResetResp()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayResetResp copyWith(void Function(GatewayResetResp) updates) => super.copyWith((message) => updates(message as GatewayResetResp)) as GatewayResetResp;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayResetResp create() => GatewayResetResp._();
|
||||
GatewayResetResp createEmptyInstance() => create();
|
||||
static $pb.PbList<GatewayResetResp> createRepeated() => $pb.PbList<GatewayResetResp>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayResetResp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GatewayResetResp>(create);
|
||||
static GatewayResetResp? _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);
|
||||
|
||||
/// 操作完成时间
|
||||
@$pb.TagNumber(2)
|
||||
$core.int get time => $_getIZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set time($core.int v) { $_setUnsignedInt32(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasTime() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearTime() => clearField(2);
|
||||
|
||||
@$pb.TagNumber(3)
|
||||
GatewayResetResp_StatusE get status => $_getN(2);
|
||||
@$pb.TagNumber(3)
|
||||
set status(GatewayResetResp_StatusE v) { setField(3, v); }
|
||||
@$pb.TagNumber(3)
|
||||
$core.bool hasStatus() => $_has(2);
|
||||
@$pb.TagNumber(3)
|
||||
void clearStatus() => clearField(3);
|
||||
}
|
||||
|
||||
|
||||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
|
||||
33
lib/talk/startChart/proto/gateway_reset.pbenum.dart
Normal file
33
lib/talk/startChart/proto/gateway_reset.pbenum.dart
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_reset.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
/// 状态E
|
||||
class GatewayResetResp_StatusE extends $pb.ProtobufEnum {
|
||||
static const GatewayResetResp_StatusE OK = GatewayResetResp_StatusE._(0, _omitEnumNames ? '' : 'OK');
|
||||
static const GatewayResetResp_StatusE FAIL = GatewayResetResp_StatusE._(1, _omitEnumNames ? '' : 'FAIL');
|
||||
|
||||
static const $core.List<GatewayResetResp_StatusE> values = <GatewayResetResp_StatusE> [
|
||||
OK,
|
||||
FAIL,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, GatewayResetResp_StatusE> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static GatewayResetResp_StatusE? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const GatewayResetResp_StatusE._($core.int v, $core.String n) : super(v, n);
|
||||
}
|
||||
|
||||
|
||||
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
|
||||
54
lib/talk/startChart/proto/gateway_reset.pbjson.dart
Normal file
54
lib/talk/startChart/proto/gateway_reset.pbjson.dart
Normal file
@ -0,0 +1,54 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_reset.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use gatewayResetReqDescriptor instead')
|
||||
const GatewayResetReq$json = {
|
||||
'1': 'GatewayResetReq',
|
||||
'2': [
|
||||
{'1': 'ID', '3': 1, '4': 1, '5': 13, '10': 'ID'},
|
||||
{'1': 'Time', '3': 2, '4': 1, '5': 13, '10': 'Time'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `GatewayResetReq`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List gatewayResetReqDescriptor = $convert.base64Decode(
|
||||
'Cg9HYXRld2F5UmVzZXRSZXESDgoCSUQYASABKA1SAklEEhIKBFRpbWUYAiABKA1SBFRpbWU=');
|
||||
|
||||
@$core.Deprecated('Use gatewayResetRespDescriptor instead')
|
||||
const GatewayResetResp$json = {
|
||||
'1': 'GatewayResetResp',
|
||||
'2': [
|
||||
{'1': 'ID', '3': 1, '4': 1, '5': 13, '10': 'ID'},
|
||||
{'1': 'Time', '3': 2, '4': 1, '5': 13, '10': 'Time'},
|
||||
{'1': 'Status', '3': 3, '4': 1, '5': 14, '6': '.main.GatewayResetResp.StatusE', '10': 'Status'},
|
||||
],
|
||||
'4': [GatewayResetResp_StatusE$json],
|
||||
};
|
||||
|
||||
@$core.Deprecated('Use gatewayResetRespDescriptor instead')
|
||||
const GatewayResetResp_StatusE$json = {
|
||||
'1': 'StatusE',
|
||||
'2': [
|
||||
{'1': 'OK', '2': 0},
|
||||
{'1': 'FAIL', '2': 1},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `GatewayResetResp`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List gatewayResetRespDescriptor = $convert.base64Decode(
|
||||
'ChBHYXRld2F5UmVzZXRSZXNwEg4KAklEGAEgASgNUgJJRBISCgRUaW1lGAIgASgNUgRUaW1lEj'
|
||||
'YKBlN0YXR1cxgDIAEoDjIeLm1haW4uR2F0ZXdheVJlc2V0UmVzcC5TdGF0dXNFUgZTdGF0dXMi'
|
||||
'GwoHU3RhdHVzRRIGCgJPSxAAEggKBEZBSUwQAQ==');
|
||||
|
||||
14
lib/talk/startChart/proto/gateway_reset.pbserver.dart
Normal file
14
lib/talk/startChart/proto/gateway_reset.pbserver.dart
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_reset.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
export 'gateway_reset.pb.dart';
|
||||
|
||||
27
lib/talk/startChart/proto/gateway_reset.proto
Normal file
27
lib/talk/startChart/proto/gateway_reset.proto
Normal file
@ -0,0 +1,27 @@
|
||||
// 初始化网关
|
||||
syntax = "proto3";
|
||||
package main;
|
||||
option go_package = "./spb";
|
||||
|
||||
message GatewayResetReq {
|
||||
// 下面两个参数没有实际意义
|
||||
// 自增ID,用于匹配请求和响应
|
||||
uint32 ID = 1;
|
||||
// 操作时间
|
||||
uint32 Time = 2;
|
||||
}
|
||||
|
||||
message GatewayResetResp {
|
||||
// 自增ID,用于匹配请求和响应
|
||||
uint32 ID = 1;
|
||||
// 操作完成时间
|
||||
uint32 Time = 2;
|
||||
// 状态E
|
||||
enum StatusE {
|
||||
// 成功
|
||||
OK = 0;
|
||||
// 失败
|
||||
FAIL = 1;
|
||||
}
|
||||
StatusE Status = 3;
|
||||
}
|
||||
169
lib/talk/startChart/proto/gateway_transfer.pb.dart
Normal file
169
lib/talk/startChart/proto/gateway_transfer.pb.dart
Normal file
@ -0,0 +1,169 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
import 'gateway_transfer.pbenum.dart';
|
||||
|
||||
export 'gateway_transfer.pbenum.dart';
|
||||
|
||||
class GatewayTransferReq extends $pb.GeneratedMessage {
|
||||
factory GatewayTransferReq({
|
||||
$core.int? iD,
|
||||
$core.int? time,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (iD != null) {
|
||||
$result.iD = iD;
|
||||
}
|
||||
if (time != null) {
|
||||
$result.time = time;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
GatewayTransferReq._() : super();
|
||||
factory GatewayTransferReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory GatewayTransferReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GatewayTransferReq', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..a<$core.int>(1, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
||||
..a<$core.int>(2, _omitFieldNames ? '' : 'Time', $pb.PbFieldType.OU3, protoName: 'Time')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayTransferReq clone() => GatewayTransferReq()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayTransferReq copyWith(void Function(GatewayTransferReq) updates) => super.copyWith((message) => updates(message as GatewayTransferReq)) as GatewayTransferReq;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayTransferReq create() => GatewayTransferReq._();
|
||||
GatewayTransferReq createEmptyInstance() => create();
|
||||
static $pb.PbList<GatewayTransferReq> createRepeated() => $pb.PbList<GatewayTransferReq>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayTransferReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GatewayTransferReq>(create);
|
||||
static GatewayTransferReq? _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);
|
||||
|
||||
/// 操作时间
|
||||
@$pb.TagNumber(2)
|
||||
$core.int get time => $_getIZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set time($core.int v) { $_setUnsignedInt32(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasTime() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearTime() => clearField(2);
|
||||
}
|
||||
|
||||
class GatewayTransferResp extends $pb.GeneratedMessage {
|
||||
factory GatewayTransferResp({
|
||||
$core.int? iD,
|
||||
$core.int? time,
|
||||
GatewayTransferResp_StatusE? status,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (iD != null) {
|
||||
$result.iD = iD;
|
||||
}
|
||||
if (time != null) {
|
||||
$result.time = time;
|
||||
}
|
||||
if (status != null) {
|
||||
$result.status = status;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
GatewayTransferResp._() : super();
|
||||
factory GatewayTransferResp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory GatewayTransferResp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GatewayTransferResp', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..a<$core.int>(1, _omitFieldNames ? '' : 'ID', $pb.PbFieldType.OU3, protoName: 'ID')
|
||||
..a<$core.int>(2, _omitFieldNames ? '' : 'Time', $pb.PbFieldType.OU3, protoName: 'Time')
|
||||
..e<GatewayTransferResp_StatusE>(3, _omitFieldNames ? '' : 'Status', $pb.PbFieldType.OE, protoName: 'Status', defaultOrMaker: GatewayTransferResp_StatusE.OK, valueOf: GatewayTransferResp_StatusE.valueOf, enumValues: GatewayTransferResp_StatusE.values)
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayTransferResp clone() => GatewayTransferResp()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
GatewayTransferResp copyWith(void Function(GatewayTransferResp) updates) => super.copyWith((message) => updates(message as GatewayTransferResp)) as GatewayTransferResp;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayTransferResp create() => GatewayTransferResp._();
|
||||
GatewayTransferResp createEmptyInstance() => create();
|
||||
static $pb.PbList<GatewayTransferResp> createRepeated() => $pb.PbList<GatewayTransferResp>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GatewayTransferResp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GatewayTransferResp>(create);
|
||||
static GatewayTransferResp? _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);
|
||||
|
||||
/// 操作完成时间
|
||||
@$pb.TagNumber(2)
|
||||
$core.int get time => $_getIZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set time($core.int v) { $_setUnsignedInt32(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasTime() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearTime() => clearField(2);
|
||||
|
||||
@$pb.TagNumber(3)
|
||||
GatewayTransferResp_StatusE get status => $_getN(2);
|
||||
@$pb.TagNumber(3)
|
||||
set status(GatewayTransferResp_StatusE v) { setField(3, v); }
|
||||
@$pb.TagNumber(3)
|
||||
$core.bool hasStatus() => $_has(2);
|
||||
@$pb.TagNumber(3)
|
||||
void clearStatus() => clearField(3);
|
||||
}
|
||||
|
||||
|
||||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
|
||||
33
lib/talk/startChart/proto/gateway_transfer.pbenum.dart
Normal file
33
lib/talk/startChart/proto/gateway_transfer.pbenum.dart
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
/// 状态E
|
||||
class GatewayTransferResp_StatusE extends $pb.ProtobufEnum {
|
||||
static const GatewayTransferResp_StatusE OK = GatewayTransferResp_StatusE._(0, _omitEnumNames ? '' : 'OK');
|
||||
static const GatewayTransferResp_StatusE FAIL = GatewayTransferResp_StatusE._(1, _omitEnumNames ? '' : 'FAIL');
|
||||
|
||||
static const $core.List<GatewayTransferResp_StatusE> values = <GatewayTransferResp_StatusE> [
|
||||
OK,
|
||||
FAIL,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, GatewayTransferResp_StatusE> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static GatewayTransferResp_StatusE? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const GatewayTransferResp_StatusE._($core.int v, $core.String n) : super(v, n);
|
||||
}
|
||||
|
||||
|
||||
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
|
||||
55
lib/talk/startChart/proto/gateway_transfer.pbjson.dart
Normal file
55
lib/talk/startChart/proto/gateway_transfer.pbjson.dart
Normal file
@ -0,0 +1,55 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use gatewayTransferReqDescriptor instead')
|
||||
const GatewayTransferReq$json = {
|
||||
'1': 'GatewayTransferReq',
|
||||
'2': [
|
||||
{'1': 'ID', '3': 1, '4': 1, '5': 13, '10': 'ID'},
|
||||
{'1': 'Time', '3': 2, '4': 1, '5': 13, '10': 'Time'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `GatewayTransferReq`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List gatewayTransferReqDescriptor = $convert.base64Decode(
|
||||
'ChJHYXRld2F5VHJhbnNmZXJSZXESDgoCSUQYASABKA1SAklEEhIKBFRpbWUYAiABKA1SBFRpbW'
|
||||
'U=');
|
||||
|
||||
@$core.Deprecated('Use gatewayTransferRespDescriptor instead')
|
||||
const GatewayTransferResp$json = {
|
||||
'1': 'GatewayTransferResp',
|
||||
'2': [
|
||||
{'1': 'ID', '3': 1, '4': 1, '5': 13, '10': 'ID'},
|
||||
{'1': 'Time', '3': 2, '4': 1, '5': 13, '10': 'Time'},
|
||||
{'1': 'Status', '3': 3, '4': 1, '5': 14, '6': '.main.GatewayTransferResp.StatusE', '10': 'Status'},
|
||||
],
|
||||
'4': [GatewayTransferResp_StatusE$json],
|
||||
};
|
||||
|
||||
@$core.Deprecated('Use gatewayTransferRespDescriptor instead')
|
||||
const GatewayTransferResp_StatusE$json = {
|
||||
'1': 'StatusE',
|
||||
'2': [
|
||||
{'1': 'OK', '2': 0},
|
||||
{'1': 'FAIL', '2': 1},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `GatewayTransferResp`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List gatewayTransferRespDescriptor = $convert.base64Decode(
|
||||
'ChNHYXRld2F5VHJhbnNmZXJSZXNwEg4KAklEGAEgASgNUgJJRBISCgRUaW1lGAIgASgNUgRUaW'
|
||||
'1lEjkKBlN0YXR1cxgDIAEoDjIhLm1haW4uR2F0ZXdheVRyYW5zZmVyUmVzcC5TdGF0dXNFUgZT'
|
||||
'dGF0dXMiGwoHU3RhdHVzRRIGCgJPSxAAEggKBEZBSUwQAQ==');
|
||||
|
||||
14
lib/talk/startChart/proto/gateway_transfer.pbserver.dart
Normal file
14
lib/talk/startChart/proto/gateway_transfer.pbserver.dart
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: gateway_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
export 'gateway_transfer.pb.dart';
|
||||
|
||||
29
lib/talk/startChart/proto/gateway_transfer.proto
Normal file
29
lib/talk/startChart/proto/gateway_transfer.proto
Normal file
@ -0,0 +1,29 @@
|
||||
// 转移网关
|
||||
syntax = "proto3";
|
||||
package main;
|
||||
option go_package = "./spb";
|
||||
|
||||
message GatewayTransferReq {
|
||||
// 下面两个参数没有实际意义
|
||||
// 自增ID,用于匹配请求和响应
|
||||
uint32 ID = 1;
|
||||
// TODO 新的接收者资料,等同于网关添加时候的对象
|
||||
|
||||
// 操作时间
|
||||
uint32 Time = 2;
|
||||
}
|
||||
|
||||
message GatewayTransferResp {
|
||||
// 自增ID,用于匹配请求和响应
|
||||
uint32 ID = 1;
|
||||
// 操作完成时间
|
||||
uint32 Time = 2;
|
||||
// 状态E
|
||||
enum StatusE {
|
||||
// 成功
|
||||
OK = 0;
|
||||
// 失败
|
||||
FAIL = 1;
|
||||
}
|
||||
StatusE Status = 3;
|
||||
}
|
||||
84
lib/talk/startChart/proto/generic.pb.dart
Normal file
84
lib/talk/startChart/proto/generic.pb.dart
Normal file
@ -0,0 +1,84 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: generic.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
class GenericResp extends $pb.GeneratedMessage {
|
||||
factory GenericResp({
|
||||
$core.int? code,
|
||||
$core.String? message,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (code != null) {
|
||||
$result.code = code;
|
||||
}
|
||||
if (message != null) {
|
||||
$result.message = message;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
GenericResp._() : super();
|
||||
factory GenericResp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory GenericResp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'GenericResp', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..a<$core.int>(2, _omitFieldNames ? '' : 'Code', $pb.PbFieldType.O3, protoName: 'Code')
|
||||
..aOS(4, _omitFieldNames ? '' : 'message')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
GenericResp clone() => GenericResp()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
GenericResp copyWith(void Function(GenericResp) updates) => super.copyWith((message) => updates(message as GenericResp)) as GenericResp;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GenericResp create() => GenericResp._();
|
||||
GenericResp createEmptyInstance() => create();
|
||||
static $pb.PbList<GenericResp> createRepeated() => $pb.PbList<GenericResp>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static GenericResp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<GenericResp>(create);
|
||||
static GenericResp? _defaultInstance;
|
||||
|
||||
/// 代码,用于区分特定错误,无错误为0
|
||||
@$pb.TagNumber(2)
|
||||
$core.int get code => $_getIZ(0);
|
||||
@$pb.TagNumber(2)
|
||||
set code($core.int v) { $_setSignedInt32(0, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasCode() => $_has(0);
|
||||
@$pb.TagNumber(2)
|
||||
void clearCode() => clearField(2);
|
||||
|
||||
/// 消息,成功为ok,失败为错误消息
|
||||
@$pb.TagNumber(4)
|
||||
$core.String get message => $_getSZ(1);
|
||||
@$pb.TagNumber(4)
|
||||
set message($core.String v) { $_setString(1, v); }
|
||||
@$pb.TagNumber(4)
|
||||
$core.bool hasMessage() => $_has(1);
|
||||
@$pb.TagNumber(4)
|
||||
void clearMessage() => clearField(4);
|
||||
}
|
||||
|
||||
|
||||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
|
||||
11
lib/talk/startChart/proto/generic.pbenum.dart
Normal file
11
lib/talk/startChart/proto/generic.pbenum.dart
Normal file
@ -0,0 +1,11 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: generic.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
29
lib/talk/startChart/proto/generic.pbjson.dart
Normal file
29
lib/talk/startChart/proto/generic.pbjson.dart
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: generic.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use genericRespDescriptor instead')
|
||||
const GenericResp$json = {
|
||||
'1': 'GenericResp',
|
||||
'2': [
|
||||
{'1': 'Code', '3': 2, '4': 1, '5': 5, '10': 'Code'},
|
||||
{'1': 'message', '3': 4, '4': 1, '5': 9, '10': 'message'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `GenericResp`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List genericRespDescriptor = $convert.base64Decode(
|
||||
'CgtHZW5lcmljUmVzcBISCgRDb2RlGAIgASgFUgRDb2RlEhgKB21lc3NhZ2UYBCABKAlSB21lc3'
|
||||
'NhZ2U=');
|
||||
|
||||
14
lib/talk/startChart/proto/generic.pbserver.dart
Normal file
14
lib/talk/startChart/proto/generic.pbserver.dart
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: generic.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
export 'generic.pb.dart';
|
||||
|
||||
12
lib/talk/startChart/proto/generic.proto
Normal file
12
lib/talk/startChart/proto/generic.proto
Normal file
@ -0,0 +1,12 @@
|
||||
// 通用数据结构
|
||||
// 一般用于简单的响应,只需要知道是否成功,而不需要特定数据结构
|
||||
syntax = "proto3";
|
||||
package main;
|
||||
option go_package = "./spb";
|
||||
|
||||
message GenericResp {
|
||||
// 代码,用于区分特定错误,无错误为0
|
||||
int32 Code = 2;
|
||||
// 消息,成功为ok,失败为错误消息
|
||||
string message = 4;
|
||||
}
|
||||
370
lib/talk/startChart/proto/remote_unlock.pb.dart
Normal file
370
lib/talk/startChart/proto/remote_unlock.pb.dart
Normal file
@ -0,0 +1,370 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: remote_unlock.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:fixnum/fixnum.dart' as $fixnum;
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
import 'remote_unlock.pbenum.dart';
|
||||
|
||||
export 'remote_unlock.pbenum.dart';
|
||||
|
||||
/// 依靠网关拼接数据包的远程开锁指令
|
||||
class RemoteUnlockReq extends $pb.GeneratedMessage {
|
||||
factory RemoteUnlockReq({
|
||||
$core.List<$core.int>? publicKey,
|
||||
$core.List<$core.int>? privateKey,
|
||||
$core.List<$core.int>? signKey,
|
||||
$core.int? cmdID,
|
||||
$core.String? bluetoothDeviceName,
|
||||
$core.String? userID,
|
||||
RemoteUnlockReq_OpenModeE? openMode,
|
||||
$fixnum.Int64? openTime,
|
||||
$core.int? token,
|
||||
$core.String? onlineToken,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (publicKey != null) {
|
||||
$result.publicKey = publicKey;
|
||||
}
|
||||
if (privateKey != null) {
|
||||
$result.privateKey = privateKey;
|
||||
}
|
||||
if (signKey != null) {
|
||||
$result.signKey = signKey;
|
||||
}
|
||||
if (cmdID != null) {
|
||||
$result.cmdID = cmdID;
|
||||
}
|
||||
if (bluetoothDeviceName != null) {
|
||||
$result.bluetoothDeviceName = bluetoothDeviceName;
|
||||
}
|
||||
if (userID != null) {
|
||||
$result.userID = userID;
|
||||
}
|
||||
if (openMode != null) {
|
||||
$result.openMode = openMode;
|
||||
}
|
||||
if (openTime != null) {
|
||||
$result.openTime = openTime;
|
||||
}
|
||||
if (token != null) {
|
||||
$result.token = token;
|
||||
}
|
||||
if (onlineToken != null) {
|
||||
$result.onlineToken = onlineToken;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
RemoteUnlockReq._() : super();
|
||||
factory RemoteUnlockReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory RemoteUnlockReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RemoteUnlockReq', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..a<$core.List<$core.int>>(1, _omitFieldNames ? '' : 'PublicKey', $pb.PbFieldType.OY, protoName: 'PublicKey')
|
||||
..a<$core.List<$core.int>>(2, _omitFieldNames ? '' : 'PrivateKey', $pb.PbFieldType.OY, protoName: 'PrivateKey')
|
||||
..a<$core.List<$core.int>>(3, _omitFieldNames ? '' : 'SignKey', $pb.PbFieldType.OY, protoName: 'SignKey')
|
||||
..a<$core.int>(4, _omitFieldNames ? '' : 'CmdID', $pb.PbFieldType.OU3, protoName: 'CmdID')
|
||||
..aOS(5, _omitFieldNames ? '' : 'bluetoothDeviceName', protoName: 'bluetoothDeviceName')
|
||||
..aOS(6, _omitFieldNames ? '' : 'UserID', protoName: 'UserID')
|
||||
..e<RemoteUnlockReq_OpenModeE>(7, _omitFieldNames ? '' : 'OpenMode', $pb.PbFieldType.OE, protoName: 'OpenMode', defaultOrMaker: RemoteUnlockReq_OpenModeE.OfflineOpen, valueOf: RemoteUnlockReq_OpenModeE.valueOf, enumValues: RemoteUnlockReq_OpenModeE.values)
|
||||
..a<$fixnum.Int64>(8, _omitFieldNames ? '' : 'OpenTime', $pb.PbFieldType.OU6, protoName: 'OpenTime', defaultOrMaker: $fixnum.Int64.ZERO)
|
||||
..a<$core.int>(9, _omitFieldNames ? '' : 'Token', $pb.PbFieldType.OU3, protoName: 'Token')
|
||||
..aOS(11, _omitFieldNames ? '' : 'OnlineToken', protoName: 'OnlineToken')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
RemoteUnlockReq clone() => RemoteUnlockReq()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
RemoteUnlockReq copyWith(void Function(RemoteUnlockReq) updates) => super.copyWith((message) => updates(message as RemoteUnlockReq)) as RemoteUnlockReq;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static RemoteUnlockReq create() => RemoteUnlockReq._();
|
||||
RemoteUnlockReq createEmptyInstance() => create();
|
||||
static $pb.PbList<RemoteUnlockReq> createRepeated() => $pb.PbList<RemoteUnlockReq>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static RemoteUnlockReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RemoteUnlockReq>(create);
|
||||
static RemoteUnlockReq? _defaultInstance;
|
||||
|
||||
/// 16 byte publicKey and 16 byte privateKey
|
||||
/// 只是这里才需要传递公钥私钥;
|
||||
/// 蓝牙透传的话,包加密解密是在自己这边做的,密钥不用传给网关;
|
||||
@$pb.TagNumber(1)
|
||||
$core.List<$core.int> get publicKey => $_getN(0);
|
||||
@$pb.TagNumber(1)
|
||||
set publicKey($core.List<$core.int> v) { $_setBytes(0, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasPublicKey() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearPublicKey() => clearField(1);
|
||||
|
||||
@$pb.TagNumber(2)
|
||||
$core.List<$core.int> get privateKey => $_getN(1);
|
||||
@$pb.TagNumber(2)
|
||||
set privateKey($core.List<$core.int> v) { $_setBytes(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasPrivateKey() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearPrivateKey() => clearField(2);
|
||||
|
||||
@$pb.TagNumber(3)
|
||||
$core.List<$core.int> get signKey => $_getN(2);
|
||||
@$pb.TagNumber(3)
|
||||
set signKey($core.List<$core.int> v) { $_setBytes(2, v); }
|
||||
@$pb.TagNumber(3)
|
||||
$core.bool hasSignKey() => $_has(2);
|
||||
@$pb.TagNumber(3)
|
||||
void clearSignKey() => clearField(3);
|
||||
|
||||
/// CmdID 2字节uint16
|
||||
@$pb.TagNumber(4)
|
||||
$core.int get cmdID => $_getIZ(3);
|
||||
@$pb.TagNumber(4)
|
||||
set cmdID($core.int v) { $_setUnsignedInt32(3, v); }
|
||||
@$pb.TagNumber(4)
|
||||
$core.bool hasCmdID() => $_has(3);
|
||||
@$pb.TagNumber(4)
|
||||
void clearCmdID() => clearField(4);
|
||||
|
||||
/// bluetoothDeviceName 40长度字符串 实际上是lockName
|
||||
@$pb.TagNumber(5)
|
||||
$core.String get bluetoothDeviceName => $_getSZ(4);
|
||||
@$pb.TagNumber(5)
|
||||
set bluetoothDeviceName($core.String v) { $_setString(4, v); }
|
||||
@$pb.TagNumber(5)
|
||||
$core.bool hasBluetoothDeviceName() => $_has(4);
|
||||
@$pb.TagNumber(5)
|
||||
void clearBluetoothDeviceName() => clearField(5);
|
||||
|
||||
/// UserID 20长度字符串
|
||||
@$pb.TagNumber(6)
|
||||
$core.String get userID => $_getSZ(5);
|
||||
@$pb.TagNumber(6)
|
||||
set userID($core.String v) { $_setString(5, v); }
|
||||
@$pb.TagNumber(6)
|
||||
$core.bool hasUserID() => $_has(5);
|
||||
@$pb.TagNumber(6)
|
||||
void clearUserID() => clearField(6);
|
||||
|
||||
/// OpenMode 开门方式
|
||||
@$pb.TagNumber(7)
|
||||
RemoteUnlockReq_OpenModeE get openMode => $_getN(6);
|
||||
@$pb.TagNumber(7)
|
||||
set openMode(RemoteUnlockReq_OpenModeE v) { setField(7, v); }
|
||||
@$pb.TagNumber(7)
|
||||
$core.bool hasOpenMode() => $_has(6);
|
||||
@$pb.TagNumber(7)
|
||||
void clearOpenMode() => clearField(7);
|
||||
|
||||
/// 开锁当前时间
|
||||
@$pb.TagNumber(8)
|
||||
$fixnum.Int64 get openTime => $_getI64(7);
|
||||
@$pb.TagNumber(8)
|
||||
set openTime($fixnum.Int64 v) { $_setInt64(7, v); }
|
||||
@$pb.TagNumber(8)
|
||||
$core.bool hasOpenTime() => $_has(7);
|
||||
@$pb.TagNumber(8)
|
||||
void clearOpenTime() => clearField(8);
|
||||
|
||||
/// Token uint32 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。
|
||||
@$pb.TagNumber(9)
|
||||
$core.int get token => $_getIZ(8);
|
||||
@$pb.TagNumber(9)
|
||||
set token($core.int v) { $_setUnsignedInt32(8, v); }
|
||||
@$pb.TagNumber(9)
|
||||
$core.bool hasToken() => $_has(8);
|
||||
@$pb.TagNumber(9)
|
||||
void clearToken() => clearField(9);
|
||||
|
||||
/// // AuthCodeLen 鉴权码长度 uint8
|
||||
/// uint32 AuthCodeLen = 9;
|
||||
/// // authCode 鉴权码 变长, 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
/// string AuthCode = 10;
|
||||
/// OnlineToken 联网token 16字节字符串
|
||||
@$pb.TagNumber(11)
|
||||
$core.String get onlineToken => $_getSZ(9);
|
||||
@$pb.TagNumber(11)
|
||||
set onlineToken($core.String v) { $_setString(9, v); }
|
||||
@$pb.TagNumber(11)
|
||||
$core.bool hasOnlineToken() => $_has(9);
|
||||
@$pb.TagNumber(11)
|
||||
void clearOnlineToken() => clearField(11);
|
||||
}
|
||||
|
||||
class RemoteUnlockResp extends $pb.GeneratedMessage {
|
||||
factory RemoteUnlockResp({
|
||||
$core.int? cmdID,
|
||||
$core.int? token,
|
||||
$core.int? status,
|
||||
$core.int? power,
|
||||
$core.int? openMode,
|
||||
$core.int? power1,
|
||||
$core.List<$core.int>? bluetoothInput,
|
||||
$core.List<$core.int>? bluetoothOutput,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (cmdID != null) {
|
||||
$result.cmdID = cmdID;
|
||||
}
|
||||
if (token != null) {
|
||||
$result.token = token;
|
||||
}
|
||||
if (status != null) {
|
||||
$result.status = status;
|
||||
}
|
||||
if (power != null) {
|
||||
$result.power = power;
|
||||
}
|
||||
if (openMode != null) {
|
||||
$result.openMode = openMode;
|
||||
}
|
||||
if (power1 != null) {
|
||||
$result.power1 = power1;
|
||||
}
|
||||
if (bluetoothInput != null) {
|
||||
$result.bluetoothInput = bluetoothInput;
|
||||
}
|
||||
if (bluetoothOutput != null) {
|
||||
$result.bluetoothOutput = bluetoothOutput;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
RemoteUnlockResp._() : super();
|
||||
factory RemoteUnlockResp.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory RemoteUnlockResp.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'RemoteUnlockResp', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..a<$core.int>(1, _omitFieldNames ? '' : 'CmdID', $pb.PbFieldType.OU3, protoName: 'CmdID')
|
||||
..a<$core.int>(2, _omitFieldNames ? '' : 'Token', $pb.PbFieldType.OU3, protoName: 'Token')
|
||||
..a<$core.int>(3, _omitFieldNames ? '' : 'Status', $pb.PbFieldType.OU3, protoName: 'Status')
|
||||
..a<$core.int>(4, _omitFieldNames ? '' : 'Power', $pb.PbFieldType.OU3, protoName: 'Power')
|
||||
..a<$core.int>(5, _omitFieldNames ? '' : 'OpenMode', $pb.PbFieldType.OU3, protoName: 'OpenMode')
|
||||
..a<$core.int>(6, _omitFieldNames ? '' : 'Power1', $pb.PbFieldType.OU3, protoName: 'Power1')
|
||||
..a<$core.List<$core.int>>(7, _omitFieldNames ? '' : 'BluetoothInput', $pb.PbFieldType.OY, protoName: 'BluetoothInput')
|
||||
..a<$core.List<$core.int>>(8, _omitFieldNames ? '' : 'BluetoothOutput', $pb.PbFieldType.OY, protoName: 'BluetoothOutput')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
RemoteUnlockResp clone() => RemoteUnlockResp()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
RemoteUnlockResp copyWith(void Function(RemoteUnlockResp) updates) => super.copyWith((message) => updates(message as RemoteUnlockResp)) as RemoteUnlockResp;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static RemoteUnlockResp create() => RemoteUnlockResp._();
|
||||
RemoteUnlockResp createEmptyInstance() => create();
|
||||
static $pb.PbList<RemoteUnlockResp> createRepeated() => $pb.PbList<RemoteUnlockResp>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static RemoteUnlockResp getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<RemoteUnlockResp>(create);
|
||||
static RemoteUnlockResp? _defaultInstance;
|
||||
|
||||
/// CmdID 2字节uint16
|
||||
@$pb.TagNumber(1)
|
||||
$core.int get cmdID => $_getIZ(0);
|
||||
@$pb.TagNumber(1)
|
||||
set cmdID($core.int v) { $_setUnsignedInt32(0, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasCmdID() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearCmdID() => clearField(1);
|
||||
|
||||
/// Token uint32 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。
|
||||
@$pb.TagNumber(2)
|
||||
$core.int get token => $_getIZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set token($core.int v) { $_setUnsignedInt32(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasToken() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearToken() => clearField(2);
|
||||
|
||||
/// Status uint8 处理状态
|
||||
@$pb.TagNumber(3)
|
||||
$core.int get status => $_getIZ(2);
|
||||
@$pb.TagNumber(3)
|
||||
set status($core.int v) { $_setUnsignedInt32(2, v); }
|
||||
@$pb.TagNumber(3)
|
||||
$core.bool hasStatus() => $_has(2);
|
||||
@$pb.TagNumber(3)
|
||||
void clearStatus() => clearField(3);
|
||||
|
||||
/// Power uint8 剩余电量,百分比
|
||||
@$pb.TagNumber(4)
|
||||
$core.int get power => $_getIZ(3);
|
||||
@$pb.TagNumber(4)
|
||||
set power($core.int v) { $_setUnsignedInt32(3, v); }
|
||||
@$pb.TagNumber(4)
|
||||
$core.bool hasPower() => $_has(3);
|
||||
@$pb.TagNumber(4)
|
||||
void clearPower() => clearField(4);
|
||||
|
||||
/// OpenMode uint8 开锁方式
|
||||
@$pb.TagNumber(5)
|
||||
$core.int get openMode => $_getIZ(4);
|
||||
@$pb.TagNumber(5)
|
||||
set openMode($core.int v) { $_setUnsignedInt32(4, v); }
|
||||
@$pb.TagNumber(5)
|
||||
$core.bool hasOpenMode() => $_has(4);
|
||||
@$pb.TagNumber(5)
|
||||
void clearOpenMode() => clearField(5);
|
||||
|
||||
/// Power1 uint8 电池1剩余电量,百分比
|
||||
@$pb.TagNumber(6)
|
||||
$core.int get power1 => $_getIZ(5);
|
||||
@$pb.TagNumber(6)
|
||||
set power1($core.int v) { $_setUnsignedInt32(5, v); }
|
||||
@$pb.TagNumber(6)
|
||||
$core.bool hasPower1() => $_has(5);
|
||||
@$pb.TagNumber(6)
|
||||
void clearPower1() => clearField(6);
|
||||
|
||||
/// 蓝牙输入字节
|
||||
@$pb.TagNumber(7)
|
||||
$core.List<$core.int> get bluetoothInput => $_getN(6);
|
||||
@$pb.TagNumber(7)
|
||||
set bluetoothInput($core.List<$core.int> v) { $_setBytes(6, v); }
|
||||
@$pb.TagNumber(7)
|
||||
$core.bool hasBluetoothInput() => $_has(6);
|
||||
@$pb.TagNumber(7)
|
||||
void clearBluetoothInput() => clearField(7);
|
||||
|
||||
/// 蓝牙输出字节
|
||||
@$pb.TagNumber(8)
|
||||
$core.List<$core.int> get bluetoothOutput => $_getN(7);
|
||||
@$pb.TagNumber(8)
|
||||
set bluetoothOutput($core.List<$core.int> v) { $_setBytes(7, v); }
|
||||
@$pb.TagNumber(8)
|
||||
$core.bool hasBluetoothOutput() => $_has(7);
|
||||
@$pb.TagNumber(8)
|
||||
void clearBluetoothOutput() => clearField(8);
|
||||
}
|
||||
|
||||
|
||||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
|
||||
37
lib/talk/startChart/proto/remote_unlock.pbenum.dart
Normal file
37
lib/talk/startChart/proto/remote_unlock.pbenum.dart
Normal file
@ -0,0 +1,37 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: remote_unlock.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
/// 枚举:开锁方式 离线开门0, 在线开门2 离线关门32 在线关门34
|
||||
class RemoteUnlockReq_OpenModeE extends $pb.ProtobufEnum {
|
||||
static const RemoteUnlockReq_OpenModeE OfflineOpen = RemoteUnlockReq_OpenModeE._(0, _omitEnumNames ? '' : 'OfflineOpen');
|
||||
static const RemoteUnlockReq_OpenModeE OnlineOpen = RemoteUnlockReq_OpenModeE._(2, _omitEnumNames ? '' : 'OnlineOpen');
|
||||
static const RemoteUnlockReq_OpenModeE OfflineClose = RemoteUnlockReq_OpenModeE._(32, _omitEnumNames ? '' : 'OfflineClose');
|
||||
static const RemoteUnlockReq_OpenModeE OnlineClose = RemoteUnlockReq_OpenModeE._(34, _omitEnumNames ? '' : 'OnlineClose');
|
||||
|
||||
static const $core.List<RemoteUnlockReq_OpenModeE> values = <RemoteUnlockReq_OpenModeE> [
|
||||
OfflineOpen,
|
||||
OnlineOpen,
|
||||
OfflineClose,
|
||||
OnlineClose,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, RemoteUnlockReq_OpenModeE> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static RemoteUnlockReq_OpenModeE? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const RemoteUnlockReq_OpenModeE._($core.int v, $core.String n) : super(v, n);
|
||||
}
|
||||
|
||||
|
||||
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
|
||||
78
lib/talk/startChart/proto/remote_unlock.pbjson.dart
Normal file
78
lib/talk/startChart/proto/remote_unlock.pbjson.dart
Normal file
@ -0,0 +1,78 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: remote_unlock.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use remoteUnlockReqDescriptor instead')
|
||||
const RemoteUnlockReq$json = {
|
||||
'1': 'RemoteUnlockReq',
|
||||
'2': [
|
||||
{'1': 'PublicKey', '3': 1, '4': 1, '5': 12, '10': 'PublicKey'},
|
||||
{'1': 'PrivateKey', '3': 2, '4': 1, '5': 12, '10': 'PrivateKey'},
|
||||
{'1': 'SignKey', '3': 3, '4': 1, '5': 12, '10': 'SignKey'},
|
||||
{'1': 'CmdID', '3': 4, '4': 1, '5': 13, '10': 'CmdID'},
|
||||
{'1': 'bluetoothDeviceName', '3': 5, '4': 1, '5': 9, '10': 'bluetoothDeviceName'},
|
||||
{'1': 'UserID', '3': 6, '4': 1, '5': 9, '10': 'UserID'},
|
||||
{'1': 'OpenMode', '3': 7, '4': 1, '5': 14, '6': '.main.RemoteUnlockReq.OpenModeE', '10': 'OpenMode'},
|
||||
{'1': 'OpenTime', '3': 8, '4': 1, '5': 4, '10': 'OpenTime'},
|
||||
{'1': 'Token', '3': 9, '4': 1, '5': 13, '10': 'Token'},
|
||||
{'1': 'OnlineToken', '3': 11, '4': 1, '5': 9, '10': 'OnlineToken'},
|
||||
],
|
||||
'4': [RemoteUnlockReq_OpenModeE$json],
|
||||
};
|
||||
|
||||
@$core.Deprecated('Use remoteUnlockReqDescriptor instead')
|
||||
const RemoteUnlockReq_OpenModeE$json = {
|
||||
'1': 'OpenModeE',
|
||||
'2': [
|
||||
{'1': 'OfflineOpen', '2': 0},
|
||||
{'1': 'OnlineOpen', '2': 2},
|
||||
{'1': 'OfflineClose', '2': 32},
|
||||
{'1': 'OnlineClose', '2': 34},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `RemoteUnlockReq`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List remoteUnlockReqDescriptor = $convert.base64Decode(
|
||||
'Cg9SZW1vdGVVbmxvY2tSZXESHAoJUHVibGljS2V5GAEgASgMUglQdWJsaWNLZXkSHgoKUHJpdm'
|
||||
'F0ZUtleRgCIAEoDFIKUHJpdmF0ZUtleRIYCgdTaWduS2V5GAMgASgMUgdTaWduS2V5EhQKBUNt'
|
||||
'ZElEGAQgASgNUgVDbWRJRBIwChNibHVldG9vdGhEZXZpY2VOYW1lGAUgASgJUhNibHVldG9vdG'
|
||||
'hEZXZpY2VOYW1lEhYKBlVzZXJJRBgGIAEoCVIGVXNlcklEEjsKCE9wZW5Nb2RlGAcgASgOMh8u'
|
||||
'bWFpbi5SZW1vdGVVbmxvY2tSZXEuT3Blbk1vZGVFUghPcGVuTW9kZRIaCghPcGVuVGltZRgIIA'
|
||||
'EoBFIIT3BlblRpbWUSFAoFVG9rZW4YCSABKA1SBVRva2VuEiAKC09ubGluZVRva2VuGAsgASgJ'
|
||||
'UgtPbmxpbmVUb2tlbiJPCglPcGVuTW9kZUUSDwoLT2ZmbGluZU9wZW4QABIOCgpPbmxpbmVPcG'
|
||||
'VuEAISEAoMT2ZmbGluZUNsb3NlECASDwoLT25saW5lQ2xvc2UQIg==');
|
||||
|
||||
@$core.Deprecated('Use remoteUnlockRespDescriptor instead')
|
||||
const RemoteUnlockResp$json = {
|
||||
'1': 'RemoteUnlockResp',
|
||||
'2': [
|
||||
{'1': 'CmdID', '3': 1, '4': 1, '5': 13, '10': 'CmdID'},
|
||||
{'1': 'Token', '3': 2, '4': 1, '5': 13, '10': 'Token'},
|
||||
{'1': 'Status', '3': 3, '4': 1, '5': 13, '10': 'Status'},
|
||||
{'1': 'Power', '3': 4, '4': 1, '5': 13, '10': 'Power'},
|
||||
{'1': 'OpenMode', '3': 5, '4': 1, '5': 13, '10': 'OpenMode'},
|
||||
{'1': 'Power1', '3': 6, '4': 1, '5': 13, '10': 'Power1'},
|
||||
{'1': 'BluetoothInput', '3': 7, '4': 1, '5': 12, '10': 'BluetoothInput'},
|
||||
{'1': 'BluetoothOutput', '3': 8, '4': 1, '5': 12, '10': 'BluetoothOutput'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `RemoteUnlockResp`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List remoteUnlockRespDescriptor = $convert.base64Decode(
|
||||
'ChBSZW1vdGVVbmxvY2tSZXNwEhQKBUNtZElEGAEgASgNUgVDbWRJRBIUCgVUb2tlbhgCIAEoDV'
|
||||
'IFVG9rZW4SFgoGU3RhdHVzGAMgASgNUgZTdGF0dXMSFAoFUG93ZXIYBCABKA1SBVBvd2VyEhoK'
|
||||
'CE9wZW5Nb2RlGAUgASgNUghPcGVuTW9kZRIWCgZQb3dlcjEYBiABKA1SBlBvd2VyMRImCg5CbH'
|
||||
'VldG9vdGhJbnB1dBgHIAEoDFIOQmx1ZXRvb3RoSW5wdXQSKAoPQmx1ZXRvb3RoT3V0cHV0GAgg'
|
||||
'ASgMUg9CbHVldG9vdGhPdXRwdXQ=');
|
||||
|
||||
14
lib/talk/startChart/proto/remote_unlock.pbserver.dart
Normal file
14
lib/talk/startChart/proto/remote_unlock.pbserver.dart
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: remote_unlock.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
export 'remote_unlock.pb.dart';
|
||||
|
||||
59
lib/talk/startChart/proto/remote_unlock.proto
Normal file
59
lib/talk/startChart/proto/remote_unlock.proto
Normal file
@ -0,0 +1,59 @@
|
||||
syntax = "proto3";
|
||||
package main;
|
||||
option go_package = "./spb";
|
||||
|
||||
// 依靠网关拼接数据包的远程开锁指令
|
||||
message RemoteUnlockReq {
|
||||
// 16 byte publicKey and 16 byte privateKey
|
||||
// 只是这里才需要传递公钥私钥;
|
||||
// 蓝牙透传的话,包加密解密是在自己这边做的,密钥不用传给网关;
|
||||
bytes PublicKey = 1;
|
||||
bytes PrivateKey = 2;
|
||||
bytes SignKey = 3;
|
||||
|
||||
// 枚举:开锁方式 离线开门0, 在线开门2 离线关门32 在线关门34
|
||||
enum OpenModeE {
|
||||
OfflineOpen = 0;
|
||||
OnlineOpen = 2;
|
||||
OfflineClose = 32;
|
||||
OnlineClose = 34;
|
||||
}
|
||||
// CmdID 2字节uint16
|
||||
uint32 CmdID = 4;
|
||||
// bluetoothDeviceName 40长度字符串 实际上是lockName
|
||||
string bluetoothDeviceName = 5;
|
||||
// UserID 20长度字符串
|
||||
string UserID = 6;
|
||||
// OpenMode 开门方式
|
||||
OpenModeE OpenMode = 7;
|
||||
// 开锁当前时间
|
||||
uint64 OpenTime = 8;
|
||||
// Token uint32 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。
|
||||
uint32 Token = 9;
|
||||
// // AuthCodeLen 鉴权码长度 uint8
|
||||
// uint32 AuthCodeLen = 9;
|
||||
// // authCode 鉴权码 变长, 把KeyID、authUserID、时间戳、公钥通过md5加密之后就是authCode
|
||||
// string AuthCode = 10;
|
||||
// OnlineToken 联网token 16字节字符串
|
||||
string OnlineToken = 11;
|
||||
}
|
||||
|
||||
message RemoteUnlockResp {
|
||||
// CmdID 2字节uint16
|
||||
uint32 CmdID = 1;
|
||||
// Token uint32 首次请求 Token 填 0,如果锁需要鉴权操作者身份,则会分配动态口令并在应答消息中返回,二次请求时带上。
|
||||
uint32 Token = 2;
|
||||
// Status uint8 处理状态
|
||||
uint32 Status = 3;
|
||||
// Power uint8 剩余电量,百分比
|
||||
uint32 Power = 4;
|
||||
// OpenMode uint8 开锁方式
|
||||
uint32 OpenMode = 5;
|
||||
// Power1 uint8 电池1剩余电量,百分比
|
||||
uint32 Power1 = 6;
|
||||
|
||||
// 蓝牙输入字节
|
||||
bytes BluetoothInput = 7;
|
||||
// 蓝牙输出字节
|
||||
bytes BluetoothOutput = 8;
|
||||
}
|
||||
68
lib/talk/startChart/proto/talk_receiver_transfer.pb.dart
Normal file
68
lib/talk/startChart/proto/talk_receiver_transfer.pb.dart
Normal file
@ -0,0 +1,68 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_receiver_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
class TalkReceiverTransfer extends $pb.GeneratedMessage {
|
||||
factory TalkReceiverTransfer({
|
||||
$core.String? newPeerID,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (newPeerID != null) {
|
||||
$result.newPeerID = newPeerID;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
TalkReceiverTransfer._() : super();
|
||||
factory TalkReceiverTransfer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory TalkReceiverTransfer.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TalkReceiverTransfer', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..aOS(2, _omitFieldNames ? '' : 'newPeerID', protoName: 'newPeerID')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
TalkReceiverTransfer clone() => TalkReceiverTransfer()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
TalkReceiverTransfer copyWith(void Function(TalkReceiverTransfer) updates) => super.copyWith((message) => updates(message as TalkReceiverTransfer)) as TalkReceiverTransfer;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static TalkReceiverTransfer create() => TalkReceiverTransfer._();
|
||||
TalkReceiverTransfer createEmptyInstance() => create();
|
||||
static $pb.PbList<TalkReceiverTransfer> createRepeated() => $pb.PbList<TalkReceiverTransfer>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static TalkReceiverTransfer getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<TalkReceiverTransfer>(create);
|
||||
static TalkReceiverTransfer? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(2)
|
||||
$core.String get newPeerID => $_getSZ(0);
|
||||
@$pb.TagNumber(2)
|
||||
set newPeerID($core.String v) { $_setString(0, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasNewPeerID() => $_has(0);
|
||||
@$pb.TagNumber(2)
|
||||
void clearNewPeerID() => clearField(2);
|
||||
}
|
||||
|
||||
|
||||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
|
||||
11
lib/talk/startChart/proto/talk_receiver_transfer.pbenum.dart
Normal file
11
lib/talk/startChart/proto/talk_receiver_transfer.pbenum.dart
Normal file
@ -0,0 +1,11 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_receiver_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
27
lib/talk/startChart/proto/talk_receiver_transfer.pbjson.dart
Normal file
27
lib/talk/startChart/proto/talk_receiver_transfer.pbjson.dart
Normal file
@ -0,0 +1,27 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_receiver_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use talkReceiverTransferDescriptor instead')
|
||||
const TalkReceiverTransfer$json = {
|
||||
'1': 'TalkReceiverTransfer',
|
||||
'2': [
|
||||
{'1': 'newPeerID', '3': 2, '4': 1, '5': 9, '10': 'newPeerID'},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `TalkReceiverTransfer`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List talkReceiverTransferDescriptor = $convert.base64Decode(
|
||||
'ChRUYWxrUmVjZWl2ZXJUcmFuc2ZlchIcCgluZXdQZWVySUQYAiABKAlSCW5ld1BlZXJJRA==');
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_receiver_transfer.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
export 'talk_receiver_transfer.pb.dart';
|
||||
|
||||
8
lib/talk/startChart/proto/talk_receiver_transfer.proto
Normal file
8
lib/talk/startChart/proto/talk_receiver_transfer.proto
Normal file
@ -0,0 +1,8 @@
|
||||
// 对讲接听者转移,通知智能锁,转移到一个新的peerID
|
||||
syntax = "proto3";
|
||||
package main;
|
||||
option go_package = "./spb/talk";
|
||||
|
||||
message TalkReceiverTransfer {
|
||||
string newPeerID = 2;
|
||||
}
|
||||
87
lib/talk/startChart/proto/talk_request.pb.dart
Normal file
87
lib/talk/startChart/proto/talk_request.pb.dart
Normal file
@ -0,0 +1,87 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_request.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
import 'talk_request.pbenum.dart';
|
||||
|
||||
export 'talk_request.pbenum.dart';
|
||||
|
||||
class TalkReq extends $pb.GeneratedMessage {
|
||||
factory TalkReq({
|
||||
TalkReq_CallerTypeE? callerType,
|
||||
$core.String? callerName,
|
||||
}) {
|
||||
final $result = create();
|
||||
if (callerType != null) {
|
||||
$result.callerType = callerType;
|
||||
}
|
||||
if (callerName != null) {
|
||||
$result.callerName = callerName;
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
TalkReq._() : super();
|
||||
factory TalkReq.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
|
||||
factory TalkReq.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
|
||||
|
||||
static final $pb.BuilderInfo _i = $pb.BuilderInfo(_omitMessageNames ? '' : 'TalkReq', package: const $pb.PackageName(_omitMessageNames ? '' : 'main'), createEmptyInstance: create)
|
||||
..e<TalkReq_CallerTypeE>(1, _omitFieldNames ? '' : 'CallerType', $pb.PbFieldType.OE, protoName: 'CallerType', defaultOrMaker: TalkReq_CallerTypeE.Lock, valueOf: TalkReq_CallerTypeE.valueOf, enumValues: TalkReq_CallerTypeE.values)
|
||||
..aOS(2, _omitFieldNames ? '' : 'CallerName', protoName: 'CallerName')
|
||||
..hasRequiredFields = false
|
||||
;
|
||||
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
|
||||
'Will be removed in next major version')
|
||||
TalkReq clone() => TalkReq()..mergeFromMessage(this);
|
||||
@$core.Deprecated(
|
||||
'Using this can add significant overhead to your binary. '
|
||||
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
|
||||
'Will be removed in next major version')
|
||||
TalkReq copyWith(void Function(TalkReq) updates) => super.copyWith((message) => updates(message as TalkReq)) as TalkReq;
|
||||
|
||||
$pb.BuilderInfo get info_ => _i;
|
||||
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static TalkReq create() => TalkReq._();
|
||||
TalkReq createEmptyInstance() => create();
|
||||
static $pb.PbList<TalkReq> createRepeated() => $pb.PbList<TalkReq>();
|
||||
@$core.pragma('dart2js:noInline')
|
||||
static TalkReq getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<TalkReq>(create);
|
||||
static TalkReq? _defaultInstance;
|
||||
|
||||
@$pb.TagNumber(1)
|
||||
TalkReq_CallerTypeE get callerType => $_getN(0);
|
||||
@$pb.TagNumber(1)
|
||||
set callerType(TalkReq_CallerTypeE v) { setField(1, v); }
|
||||
@$pb.TagNumber(1)
|
||||
$core.bool hasCallerType() => $_has(0);
|
||||
@$pb.TagNumber(1)
|
||||
void clearCallerType() => clearField(1);
|
||||
|
||||
/// 呼叫方名称,可能是用户名或者锁名称
|
||||
@$pb.TagNumber(2)
|
||||
$core.String get callerName => $_getSZ(1);
|
||||
@$pb.TagNumber(2)
|
||||
set callerName($core.String v) { $_setString(1, v); }
|
||||
@$pb.TagNumber(2)
|
||||
$core.bool hasCallerName() => $_has(1);
|
||||
@$pb.TagNumber(2)
|
||||
void clearCallerName() => clearField(2);
|
||||
}
|
||||
|
||||
|
||||
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');
|
||||
const _omitMessageNames = $core.bool.fromEnvironment('protobuf.omit_message_names');
|
||||
33
lib/talk/startChart/proto/talk_request.pbenum.dart
Normal file
33
lib/talk/startChart/proto/talk_request.pbenum.dart
Normal file
@ -0,0 +1,33 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_request.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:core' as $core;
|
||||
|
||||
import 'package:protobuf/protobuf.dart' as $pb;
|
||||
|
||||
/// 呼叫方类型:门锁、APP
|
||||
class TalkReq_CallerTypeE extends $pb.ProtobufEnum {
|
||||
static const TalkReq_CallerTypeE Lock = TalkReq_CallerTypeE._(0, _omitEnumNames ? '' : 'Lock');
|
||||
static const TalkReq_CallerTypeE App = TalkReq_CallerTypeE._(1, _omitEnumNames ? '' : 'App');
|
||||
|
||||
static const $core.List<TalkReq_CallerTypeE> values = <TalkReq_CallerTypeE> [
|
||||
Lock,
|
||||
App,
|
||||
];
|
||||
|
||||
static final $core.Map<$core.int, TalkReq_CallerTypeE> _byValue = $pb.ProtobufEnum.initByValue(values);
|
||||
static TalkReq_CallerTypeE? valueOf($core.int value) => _byValue[value];
|
||||
|
||||
const TalkReq_CallerTypeE._($core.int v, $core.String n) : super(v, n);
|
||||
}
|
||||
|
||||
|
||||
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');
|
||||
40
lib/talk/startChart/proto/talk_request.pbjson.dart
Normal file
40
lib/talk/startChart/proto/talk_request.pbjson.dart
Normal file
@ -0,0 +1,40 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_request.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
import 'dart:convert' as $convert;
|
||||
import 'dart:core' as $core;
|
||||
import 'dart:typed_data' as $typed_data;
|
||||
|
||||
@$core.Deprecated('Use talkReqDescriptor instead')
|
||||
const TalkReq$json = {
|
||||
'1': 'TalkReq',
|
||||
'2': [
|
||||
{'1': 'CallerType', '3': 1, '4': 1, '5': 14, '6': '.main.TalkReq.CallerTypeE', '10': 'CallerType'},
|
||||
{'1': 'CallerName', '3': 2, '4': 1, '5': 9, '10': 'CallerName'},
|
||||
],
|
||||
'4': [TalkReq_CallerTypeE$json],
|
||||
};
|
||||
|
||||
@$core.Deprecated('Use talkReqDescriptor instead')
|
||||
const TalkReq_CallerTypeE$json = {
|
||||
'1': 'CallerTypeE',
|
||||
'2': [
|
||||
{'1': 'Lock', '2': 0},
|
||||
{'1': 'App', '2': 1},
|
||||
],
|
||||
};
|
||||
|
||||
/// Descriptor for `TalkReq`. Decode as a `google.protobuf.DescriptorProto`.
|
||||
final $typed_data.Uint8List talkReqDescriptor = $convert.base64Decode(
|
||||
'CgdUYWxrUmVxEjkKCkNhbGxlclR5cGUYASABKA4yGS5tYWluLlRhbGtSZXEuQ2FsbGVyVHlwZU'
|
||||
'VSCkNhbGxlclR5cGUSHgoKQ2FsbGVyTmFtZRgCIAEoCVIKQ2FsbGVyTmFtZSIgCgtDYWxsZXJU'
|
||||
'eXBlRRIICgRMb2NrEAASBwoDQXBwEAE=');
|
||||
|
||||
14
lib/talk/startChart/proto/talk_request.pbserver.dart
Normal file
14
lib/talk/startChart/proto/talk_request.pbserver.dart
Normal file
@ -0,0 +1,14 @@
|
||||
//
|
||||
// Generated code. Do not modify.
|
||||
// source: talk_request.proto
|
||||
//
|
||||
// @dart = 2.12
|
||||
|
||||
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
|
||||
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
|
||||
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
|
||||
|
||||
export 'talk_request.pb.dart';
|
||||
|
||||
16
lib/talk/startChart/proto/talk_request.proto
Normal file
16
lib/talk/startChart/proto/talk_request.proto
Normal file
@ -0,0 +1,16 @@
|
||||
// 对讲呼叫请求
|
||||
syntax = "proto3";
|
||||
package main;
|
||||
option go_package = "./spb/talk";
|
||||
|
||||
message TalkReq {
|
||||
// 呼叫方类型:门锁、APP
|
||||
enum CallerTypeE {
|
||||
Lock = 0;
|
||||
App = 1;
|
||||
}
|
||||
CallerTypeE CallerType = 1;
|
||||
|
||||
// 呼叫方名称,可能是用户名或者锁名称
|
||||
string CallerName = 2;
|
||||
}
|
||||
@ -253,13 +253,14 @@ dependencies:
|
||||
fast_rsa: ^3.6.6
|
||||
crc: ^0.0.2
|
||||
crclib: ^3.0.0
|
||||
protobuf: ^3.1.0
|
||||
|
||||
|
||||
dependency_overrides:
|
||||
#强制设置google_maps_flutter_ios 为 2.5.2
|
||||
google_maps_flutter_ios: 2.5.2
|
||||
flutter_plugin_android_lifecycle: 2.0.18
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
@ -269,6 +270,7 @@ dev_dependencies:
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
flutter_lints: ^2.0.0
|
||||
protoc_plugin: ^21.1.2
|
||||
|
||||
# 说明文件在:flavorizr.yaml
|
||||
flutter_flavorizr: ^2.2.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user