
// TransportError / ModbusException (공통 에러 계층)
// transport_error.hpp
// 

// enum class TransportError {
//     None,
//     Disconnected,
//     Timeout,
//     ProtocolError,

//     IllegalFunction,
//     IllegalDataAddress,
//     IllegalDataValue,
//     SlaveDeviceFailure,

//     Acknowledge,
//     SlaveDeviceBusy,

//     ModbusException
// }; IlegalFunction, IllegalDataAddress, IllegalDataValue, SlaveDeviceFailure 는 ModbusException 으로 통합

#pragma once

enum class TransportError {
    None,

    // connection / IO
    Disconnected,
    Timeout,

    // framing / protocol
    ProtocolError,

    // remote device reported error (Modbus exception)
    RemoteError,

    // transient remote states
    InProgress,   // Modbus Acknowledge (0x05)
    Busy,          // Modbus SlaveDeviceBusy (0x06)

    Fault,
};



// 통신 오류 코드 열거형