yeg
2026-09-29 b78295e8da96c3e5e76befeef9582ce5273dbb74
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.battery.device.api.model;
 
import java.util.Objects;
 
public record ChannelIdentity(
        String adapterCode,
        int devtype,
        int devid,
        int subdevid,
        int chlid)
{
    public ChannelIdentity
    {
        adapterCode = Objects.requireNonNull(adapterCode, "adapterCode").trim();
        if (adapterCode.isEmpty()) throw new IllegalArgumentException("adapterCode must not be blank");
        if (devtype < 0 || devid < 0 || subdevid < 0 || chlid < 0)
            throw new IllegalArgumentException("BTS channel identity values must be non-negative");
    }
 
    /** 返回不含适配器实例的厂商通道键,由设备类型、设备号、单元号和通道号拼成。 */
    public String vendorKey()
    {
        return devtype + "-" + devid + "-" + subdevid + "-" + chlid;
    }
}