aboutsummaryrefslogtreecommitdiffstats
path: root/src/DabModulator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/DabModulator.h')
-rw-r--r--src/DabModulator.h38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/DabModulator.h b/src/DabModulator.h
index 00d71f5..093a782 100644
--- a/src/DabModulator.h
+++ b/src/DabModulator.h
@@ -3,7 +3,7 @@
Her Majesty the Queen in Right of Canada (Communications Research
Center Canada)
- Copyright (C) 2019
+ Copyright (C) 2023
Matthias P. Braendli, matthias.braendli@mpb.li
http://opendigitalradio.org
@@ -39,6 +39,7 @@
#include "ConfigParser.h"
#include "EtiReader.h"
#include "Flowgraph.h"
+#include "FormatConverter.h"
#include "GainControl.h"
#include "OutputMemory.h"
#include "RemoteControl.h"
@@ -49,7 +50,10 @@
class DabModulator : public ModInput, public ModMetadata, public RemoteControllable
{
public:
- DabModulator(EtiSource& etiSource, mod_settings_t& settings);
+ DabModulator(EtiSource& etiSource, mod_settings_t& settings, const std::string& format);
+ // Allowed formats: s8, u8 and s16. Empty string means no conversion
+
+ virtual ~DabModulator() {}
int process(Buffer* dataOut) override;
const char* name() override { return "DabModulator"; }
@@ -57,30 +61,30 @@ public:
virtual meta_vec_t process_metadata(const meta_vec_t& metadataIn) override;
/* Required to get the timestamp */
- EtiSource* getEtiSource() { return &myEtiSource; }
+ EtiSource* getEtiSource() { return &m_etiSource; }
/******* REMOTE CONTROL ********/
- virtual void set_parameter(const std::string& parameter,
- const std::string& value) override;
-
- virtual const std::string get_parameter(
- const std::string& parameter) const override;
+ virtual void set_parameter(const std::string& parameter, const std::string& value) override;
+ virtual const std::string get_parameter(const std::string& parameter) const override;
+ virtual const json::map_t get_all_values() const override;
protected:
void setMode(unsigned mode);
mod_settings_t& m_settings;
+ std::string m_format;
- EtiSource& myEtiSource;
- std::shared_ptr<Flowgraph> myFlowgraph;
+ EtiSource& m_etiSource;
+ std::shared_ptr<Flowgraph> m_flowgraph;
- size_t myNbSymbols;
- size_t myNbCarriers;
- size_t mySpacing;
- size_t myNullSize;
- size_t mySymSize;
- size_t myFicSizeOut;
+ size_t m_nbSymbols;
+ size_t m_nbCarriers;
+ size_t m_spacing;
+ size_t m_nullSize;
+ size_t m_symSize;
+ size_t m_ficSizeOut;
- std::shared_ptr<OutputMemory> myOutput;
+ std::shared_ptr<FormatConverter> m_formatConverter;
+ std::shared_ptr<OutputMemory> m_output;
};