From 2bba7d602744ccd6dab26940661f0fdfbf231af8 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 25 Dec 2016 21:34:03 +0100 Subject: Refactor flowgraph and puncturing rules --- src/SubchannelSource.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/SubchannelSource.h') diff --git a/src/SubchannelSource.h b/src/SubchannelSource.h index e1db026..f2f261b 100644 --- a/src/SubchannelSource.h +++ b/src/SubchannelSource.h @@ -1,6 +1,11 @@ /* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Her Majesty the Queen in Right of Canada (Communications Research Center Canada) + + Copyright (C) 2016 + Matthias P. Braendli, matthias.braendli@mpb.li + + http://opendigitalradio.org */ /* This file is part of ODR-DabMod. @@ -19,8 +24,7 @@ along with ODR-DabMod. If not, see . */ -#ifndef SUBCHANNEL_SOURCE_H -#define SUBCHANNEL_SOURCE_H +#pragma once #ifdef HAVE_CONFIG_H # include @@ -29,25 +33,15 @@ #include "PuncturingRule.h" #include "Eti.h" -#include "ModInput.h" +#include "ModPlugin.h" #include class SubchannelSource : public ModInput { -protected: - size_t d_start_address; - size_t d_framesize; - size_t d_protection; - Buffer d_buffer; - std::vector d_puncturing_rules; - public: SubchannelSource(eti_STC &stc); - SubchannelSource(const SubchannelSource&); - SubchannelSource& operator=(const SubchannelSource&); - virtual ~SubchannelSource(); size_t startAddress(); size_t framesize(); @@ -57,12 +51,18 @@ public: size_t protectionForm(); size_t protectionLevel(); size_t protectionOption(); - const std::vector& get_rules(); - - int process(Buffer* inputData, Buffer* outputData); + const std::vector& get_rules(); + + void loadSubchannelData(const Buffer& data); + int process(Buffer* outputData); const char* name() { return "SubchannelSource"; } - int read(Buffer* outputData); + +private: + size_t d_start_address; + size_t d_framesize; + size_t d_protection; + Buffer d_buffer; + std::vector d_puncturing_rules; }; -#endif // SUBCHANNEL_SOURCE_H -- cgit v1.2.3