#pragma once

#include <softbus_core/plugin/IParser.h>

#include <string>

namespace modbus {

class ModbusParser : public softbus::core::IParser {
public:
    explicit ModbusParser(std::string defaultObjectRef = {});

    softbus::core::ParseResult parseFrame(const uint8_t* data, std::size_t size,
                                          const std::string& sourceId) override;
    const char* protocolName() const override { return "modbus"; }

private:
    std::string defaultObjectRef_;
};

} // namespace modbus
