package com.zehong.system.modbus.handler.dto;

import java.util.Arrays;

/**
 * @author lenovo
 * @date 2025/6/27
 * @description TODO
 */
public class DeviceStatusReaderDto {
    private String ip;
    private int port;
    private int deviceId;
    private int[] registerData;

    public DeviceStatusReaderDto(String ip, int port, int deviceId, int[] registerData) {
        this.ip = ip;
        this.port = port;
        this.deviceId = deviceId;
        this.registerData = registerData;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(int deviceId) {
        this.deviceId = deviceId;
    }

    public int[] getRegisterData() {
        return registerData;
    }

    public void setRegisterData(int[] registerData) {
        this.registerData = registerData;
    }
    @Override
    public String toString() {
        return "ModbusResult{" +
                "ip='" + ip + '\'' +
                ", port=" + port +
                ", deviceId=" + deviceId +
                ", registerData=" + Arrays.toString(registerData) +
                '}';
    }
}
