#pragma once

#include <softbus_edge/ingress/IIngressPort.h>

#include <cstdint>
#include <string>

namespace softbus::edge {

class MockModbusIngress : public IIngressPort {
public:
    explicit MockModbusIngress(std::string objectRef, std::string runtimeDeviceId);

    bool open() override;
    void close() override;
    std::vector<softbus::core::RawPacket> poll() override;

private:
    std::vector<uint8_t> buildFrame(uint16_t registerValue) const;

    std::string objectRef_;
    std::string runtimeDeviceId_;
    bool open_{false};
    uint16_t counter_{100};
};

} // namespace softbus::edge
