package com.zehong.system.domain.modbus;

import java.util.Map;

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

//    equipmentId
    private Long id;

    private String deviceCode;

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

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

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

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

    /** 断电层IP地址 */
    private String fPowerOutageIp;

    /** 断电层端口号 */
    private Integer fPowerOutagePort;

    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;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getfPowerOutageIp() {
        return fPowerOutageIp;
    }

    public void setfPowerOutageIp(String fPowerOutageIp) {
        this.fPowerOutageIp = fPowerOutageIp;
    }

    public Integer getfPowerOutagePort() {
        return fPowerOutagePort;
    }

    public void setfPowerOutagePort(Integer fPowerOutagePort) {
        this.fPowerOutagePort = fPowerOutagePort;
    }
}
