package com.dcs.equipment.exception.device;

import lombok.Data;

/**
 * 设备超时异常
 * @author: wangpx
 * @date: 2025-07-22 16:13
 */
@Data
public class DeviceTimeoutException extends DeviceException {
    private static final long serialVersionUID = 1L;
    private String deviceAddress;
    private Integer devicePort;
    private Long timeoutDuration;
    private String operationType;

    public DeviceTimeoutException() {
        super();
    }

    public DeviceTimeoutException(String message) {
        super(message);
    }

    public DeviceTimeoutException(String message, Integer code) {
        super(message, code);
    }

    public DeviceTimeoutException(String message, String deviceAddress, Integer devicePort) {
        super(message);
        this.deviceAddress = deviceAddress;
        this.devicePort = devicePort;
    }

    public DeviceTimeoutException(String message, Integer code, String deviceAddress, Integer devicePort) {
        super(message, code);
        this.deviceAddress = deviceAddress;
        this.devicePort = devicePort;
    }

    public DeviceTimeoutException(String message, String deviceAddress, Integer devicePort, Long timeoutDuration, String operationType) {
        super(message);
        this.deviceAddress = deviceAddress;
        this.devicePort = devicePort;
        this.timeoutDuration = timeoutDuration;
        this.operationType = operationType;
    }

    public DeviceTimeoutException(String message, Integer code, String deviceAddress, Integer devicePort, Long timeoutDuration, String operationType) {
        super(message, code);
        this.deviceAddress = deviceAddress;
        this.devicePort = devicePort;
        this.timeoutDuration = timeoutDuration;
        this.operationType = operationType;
    }

    public DeviceTimeoutException(Exception e) {
        super(e);
    }

    public DeviceTimeoutException(Exception e, String deviceAddress, Integer devicePort) {
        super(e);
        this.deviceAddress = deviceAddress;
        this.devicePort = devicePort;
    }
} 