#ifndef TACTILEIPC3D_SERIAL_CODEC_H
#define TACTILEIPC3D_SERIAL_CODEC_H

#include <QByteArray>
#include <QString>

#include "serial_types.h"

class ISerialCodec {
public:
    virtual ~ISerialCodec() = default;
    virtual QString name() const = 0;

    virtual QByteArray buildRequest(const SerialConfig& config, const SensorRequest& request) = 0;

    // Reserved hooks for later expansion
    // TODO:待实现内容(构建获取版本号的请求帧)
    virtual QByteArray buildGetVersionRequest(const SerialConfig& config) = 0;
    // TODO:待实现内容(构建获取传感器规格的请求帧)
    virtual QByteArray buildGetSpecRequest(const SerialConfig& config) = 0;
};

#endif // TACTILEIPC3D_SERIAL_CODEC_H
