#pragma once

#include <cstdint>
#include <memory>

#include "../Common/serial_port.hpp"

class CanMv {
public:
    explicit CanMv(UART_HandleTypeDef* uart)
        : serialPort(std::make_unique<SerialPort>(uart, kBaudRate, kLength, kTimeout)) {}

    ~CanMv()                       = default;
    CanMv(const CanMv&)            = delete;
    CanMv& operator=(const CanMv&) = delete;
    CanMv(CanMv&&)                 = delete;
    CanMv& operator=(CanMv&&)      = delete;

private:
    static constexpr uint32_t kBaudRate = 115200;
    static constexpr uint32_t kLength   = 128;
    static constexpr uint32_t kTimeout  = 10;
    std::unique_ptr<SerialPort> serialPort;
};
