#ifndef TACTILEIPC3D_SERIAL_DECODER_H
#define TACTILEIPC3D_SERIAL_DECODER_H

#include <QByteArray>
#include <QString>

#include "serial_types.h"
#include "../data_frame.h"

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

    virtual bool decodeFrame(const QByteArray& packet, DataFrame* frame, QString* error) = 0;

    // Reserved hooks for later expansion
    // TODO:待实现内容(解析规格回复帧并填充 SensorSpec)
    virtual bool decodeSpec(const QByteArray& packet, SensorSpec* spec, QString* error) = 0;
};

#endif // TACTILEIPC3D_SERIAL_DECODER_H
