2026-06-24 f4bd1f3c89d906131495a0aca5aaf82966378510
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package cn.iocoder.yudao.module.iot.dal.dataobject.device;
 
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
import cn.iocoder.yudao.module.iot.dal.dataobject.thingmodel.IotThingModelDO;
import cn.iocoder.yudao.module.iot.core.enums.modbus.IotModbusByteOrderEnum;
import cn.iocoder.yudao.module.iot.core.enums.modbus.IotModbusRawDataTypeEnum;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
 
import java.math.BigDecimal;
 
/**
 * IoT 设备 Modbus 点位配置 DO
 *
 * @author 芋道源码
 */
@TableName("iot_device_modbus_point")
@KeySequence("iot_device_modbus_point_seq")
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class IotDeviceModbusPointDO extends TenantBaseDO {
 
    /**
     * 主键
     */
    @TableId
    private Long id;
    /**
     * 设备编号
     *
     * 关联 {@link IotDeviceDO#getId()}
     */
    private Long deviceId;
    /**
     * 物模型属性编号
     *
     * 关联 {@link IotThingModelDO#getId()}
     */
    private Long thingModelId;
    /**
     * 属性标识符
     *
     * 冗余 {@link IotThingModelDO#getIdentifier()}
     */
    private String identifier;
    /**
     * 属性名称
     *
     * 冗余 {@link IotThingModelDO#getName()}
     */
    private String name;
 
    // ========== Modbus 协议配置 ==========
 
    /**
     * Modbus 功能码
     *
     * 取值范围:FC01-04(读线圈、读离散输入、读保持寄存器、读输入寄存器)
     */
    private Integer functionCode;
    /**
     * 寄存器起始地址
     */
    private Integer registerAddress;
    /**
     * 寄存器数量
     */
    private Integer registerCount;
    /**
     * 字节序
     *
     * 枚举 {@link IotModbusByteOrderEnum}
     */
    private String byteOrder;
    /**
     * 原始数据类型
     *
     * 枚举 {@link IotModbusRawDataTypeEnum}
     */
    private String rawDataType;
    /**
     * 缩放因子
     */
    private BigDecimal scale;
    /**
     * 轮询间隔(毫秒)
     */
    private Integer pollInterval;
    /**
     * 状态
     *
     * 枚举 {@link cn.iocoder.yudao.framework.common.enums.CommonStatusEnum}
     */
    private Integer status;
 
}