mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Add the boilerplate for the Agat encoder.
This commit is contained in:
@@ -3,7 +3,13 @@
|
||||
|
||||
#define AGAT_SECTOR_SIZE 256
|
||||
|
||||
class Encoder;
|
||||
class EncoderProto;
|
||||
class Decoder;
|
||||
class DecoderProto;
|
||||
|
||||
extern std::unique_ptr<Decoder> createAgatDecoder(const DecoderProto& config);
|
||||
extern std::unique_ptr<Encoder> createAgatEncoder(const EncoderProto& config);
|
||||
|
||||
extern uint8_t agatChecksum(const Bytes& bytes);
|
||||
|
||||
|
||||
@@ -2,4 +2,5 @@ syntax = "proto2";
|
||||
|
||||
message AgatDecoderProto {}
|
||||
|
||||
message AgatEncoderProto {}
|
||||
|
||||
|
||||
37
arch/agat/encoder.cc
Normal file
37
arch/agat/encoder.cc
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "globals.h"
|
||||
#include "decoders/decoders.h"
|
||||
#include "encoders/encoders.h"
|
||||
#include "agat.h"
|
||||
#include "crc.h"
|
||||
#include "readerwriter.h"
|
||||
#include "image.h"
|
||||
#include "arch/agat/agat.pb.h"
|
||||
#include "lib/encoders/encoders.pb.h"
|
||||
|
||||
class AgatEncoder : public Encoder
|
||||
{
|
||||
public:
|
||||
AgatEncoder(const EncoderProto& config):
|
||||
Encoder(config),
|
||||
_config(config.agat())
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
std::unique_ptr<Fluxmap> encode(std::shared_ptr<const TrackInfo>& trackInfo,
|
||||
const std::vector<std::shared_ptr<const Sector>>& sectors,
|
||||
const Image& image) override
|
||||
{
|
||||
Error() << "unimplemented";
|
||||
}
|
||||
|
||||
private:
|
||||
const AgatEncoderProto& _config;
|
||||
};
|
||||
|
||||
|
||||
std::unique_ptr<Encoder> createAgatEncoder(const EncoderProto& config)
|
||||
{
|
||||
return std::unique_ptr<Encoder>(new AgatEncoder(config));
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ LIBARCH_SRCS = \
|
||||
arch/aeslanier/decoder.cc \
|
||||
arch/agat/agat.cc \
|
||||
arch/agat/decoder.cc \
|
||||
arch/agat/encoder.cc \
|
||||
arch/amiga/amiga.cc \
|
||||
arch/amiga/decoder.cc \
|
||||
arch/amiga/encoder.cc \
|
||||
|
||||
Reference in New Issue
Block a user