package com.ruoyi.device.domain.api; import com.ruoyi.device.domain.model.thingsboard.AttributeMap; import com.ruoyi.device.domain.model.thingsboard.DeviceInfo; import com.ruoyi.device.domain.model.thingsboard.TelemetryMap; import java.util.List; /** * ThingsBoard设备服务接口 * 提供类型安全的设备查询功能 */ public interface IThingsBoardDomain { /** * 获取所有设备的迭代器 * 每次迭代返回一页设备列表 * * @return 设备迭代器 */ Iterable> getAllDevices(); /** * 根据设备ID获取设备的所有属性 * 只返回已注册的属性键对应的数据,未注册的键会被忽略 * * @param deviceId 设备ID * @return 类型安全的属性映射 */ AttributeMap getDeviceAttributes(String deviceId); /** * 根据设备ID获取设备的所有遥测数据 * 只返回已注册的遥测键对应的数据,未注册的键会被忽略 * * @param deviceId 设备ID * @return 类型安全的遥测数据映射 */ TelemetryMap getDeviceTelemetry(String deviceId); /** * 根据设备ID获取设备的预定义属性 * 只返回在 DeviceAttributes 中预定义的属性 * * @param deviceId 设备ID * @return 类型安全的属性映射,只包含预定义的属性 */ AttributeMap getPredefinedDeviceAttributes(String deviceId); /** * 根据设备ID获取设备的预定义遥测数据 * 只返回在 DeviceTelemetry 中预定义的遥测数据 * * @param deviceId 设备ID * @return 类型安全的遥测数据映射,只包含预定义的遥测数据 */ TelemetryMap getPredefinedDeviceTelemetry(String deviceId); }