- refactored Frame to FrameReceiver
git-svn-id: http://moon:8086/svn/software/trunk/projects/mpsk_rx_gui@1086 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
// --------------------------------------------------------------
|
||||||
|
#include "FrameReceiver.hpp"
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
// --------------------------------------------------------------
|
||||||
|
#ifndef _RADIO_FRAME_HPP_
|
||||||
|
#define _RADIO_FRAME_HPP_
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <radio/radio_types.h>
|
||||||
|
#include <radio/cpx.h>
|
||||||
|
#include <cpp/radio/DeSymbolizer.hpp>
|
||||||
|
#include <cpp/radio/DeFormatter.hpp>
|
||||||
|
#include <cpp/radio/processor/src/Block.hpp>
|
||||||
|
|
||||||
|
class FrameReceiver : public Processor::Block
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FrameReceiver()
|
||||||
|
: Processor::Block(1, 1)
|
||||||
|
, m_desymbolizer()
|
||||||
|
, m_deformatter()
|
||||||
|
, m_framesCount(0)
|
||||||
|
, m_byteCount(0)
|
||||||
|
, m_buf_symbol_in(nullptr)
|
||||||
|
, m_buf_byte_out(nullptr)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
~FrameReceiver()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
frame_statistics_t getStats()
|
||||||
|
{
|
||||||
|
return m_deformatter.getStats();
|
||||||
|
}
|
||||||
|
|
||||||
|
void resetStats()
|
||||||
|
{
|
||||||
|
m_deformatter.resetStats();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setNumBitsPerSymbol(uint32_t nBitsPerSym)
|
||||||
|
{
|
||||||
|
m_desymbolizer.setNumBitsPerSymbol(nBitsPerSym);
|
||||||
|
m_deformatter.resetStats();
|
||||||
|
}
|
||||||
|
|
||||||
|
void prepare()
|
||||||
|
{
|
||||||
|
m_buf_symbol_in = buffer_in<symbol_t>();
|
||||||
|
// m_buf_byte_out = buffer_out<uint8_t>();
|
||||||
|
m_buf_byte_in.resize(m_buf_symbol_in->capacity());
|
||||||
|
|
||||||
|
m_desymbolizer.buffer_in_add(m_buf_symbol_in);
|
||||||
|
m_desymbolizer.buffer_out_add(&m_buf_byte_in);
|
||||||
|
m_desymbolizer.prepare();
|
||||||
|
|
||||||
|
m_deformatter.buffer_in_add(&m_buf_byte_in);
|
||||||
|
m_deformatter.buffer_out_add(m_buf_byte_out);
|
||||||
|
m_deformatter.prepare();
|
||||||
|
}
|
||||||
|
|
||||||
|
void process()
|
||||||
|
{
|
||||||
|
m_desymbolizer.process();
|
||||||
|
m_deformatter.process();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
DeSymbolizer m_desymbolizer;
|
||||||
|
DeFormatter m_deformatter;
|
||||||
|
uint32_t m_framesCount;
|
||||||
|
uint32_t m_byteCount;
|
||||||
|
Processor::Buffer<symbol_t> *m_buf_symbol_in;
|
||||||
|
Processor::Buffer<uint8_t> *m_buf_byte_out;
|
||||||
|
Processor::Buffer<uint8_t> m_buf_byte_in;
|
||||||
|
};
|
||||||
|
|
||||||
|
// --------------------------------------------------------------
|
||||||
|
#endif // _RADIO_FRAME_HPP_
|
||||||
@@ -6,6 +6,7 @@ NAME := Source
|
|||||||
CXX_SRCS := GraphComponent.cpp
|
CXX_SRCS := GraphComponent.cpp
|
||||||
CXX_SRCS += LogComponent.cpp
|
CXX_SRCS += LogComponent.cpp
|
||||||
CXX_SRCS += Receiver.cpp
|
CXX_SRCS += Receiver.cpp
|
||||||
|
CXX_SRCS += FrameReceiver.cpp
|
||||||
CXX_SRCS += Transmitter.cpp
|
CXX_SRCS += Transmitter.cpp
|
||||||
CXX_SRCS += ControlComponent.cpp
|
CXX_SRCS += ControlComponent.cpp
|
||||||
CXX_SRCS += IQPoint.cpp
|
CXX_SRCS += IQPoint.cpp
|
||||||
|
|||||||
+2
-3
@@ -1,7 +1,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include "Receiver.hpp"
|
#include "Receiver.hpp"
|
||||||
#include "MinMaxLemire.h"
|
#include "MinMaxLemire.h"
|
||||||
#include <cpp/radio/Frame.hpp>
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#include <radio/ComplexVector.hpp>
|
#include <radio/ComplexVector.hpp>
|
||||||
@@ -22,8 +21,8 @@ const radio_float_t CPR_GAIN_LAG_TRK = (radio_float_t)1.00E-9; // 5E-7
|
|||||||
|
|
||||||
const radio_float_t STR_GAIN_LEAD_AQU = (radio_float_t)4.00E-4; // 2E-3
|
const radio_float_t STR_GAIN_LEAD_AQU = (radio_float_t)4.00E-4; // 2E-3
|
||||||
const radio_float_t STR_GAIN_LAG_AQU = (radio_float_t)0.50E-6; // 5E-7
|
const radio_float_t STR_GAIN_LAG_AQU = (radio_float_t)0.50E-6; // 5E-7
|
||||||
const radio_float_t STR_GAIN_LEAD_TRK = (radio_float_t)4.00E-6; // 8E-4
|
const radio_float_t STR_GAIN_LEAD_TRK = (radio_float_t)8.00E-5; // 8E-4
|
||||||
const radio_float_t STR_GAIN_LAG_TRK = (radio_float_t)1.00E-9; // 1E-6
|
const radio_float_t STR_GAIN_LAG_TRK = (radio_float_t)1.00E-7; // 1E-6
|
||||||
|
|
||||||
const radio_float_t AGC_INITIAL_VALUE = (radio_float_t)2.0;
|
const radio_float_t AGC_INITIAL_VALUE = (radio_float_t)2.0;
|
||||||
const radio_float_t AGC_ADAPTION_RATE_ACQ = (radio_float_t)0.01;
|
const radio_float_t AGC_ADAPTION_RATE_ACQ = (radio_float_t)0.01;
|
||||||
|
|||||||
+1
-1
@@ -7,10 +7,10 @@
|
|||||||
#include <radio/interpolation.h>
|
#include <radio/interpolation.h>
|
||||||
#include <radio/statistics.h>
|
#include <radio/statistics.h>
|
||||||
#include <radio/agc.h>
|
#include <radio/agc.h>
|
||||||
#include <cpp/radio/Frame.hpp>
|
|
||||||
|
|
||||||
#include <JuceHeader.h>
|
#include <JuceHeader.h>
|
||||||
#include "LogComponent.h"
|
#include "LogComponent.h"
|
||||||
|
#include "FrameReceiver.hpp"
|
||||||
|
|
||||||
#include <cpp/radio/Vector.hpp>
|
#include <cpp/radio/Vector.hpp>
|
||||||
#include <cpp/radio/FirComplex.hpp>
|
#include <cpp/radio/FirComplex.hpp>
|
||||||
|
|||||||
@@ -4,13 +4,14 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <radio/symbol.h>
|
#include <radio/symbol.h>
|
||||||
#include <radio/interpolation.h>
|
#include <radio/interpolation.h>
|
||||||
#include <cpp/radio/Frame.hpp>
|
|
||||||
|
|
||||||
#include "JuceHeader.h"
|
#include "JuceHeader.h"
|
||||||
#include "LogComponent.h"
|
#include "LogComponent.h"
|
||||||
|
|
||||||
#include <cpp/radio/Vector.hpp>
|
#include <cpp/radio/Vector.hpp>
|
||||||
#include <cpp/radio/Nco.hpp>
|
#include <cpp/radio/Nco.hpp>
|
||||||
|
#include <cpp/radio/Formatter.hpp>
|
||||||
|
#include <cpp/radio/Symbolizer.hpp>
|
||||||
#include <cpp/radio/interpolation/UpSampler.hpp>
|
#include <cpp/radio/interpolation/UpSampler.hpp>
|
||||||
|
|
||||||
#include "TransmitterInterface.hpp"
|
#include "TransmitterInterface.hpp"
|
||||||
|
|||||||
Reference in New Issue
Block a user