- removed IFormatter
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@1070 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
+8
-11
@@ -8,36 +8,33 @@
|
||||
#include "FrameDefs.hpp"
|
||||
#include "Scrambler.hpp"
|
||||
|
||||
class IFormatter
|
||||
{
|
||||
public:
|
||||
IFormatter() {}
|
||||
virtual ~IFormatter() {}
|
||||
virtual void onFrame(void *pFrame, uint32_t size) = 0;
|
||||
};
|
||||
|
||||
class Formatter : public Processor::Block
|
||||
{
|
||||
public:
|
||||
Formatter(IFormatter *pFrameHandler);
|
||||
Formatter();
|
||||
virtual ~Formatter() = default;
|
||||
void process(void *pData, uint32_t len);
|
||||
frame_statistics_t getStats();
|
||||
void resetStats();
|
||||
void process();
|
||||
|
||||
// Processor::Block
|
||||
void prepare() override;
|
||||
void process() override;
|
||||
|
||||
private:
|
||||
Scrambler m_scrambler;
|
||||
IFormatter *m_pFrameHandler;
|
||||
frame_t m_frame;
|
||||
uint32_t m_dataCount;
|
||||
uint32_t m_idleCount;
|
||||
frame_statistics_t m_frameStats;
|
||||
Processor::Buffer<uint8_t> *m_buf_in;
|
||||
Processor::Buffer<uint8_t> *m_buf_out;
|
||||
|
||||
void process_idle(uint32_t len);
|
||||
void process_data(uint8_t *pData, uint32_t len);
|
||||
|
||||
void commit(frame_type frameType, uint32_t m_dataCount);
|
||||
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user