1360 lines
41 KiB
Dart
Executable File
1360 lines
41 KiB
Dart
Executable File
import 'package:star_lock/blue/io_gateway/io_gateway_getWifiList.dart';
|
|
import 'package:star_lock/blue/io_protocol/io_addFace.dart';
|
|
import 'package:star_lock/blue/io_protocol/io_changeAdministratorPassword.dart';
|
|
import 'package:star_lock/blue/io_protocol/io_cleanUpUsers.dart';
|
|
import 'package:star_lock/blue/io_protocol/io_deletUser.dart';
|
|
import 'package:star_lock/blue/io_protocol/io_otaUpgrade.dart';
|
|
import 'package:star_lock/blue/io_protocol/io_processOtaUpgrade.dart';
|
|
import 'package:star_lock/blue/io_protocol/io_readAdminPassword.dart';
|
|
|
|
import 'io_gateway/io_gateway_configuringWifi.dart';
|
|
import 'io_gateway/io_gateway_getStatus.dart';
|
|
import 'io_protocol/io_addCardCancel.dart';
|
|
import 'io_protocol/io_addFaceCancel.dart';
|
|
import 'io_protocol/io_addFingerprintCancel.dart';
|
|
import 'io_protocol/io_addFingerprintWithTimeCycleCoercion.dart';
|
|
import 'io_protocol/io_addICCardWithTimeCycleCoercion.dart';
|
|
import 'io_protocol/io_addPalmCancel.dart';
|
|
import 'io_protocol/io_addPalmWithTimeCycleCoercion.dart';
|
|
import 'io_protocol/io_addRemoteControlCancel.dart';
|
|
import 'io_protocol/io_addRemoteControlWithTimeCycleCoercion.dart';
|
|
import 'io_protocol/io_addUser.dart';
|
|
import 'io_protocol/io_configuringWifi.dart';
|
|
import 'io_protocol/io_editUser.dart';
|
|
import 'io_protocol/io_factoryDataReset.dart';
|
|
import 'io_protocol/io_getPrivateKey.dart';
|
|
import 'io_protocol/io_getPublicKey.dart';
|
|
import 'io_protocol/io_getStarLockStatusInfo.dart';
|
|
import 'io_protocol/io_getWifiList.dart';
|
|
import 'io_protocol/io_openLock.dart';
|
|
import 'io_protocol/io_readSupportFunctionsNoParameters.dart';
|
|
import 'io_protocol/io_readSupportFunctionsWithParameters.dart';
|
|
import 'io_protocol/io_referEventRecordTime.dart';
|
|
import 'io_protocol/io_senderCustomPasswords.dart';
|
|
import 'io_protocol/io_senderResetPasswords.dart';
|
|
import 'io_protocol/io_setSupportFunctionsNoParameters.dart';
|
|
import 'io_protocol/io_setSupportFunctionsWithParameters.dart';
|
|
import 'io_protocol/io_timing.dart';
|
|
import 'io_protocol/io_updataLockCardList.dart';
|
|
import 'io_protocol/io_updataLockFaceList.dart';
|
|
import 'io_protocol/io_updataLockFingerprintList.dart';
|
|
import 'io_protocol/io_updataLockPalmVeinList.dart';
|
|
import 'io_protocol/io_updataLockPasswordList.dart';
|
|
import 'io_protocol/io_updataLockRemoteControlList.dart';
|
|
import 'io_protocol/io_updataLockSet.dart';
|
|
import 'sender_data.dart';
|
|
|
|
class IoSenderManage {
|
|
// 获取公钥
|
|
static void getPublicKey({String? lockId, CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: GetPublicKeyCommand(
|
|
lockID: lockId,
|
|
),
|
|
isBeforeAddUser: true,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 获取私钥
|
|
static void getPrivateKey(
|
|
{String? lockId,
|
|
String? keyID, // 钥匙ID
|
|
String? authUserID, // 钥匙授权人ID
|
|
int? nowTime,
|
|
List<int>? publicKeyData,
|
|
int? needAuthor,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: GetPrivateKeyCommand(
|
|
lockID: lockId,
|
|
keyID: keyID,
|
|
authUserID: authUserID,
|
|
nowTime: nowTime,
|
|
publicKeyData: publicKeyData,
|
|
needAuthor: needAuthor,
|
|
),
|
|
isBeforeAddUser: true,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 添加用户
|
|
static void senderAddUser(
|
|
{String? lockID,
|
|
String? authUserID,
|
|
String? keyID,
|
|
String? userID,
|
|
int? openMode,
|
|
int? keyType,
|
|
int? startDate,
|
|
int? expireDate,
|
|
int? useCountLimit,
|
|
int? isRound,
|
|
int? weekRound,
|
|
int? startHour,
|
|
int? startMin,
|
|
int? endHour,
|
|
int? endMin,
|
|
int? role,
|
|
String? password,
|
|
int? needAuthor,
|
|
List<int>? publicKey,
|
|
List<int>? privateKey,
|
|
List<int>? token,
|
|
bool? isBeforeAddUser,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: AddUserCommand(
|
|
lockID: lockID,
|
|
authUserID: authUserID,
|
|
keyID: keyID,
|
|
userID: userID,
|
|
openMode: openMode,
|
|
keyType: keyType,
|
|
startDate: startDate,
|
|
expireDate: expireDate,
|
|
useCountLimit: useCountLimit,
|
|
isRound: isRound,
|
|
weekRound: weekRound,
|
|
startHour: startHour,
|
|
startMin: startMin,
|
|
endHour: endHour,
|
|
endMin: endMin,
|
|
role: role,
|
|
password: password,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
token: token),
|
|
isBeforeAddUser: isBeforeAddUser ?? false,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 修改用户
|
|
static void senderEditUser(
|
|
{String? lockID,
|
|
String? authUserID,
|
|
String? keyID,
|
|
String? userID,
|
|
int? openMode,
|
|
int? keyType,
|
|
int? startDate,
|
|
int? expireDate,
|
|
int? role,
|
|
String? password,
|
|
int? needAuthor,
|
|
List<int>? publicKey,
|
|
List<int>? privateKey,
|
|
List<int>? token,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: EditUserCommand(
|
|
lockID: lockID,
|
|
authUserID: authUserID,
|
|
keyID: keyID,
|
|
userID: userID,
|
|
openMode: openMode,
|
|
keyType: keyType,
|
|
startDate: startDate,
|
|
expireDate: expireDate,
|
|
role: role,
|
|
password: password,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
token: token),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 删除
|
|
static void deletUser(
|
|
{String? lockID,
|
|
String? authUserID,
|
|
String? keyID,
|
|
String? delUserID,
|
|
int? needAuthor,
|
|
List<int>? publicKey,
|
|
List<int>? privateKey,
|
|
List<int>? token,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: DeletUserCommand(
|
|
lockID: lockID,
|
|
authUserID: authUserID,
|
|
keyID: keyID,
|
|
delUserID: delUserID,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
token: token),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 开锁
|
|
static void senderOpenLock(
|
|
{String? lockID,
|
|
String? userID,
|
|
int? openMode,
|
|
int? openTime,
|
|
String? onlineToken,
|
|
List<int>? token,
|
|
int? needAuthor,
|
|
List<int>? signKey,
|
|
List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: OpenLockCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
openMode: openMode,
|
|
openTime: openTime,
|
|
onlineToken: onlineToken,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 获取锁状态 弃用
|
|
// static void senderGetLockStatu(
|
|
// {String? lockID,
|
|
// String? userID,
|
|
// List<int>? privateKey,
|
|
// CommandSendCallBack? callBack}) {
|
|
// CommandSenderManager().managerSendData(
|
|
// command: GetLockStatuCommand(
|
|
// lockID: lockID,
|
|
// userID: userID,
|
|
// privateKey: privateKey,
|
|
// ),
|
|
// callBack: callBack);
|
|
// }
|
|
|
|
// 获取星锁状态信息
|
|
static void senderGetStarLockStatuInfo(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? utcTimeStamp,
|
|
required int? unixTimeStamp,
|
|
required List<int>? privateKey,
|
|
required bool? isBeforeAddUser,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: GetStarLockStatuInfoCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
utcTimeStamp: utcTimeStamp,
|
|
unixTimeStamp: unixTimeStamp,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser!,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 转移智能锁
|
|
static void sendTransferSmartLockCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required String? keyID,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: FactoryDataResetCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
keyID: keyID,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
token: token),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 恢复出厂设置
|
|
static void senderFactoryDataReset(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required String? keyID,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: FactoryDataResetCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
keyID: keyID,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
token: token),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 设置开锁密码
|
|
static void senderCustomPasswordsCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? pwdNo,
|
|
required int? operate,
|
|
required int? isAdmin,
|
|
required String? pwd,
|
|
required int? useCountLimit,
|
|
required List<int>? token,
|
|
required int? startTime,
|
|
required int? endTime,
|
|
required int? needAuthor,
|
|
required bool? isBeforeAddUser,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderCustomPasswordsCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
pwdNo: pwdNo,
|
|
operate: operate,
|
|
isAdmin: isAdmin,
|
|
pwd: pwd,
|
|
useCountLimit: useCountLimit,
|
|
token: token,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser ?? false,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 修改管理员密码
|
|
static void changeAdministratorPasswordCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? pwdNo,
|
|
required String? pwd,
|
|
required int? useCountLimit,
|
|
required List<int>? token,
|
|
required int? startTime,
|
|
required int? endTime,
|
|
required int? needAuthor,
|
|
required bool? isBeforeAddUser,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: ChangeAdministratorPasswordCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
pwdNo: pwdNo,
|
|
pwd: pwd,
|
|
useCountLimit: useCountLimit,
|
|
token: token,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser ?? false,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 重置开锁密码
|
|
static void senderResetPasswordsCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required bool? isBeforeAddUser,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderResetPasswordsCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser ?? false,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 添加指纹开始 弃用
|
|
// static void senderAddFingerprintCommand(
|
|
// {required String? keyID,
|
|
// required String? userID,
|
|
// required int? fingerNo,
|
|
// required int? useCountLimit,
|
|
// required List<int>? token,
|
|
// required int? startTime,
|
|
// required int? endTime,
|
|
// required int? needAuthor,
|
|
// required List<int>? signKey,
|
|
// required List<int>? privateKey,
|
|
// CommandSendCallBack? callBack}) {
|
|
// CommandSenderManager().managerSendData(
|
|
// command: SenderAddFingerprintCommand(
|
|
// keyID: keyID,
|
|
// userID: userID,
|
|
// fingerNo: fingerNo,
|
|
// useCountLimit: useCountLimit,
|
|
// token: token,
|
|
// startTime: startTime,
|
|
// endTime: endTime,
|
|
// needAuthor: needAuthor,
|
|
// signKey: signKey,
|
|
// privateKey: privateKey,
|
|
// ),
|
|
// callBack: callBack);
|
|
// }
|
|
|
|
// 添加指纹开始(带限时、循环、胁迫...)
|
|
static void senderAddFingerprintWithTimeCycleCoercionCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? fingerNo,
|
|
required int? useCountLimit,
|
|
required int? isForce,
|
|
required int? isAdmin,
|
|
required int? operate,
|
|
required List<int>? token,
|
|
required int? isRound,
|
|
required int? weekRound,
|
|
required int? startDate,
|
|
required int? endDate,
|
|
required String? startTime,
|
|
required String? endTime,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
required bool? isBeforeAddUser,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderAddFingerprintWithTimeCycleCoercionCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
fingerNo: fingerNo,
|
|
useCountLimit: useCountLimit,
|
|
isForce: isForce,
|
|
operate: operate,
|
|
isAdmin: isAdmin,
|
|
token: token,
|
|
isRound: isRound,
|
|
weekRound: weekRound,
|
|
startDate: startDate,
|
|
endDate: endDate,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser!,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 取消添加指纹
|
|
static void senderCancelAddFingerprintCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderCancelAddFingerprintCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 添加卡开始旧版
|
|
// static void senderAddICCardCommand(
|
|
// {required String? keyID,
|
|
// required String? userID,
|
|
// required int? cardNo,
|
|
// required int? useCountLimit,
|
|
// required List<int>? token,
|
|
// required int? startTime,
|
|
// required int? endTime,
|
|
// required int? needAuthor,
|
|
// required List<int>? signKey,
|
|
// required List<int>? privateKey,
|
|
// CommandSendCallBack? callBack}) {
|
|
// CommandSenderManager().managerSendData(
|
|
// command: SenderAddICCardCommand(
|
|
// keyID: keyID,
|
|
// userID: userID,
|
|
// cardNo: cardNo,
|
|
// useCountLimit: useCountLimit,
|
|
// token: token,
|
|
// startTime: startTime,
|
|
// endTime: endTime,
|
|
// needAuthor: needAuthor,
|
|
// signKey: signKey,
|
|
// privateKey: privateKey,
|
|
// ),
|
|
// callBack: callBack);
|
|
// }
|
|
|
|
// 添加卡开始(带限时、循环、胁迫...)
|
|
static void senderAddCardWithTimeCycleCoercionCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? cardNo,
|
|
required int? useCountLimit,
|
|
required int? operate,
|
|
required int? isAdmin,
|
|
required int? isForce,
|
|
required List<int>? token,
|
|
required int? isRound,
|
|
required int? weekRound,
|
|
required int? startDate,
|
|
required int? endDate,
|
|
required String? startTime,
|
|
required String? endTime,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
required bool? isBeforeAddUser,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderAddICCardWithTimeCycleCoercionCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
cardNo: cardNo,
|
|
useCountLimit: useCountLimit,
|
|
operate: operate,
|
|
isAdmin: isAdmin,
|
|
isForce: isForce,
|
|
token: token,
|
|
isRound: isRound,
|
|
weekRound: weekRound,
|
|
startDate: startDate,
|
|
endDate: endDate,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser!,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 取消添加指纹
|
|
static void senderCancelAddCardCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderCancelAddCardCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 添加遥控开始(带限时、循环、胁迫...)
|
|
static void senderAddRemoteControlWithTimeCycleCoercionCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? remoteControlNo,
|
|
required int? useCountLimit,
|
|
required int? operate,
|
|
required int? isAdmin,
|
|
required int? isForce,
|
|
required List<int>? token,
|
|
required int? isRound,
|
|
required int? weekRound,
|
|
required int? startDate,
|
|
required int? endDate,
|
|
required String? startTime,
|
|
required String? endTime,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
required bool? isBeforeAddUser,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderAddRemoteControlWithTimeCycleCoercionCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
remoteControlNo: remoteControlNo,
|
|
useCountLimit: useCountLimit,
|
|
operate: operate,
|
|
isAdmin: isAdmin,
|
|
isForce: isForce,
|
|
token: token,
|
|
isRound: isRound,
|
|
weekRound: weekRound,
|
|
startDate: startDate,
|
|
endDate: endDate,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser!,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 取消添加遥控
|
|
static void senderCancelAddRemoteControlCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderCancelAddRemoteControlCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 添加人脸开始
|
|
static void senderAddFaceCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? faceNo,
|
|
required int? useCountLimit,
|
|
required int? isForce,
|
|
required int? operate,
|
|
required int? isAdmin,
|
|
required List<int>? token,
|
|
required int? isRound,
|
|
required int? weekRound,
|
|
required int? startDate,
|
|
required int? endDate,
|
|
required String? startTime,
|
|
required String? endTime,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
required bool? isBeforeAddUser,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderAddFaceCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
faceNo: faceNo,
|
|
useCountLimit: useCountLimit,
|
|
isForce: isForce,
|
|
operate: operate,
|
|
isAdmin: isAdmin,
|
|
token: token,
|
|
isRound: isRound,
|
|
weekRound: weekRound,
|
|
startDate: startDate,
|
|
endDate: endDate,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser ?? false,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 取消添加人脸
|
|
static void senderCancelAddFaceCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderCancelAddFaceCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 添加掌静脉开始(带限时、循环、胁迫...)
|
|
static void senderAddPalmWithTimeCycleCoercionCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? palmNo,
|
|
required int? useCountLimit,
|
|
required int? operate,
|
|
required int? isAdmin,
|
|
required int? isForce,
|
|
required List<int>? token,
|
|
required int? isRound,
|
|
required int? weekRound,
|
|
required int? startDate,
|
|
required int? endDate,
|
|
required String? startTime,
|
|
required String? endTime,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
required bool? isBeforeAddUser,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderAddPalmWithTimeCycleCoercionCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
palmNo: palmNo,
|
|
useCountLimit: useCountLimit,
|
|
operate: operate,
|
|
isAdmin: isAdmin,
|
|
isForce: isForce,
|
|
token: token,
|
|
isRound: isRound,
|
|
weekRound: weekRound,
|
|
startDate: startDate,
|
|
endDate: endDate,
|
|
startTime: startTime,
|
|
endTime: endTime,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
isBeforeAddUser: isBeforeAddUser!,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 取消添加掌静脉
|
|
static void senderCancelAddPalmCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderCancelAddPalmCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 校验时间
|
|
static void senderTimingCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? nowTime,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: TimingCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
nowTime: nowTime,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 事件记录(时间查询)
|
|
static void senderReferEventRecordTimeCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? logsCount,
|
|
required int? time,
|
|
required int? currentDate,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderReferEventRecordTimeCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
logsCount: logsCount,
|
|
time: time,
|
|
currentDate: currentDate,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// wifi列表
|
|
static void getWifiListCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderGetWifiCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 配置wifi
|
|
static void senderConfiguringWifiCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required String? ssid,
|
|
required String? password,
|
|
required String? peerId,
|
|
required int? numberOfServers,
|
|
required List<int>? listOfServers,
|
|
required int? numberOfPhone,
|
|
required List<String>? listOfPhone,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderConfiguringWifiCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
ssid: ssid,
|
|
password: password,
|
|
peerId: peerId,
|
|
numberOfServers: numberOfServers,
|
|
listOfServers: listOfServers,
|
|
numberOfPhone: numberOfPhone,
|
|
listOfPhone: listOfPhone,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 添加胁迫指纹
|
|
// static void senderAddStressFingerprintCommand(
|
|
// {required String? keyID,
|
|
// required String? userID,
|
|
// required int? fingerNo,
|
|
// required int? fingerType,
|
|
// required int? useCountLimit,
|
|
// required List<int>? token,
|
|
// required int? startTime,
|
|
// required int? endTime,
|
|
// required int? needAuthor,
|
|
// required List<int>? publicKey,
|
|
// required List<int>? privateKey,
|
|
// required List<int>? signKey,
|
|
// CommandSendCallBack? callBack}) {
|
|
// CommandSenderManager().managerSendData(
|
|
// command: SenderAddStressFingerprintCommand(
|
|
// keyID: keyID,
|
|
// userID: userID,
|
|
// fingerNo: fingerNo,
|
|
// fingerType: fingerType,
|
|
// useCountLimit: useCountLimit,
|
|
// token: token,
|
|
// startTime: startTime,
|
|
// endTime: endTime,
|
|
// needAuthor: needAuthor,
|
|
// publicKey: publicKey,
|
|
// privateKey: privateKey,
|
|
// signKey: signKey),
|
|
// callBack: callBack);
|
|
// }
|
|
|
|
// 添加胁迫卡片
|
|
// static void senderAddStressICCardCommand(
|
|
// {required String? keyID,
|
|
// required String? userID,
|
|
// required int? icCardNo,
|
|
// required int? cardType,
|
|
// required int? useCountLimit,
|
|
// required List<int>? token,
|
|
// required int? startTime,
|
|
// required int? endTime,
|
|
// required int? needAuthor,
|
|
// required List<int>? publicKey,
|
|
// required List<int>? privateKey,
|
|
// required List<int>? signKey,
|
|
// CommandSendCallBack? callBack}) {
|
|
// CommandSenderManager().managerSendData(
|
|
// command: SenderAddStressICCardCommand(
|
|
// keyID: keyID,
|
|
// userID: userID,
|
|
// icCardNo: icCardNo,
|
|
// cardType: cardType,
|
|
// useCountLimit: useCountLimit,
|
|
// token: token,
|
|
// startTime: startTime,
|
|
// endTime: endTime,
|
|
// needAuthor: needAuthor,
|
|
// publicKey: publicKey,
|
|
// privateKey: privateKey,
|
|
// signKey: signKey),
|
|
// callBack: callBack);
|
|
// }
|
|
|
|
// 读取支持功能(不带参数)启用/禁用
|
|
static void readSupportFunctionsNoParametersCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? featureBit,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: ReadSupportFunctionsNoParametersCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
featureBit: featureBit,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 设置支持功能(不带参数)启用/禁用
|
|
static void setSupportFunctionsNoParametersCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? featureBit,
|
|
required int? featureEnable,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SetSupportFunctionsNoParametersCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
featureBit: featureBit,
|
|
featureEnable: featureEnable,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 读取支持功能(带参数)启用/禁用
|
|
static void readSupportFunctionsWithParametersCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? featureBit,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: ReadSupportFunctionsWithParametersCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
featureBit: featureBit,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 设置支持功能(带参数)启用/禁用
|
|
static void setSupportFunctionsWithParametersCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? featureBit,
|
|
required int? featureParaLength,
|
|
required List<int>? featureData,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SetSupportFunctionsWithParametersCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
featureBit: featureBit,
|
|
featureParaLength: featureParaLength,
|
|
featureData: featureData,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 读取管理员密码
|
|
static void senderReadAdminPasswordCommand(
|
|
{required String? keyID,
|
|
required String? userID,
|
|
required int? role,
|
|
required int? pwdNum,
|
|
required int? pwdNo,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: SenderReadAdminPasswordCommand(
|
|
keyID: keyID,
|
|
userID: userID,
|
|
role: role,
|
|
pwdNum: pwdNum,
|
|
pwdNo: pwdNo,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
//开始ota 升级
|
|
static void senderOTAUpgradeCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required String? keyID,
|
|
required int? platform,
|
|
required int? product,
|
|
required String? hwVersion,
|
|
required String? fwVersion,
|
|
required int? fwSize,
|
|
required String? fwMD5,
|
|
required int? needAuthor,
|
|
required List<int>? token,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: OTAUpgradeCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
keyID: keyID,
|
|
platform: platform,
|
|
product: product,
|
|
hwVersion: hwVersion,
|
|
fwVersion: fwVersion,
|
|
fwSize: fwSize,
|
|
fwMD5: fwMD5,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
//ota 升级过程
|
|
static void senderProcessOtaUpgradeCommand(
|
|
{required int? index,
|
|
required int? size,
|
|
required List<int>? data,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: ProcessOtaUpgradeCommand(
|
|
index: index,
|
|
size: size,
|
|
data: data,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
//清理清理用户
|
|
static void senderCleanUpUsersCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required String? keyID,
|
|
required String? authUserID,
|
|
required int? needAuthor,
|
|
required List<int>? userNoList,
|
|
required List<int>? token,
|
|
required List<int>? publicKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: CleanUpUsersCommand(
|
|
lockID: lockID,
|
|
authUserID: authUserID,
|
|
keyID: keyID,
|
|
userID: userID,
|
|
needAuthor: needAuthor,
|
|
publicKey: publicKey,
|
|
privateKey: privateKey,
|
|
userNoList: userNoList,
|
|
token: token,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 上传数据获取锁密码列表
|
|
static void updataLockPasswordListCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? page,
|
|
required int? countReq,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: UpdataLockPasswordListCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
page: page,
|
|
countReq: countReq,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 上传数据获取锁密码列表
|
|
static void updataLockCardListCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? page,
|
|
required int? countReq,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: UpdataLockCardListCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
page: page,
|
|
countReq: countReq,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 上传数据获取锁指纹列表
|
|
static void updataLockFingerprintListCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? page,
|
|
required int? countReq,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: UpdataLockFingerprintListCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
page: page,
|
|
countReq: countReq,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 上传数据获取锁人脸列表
|
|
static void updataLockFaceListCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? page,
|
|
required int? countReq,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: UpdataLockFaceListCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
page: page,
|
|
countReq: countReq,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 上传数据获取锁掌静脉列表
|
|
static void updataLockPalmVeinListCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? page,
|
|
required int? countReq,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: UpdataLockPalmVeinListCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
page: page,
|
|
countReq: countReq,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 上传数据获取锁掌静脉列表
|
|
static void updataLockRemoteControlListCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required int? page,
|
|
required int? countReq,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: UpdataLockRemoteControlListCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
page: page,
|
|
countReq: countReq,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 上传数据获取锁设置
|
|
static void updataLockSetCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
required List<int>? token,
|
|
required int? needAuthor,
|
|
required List<int>? signKey,
|
|
required List<int>? privateKey,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: UpdataLockSetCommand(
|
|
lockID: lockID,
|
|
userID: userID,
|
|
token: token,
|
|
needAuthor: needAuthor,
|
|
signKey: signKey,
|
|
privateKey: privateKey,
|
|
),
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 网关获取wifi列表
|
|
static void gatewayGetWifiCommand(
|
|
{required String? userID, CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: GatewayGetWifiCommand(
|
|
userID: userID,
|
|
),
|
|
isBeforeAddUser: true,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 网关配网
|
|
static void gatewayConfiguringWifiCommand(
|
|
{required String? ssid,
|
|
required String? password,
|
|
required String? gatewayConfigurationStr,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: GatewayConfiguringWifiCommand(
|
|
ssid: ssid,
|
|
password: password,
|
|
gatewayConfigurationStr: gatewayConfigurationStr),
|
|
isBeforeAddUser: true,
|
|
callBack: callBack);
|
|
}
|
|
|
|
// 获取网关状态
|
|
static void gatewayGetStatusCommand(
|
|
{required String? lockID,
|
|
required String? userID,
|
|
CommandSendCallBack? callBack}) {
|
|
CommandSenderManager().managerSendData(
|
|
command: GatewayGetStatusCommand(lockID: lockID, userID: userID),
|
|
isBeforeAddUser: true,
|
|
callBack: callBack);
|
|
}
|
|
}
|