#pragma once

#include <cstdint>
#include <variant>

#include "plugins/protocols/modbus_rtu/types/ModbusRtuPdu.h"

namespace softbus::message_bus::pipeline::protocol
{

enum class ProtocolFamily : std::uint8_t
{
    None = 0,
    ModbusRtu,
    CanOpen,
};

/// CANopen 协议占位类型（后续接入真实 CANopen 对象后替换/扩展）。
struct CanOpenPduPlaceholder
{
};

/// 流水线内协议解析结果的统一外壳；通过 variant 承载多协议强类型结果。
using ProtocolEnvelopePdu = std::variant<std::monostate, ModbusRtuPdu, CanOpenPduPlaceholder>;

struct ProtocolEnvelope
{
    ProtocolFamily         family{ProtocolFamily::None};
    ProtocolEnvelopePdu    pdu{};
};

} // namespace softbus::message_bus::pipeline::protocol
