yeg
2026-09-28 147428971be43eed90a79f3849f15000d3855390
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.battery.device.api.model;
 
import java.time.Instant;
 
/**
 * 发现结果中的一个通道。
 * {@code lastDataAt} 是来源里最近一次采样行的设备时间;它是"最近是否有新采样行写入"这一条依据的取值,
 * 与设备结束时间或通道水位线列无关。来源不提供该事实时保持为空。
 */
public record DetectedChannel(ChannelIdentity identity, String serverIp, boolean available,
        DetectedDeviceMetadata deviceMetadata, Instant lastDataAt)
{
    public DetectedChannel(ChannelIdentity identity, String serverIp, boolean available)
    {
        this(identity, serverIp, available, DetectedDeviceMetadata.empty(), null);
    }
 
    public DetectedChannel(ChannelIdentity identity, String serverIp, boolean available,
            DetectedDeviceMetadata deviceMetadata)
    {
        this(identity, serverIp, available, deviceMetadata, null);
    }
}