| | |
| | | import com.ruoyi.device.model.ChannelIdentity; |
| | | import com.ruoyi.device.model.DetectedChannel; |
| | | import com.ruoyi.device.model.DeviceControlCommand; |
| | | import com.ruoyi.device.model.HistoryAvailability; |
| | | import com.ruoyi.device.model.HistoryPage; |
| | | import com.ruoyi.device.model.RealtimeSnapshot; |
| | | |
| | | public interface DeviceAdapter extends AutoCloseable |
| | | { |
| | | /** 返回适配器实例的稳定代码。 */ |
| | | String adapterCode(); |
| | | |
| | | /** 返回运行时已启用的设备能力。 */ |
| | | AdapterCapabilities capabilities(); |
| | | |
| | | /** 发现当前端点可见的检测柜通道。 */ |
| | | List<DetectedChannel> discoverChannels(); |
| | | |
| | | /** 批量查询通道实时快照,不形成最终原始采集数据。 */ |
| | | Map<ChannelIdentity, RealtimeSnapshot> inquire(Set<ChannelIdentity> channels); |
| | | |
| | | /** 查询通道当前 BTS 测试的历史数据上传进度。 */ |
| | | List<HistoryAvailability> inquireHistory(Set<ChannelIdentity> channels); |
| | | |
| | | /** 分页下载单个通道的最终原始历史数据,每页最多 1000 条。 */ |
| | | HistoryPage downloadHistory(ChannelIdentity channel, String btsTestId, long startPosition, int limit); |
| | | |
| | | /** 执行设备控制;只读适配器始终拒绝该调用。 */ |
| | | default void control(ChannelIdentity channel, DeviceControlCommand command) |
| | | { |
| | | throw new UnsupportedOperationException("Device control is not enabled for this adapter"); |