package com.zehong.system.domain.modbus;

import java.util.Map;

/**
 * @author lenovo
 * @date 2025/6/9
 * @description modbus设备数据
 */
public class ModbusDeviceData {
    private String deviceCode;

    /** IP地址 */
    private String fIp;

    /** 端口号 */
    private Integer fPort;

    /**
     * 0空闲，1运行，2故障
     */
    private String deviceStatus;

    /**
     * 故障原因
     */
    private String errorReason;

    private Map<Integer, String> registerValues; // key: 寄存器地址, value: 读取结果

    public String getDeviceCode() {
        return deviceCode;
    }

    public void setDeviceCode(String deviceCode) {
        this.deviceCode = deviceCode;
    }

    public Map<Integer, String> getRegisterValues() {
        return registerValues;
    }

    public void setRegisterValues(Map<Integer, String> registerValues) {
        this.registerValues = registerValues;
    }

    public String getDeviceStatus() {
        return deviceStatus;
    }

    public void setDeviceStatus(String deviceStatus) {
        this.deviceStatus = deviceStatus;
    }

    public String getErrorReason() {
        return errorReason;
    }

    public void setErrorReason(String errorReason) {
        this.errorReason = errorReason;
    }

    public String getfIp() {
        return fIp;
    }

    public void setfIp(String fIp) {
        this.fIp = fIp;
    }

    public Integer getfPort() {
        return fPort;
    }

    public void setfPort(Integer fPort) {
        this.fPort = fPort;
    }
}
