绑定设备+覆盖模式+控制显示bug+在线更新
This commit is contained in:
@@ -10,6 +10,7 @@ class DeviceEntity {
|
||||
final double? current;
|
||||
final double? voltage;
|
||||
final double? radiation;
|
||||
final bool isRobot;
|
||||
|
||||
const DeviceEntity({
|
||||
required this.deviceId,
|
||||
@@ -22,5 +23,6 @@ class DeviceEntity {
|
||||
this.current,
|
||||
this.voltage,
|
||||
this.radiation,
|
||||
this.isRobot = false,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,4 +5,5 @@ import '../entities/device_status_entity.dart';
|
||||
abstract class DeviceRepository {
|
||||
Future<DeviceStatusEntity> getDeviceStatus();
|
||||
Future<List<DeviceEntity>> getDeviceList({int? siteId, String? typeFilter});
|
||||
Future<List<DeviceEntity>> getAllDevices();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import '../entities/device_entity.dart';
|
||||
import '../repositories/device_repository.dart';
|
||||
|
||||
/// 获取全部设备列表用例(用于蓝牙绑定匹配)
|
||||
class GetAllDevicesUseCase {
|
||||
final DeviceRepository repository;
|
||||
|
||||
const GetAllDevicesUseCase({required this.repository});
|
||||
|
||||
Future<List<DeviceEntity>> execute() async {
|
||||
return await repository.getAllDevices();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user