From 07d3536083ad8d0f08819e8be89aa5934fcaa712 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 15 Apr 2016 11:10:00 +0200 Subject: Rename dabSubchannel to DabSubchannel --- src/ConfigParser.cpp | 10 +++++----- src/ConfigParser.h | 2 +- src/DabMultiplexer.cpp | 10 +++++----- src/MuxElements.cpp | 16 ++++++++-------- src/MuxElements.h | 18 +++++++++--------- src/ParserCmdline.cpp | 4 ++-- src/fig/FIG0.h | 4 ++-- src/utils.cpp | 4 ++-- src/utils.h | 2 +- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp index 8795277..b6d1482 100644 --- a/src/ConfigParser.cpp +++ b/src/ConfigParser.cpp @@ -385,12 +385,12 @@ void parse_ptree(boost::property_tree::ptree& pt, /******************** READ SUBCHAN PARAMETERS **************/ - map allsubchans; + map allsubchans; ptree pt_subchans = pt.get_child("subchannels"); for (ptree::iterator it = pt_subchans.begin(); it != pt_subchans.end(); ++it) { string subchanuid = it->first; - dabSubchannel* subchan = new dabSubchannel(subchanuid); + DabSubchannel* subchan = new DabSubchannel(subchanuid); ensemble->subchannels.push_back(subchan); @@ -441,7 +441,7 @@ void parse_ptree(boost::property_tree::ptree& pt, throw runtime_error(ss.str()); } - dabSubchannel* subchannel; + DabSubchannel* subchannel; try { string subchan_uid = pt_comp.get("subchannel"); if (allsubchans.count(subchan_uid) != 1) { @@ -553,7 +553,7 @@ void parse_ptree(boost::property_tree::ptree& pt, } -void setup_subchannel_from_ptree(dabSubchannel* subchan, +void setup_subchannel_from_ptree(DabSubchannel* subchan, boost::property_tree::ptree &pt, std::shared_ptr ensemble, string subchanuid, @@ -909,7 +909,7 @@ void setup_subchannel_from_ptree(dabSubchannel* subchan, } catch (ptree_error &e) { for (int i = 0; i < 64; ++i) { // Find first free subchannel - vector::iterator subchannel = getSubchannel(ensemble->subchannels, i); + vector::iterator subchannel = getSubchannel(ensemble->subchannels, i); if (subchannel == ensemble->subchannels.end()) { subchannel = ensemble->subchannels.end() - 1; subchan->id = i; diff --git a/src/ConfigParser.h b/src/ConfigParser.h index 0b10c04..217572f 100644 --- a/src/ConfigParser.h +++ b/src/ConfigParser.h @@ -42,7 +42,7 @@ void parse_ptree(boost::property_tree::ptree& pt, std::shared_ptr ensemble, std::shared_ptr rc); -void setup_subchannel_from_ptree(dabSubchannel* subchan, +void setup_subchannel_from_ptree(DabSubchannel* subchan, boost::property_tree::ptree &pt, std::shared_ptr ensemble, std::string subchanuid, diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp index 201e710..7ae3f7f 100644 --- a/src/DabMultiplexer.cpp +++ b/src/DabMultiplexer.cpp @@ -155,7 +155,7 @@ void DabMultiplexer::prepare() throw MuxInitException(); } - vector::iterator subchannel = + vector::iterator subchannel = ensemble->subchannels.end() - 1; if ((*subchannel)->startAddress + (*subchannel)->getSizeCu() > 864) { @@ -223,7 +223,7 @@ void DabMultiplexer::prepare_services_components() dabProtection* protection = NULL; vector::iterator component; - vector::iterator subchannel; + vector::iterator subchannel; for (auto service : ensemble->services) { if (ids.find(service->id) != ids.end()) { @@ -303,7 +303,7 @@ void DabMultiplexer::prepare_services_components() void DabMultiplexer::prepare_data_inputs() { dabProtection* protection = NULL; - vector::iterator subchannel; + vector::iterator subchannel; // Prepare and check the data inputs for (subchannel = ensemble->subchannels.begin(); @@ -372,7 +372,7 @@ void DabMultiplexer::mux_frame(std::vector >& outputs vector >::iterator service; vector::iterator component; - vector::iterator subchannel; + vector::iterator subchannel; // FIC Length, DAB Mode I, II, IV -> FICL = 24, DAB Mode III -> FICL = 32 unsigned FICL = (ensemble->mode == 3 ? 32 : 24); @@ -380,7 +380,7 @@ void DabMultiplexer::mux_frame(std::vector >& outputs // For EDI, save ETI(LI) Management data into a TAG Item DETI TagDETI edi_tagDETI; TagStarPTR edi_tagStarPtr; - map edi_subchannelToTag; + map edi_subchannelToTag; // The above Tag Items will be assembled into a TAG Packet TagPacket edi_tagpacket(edi_conf.tagpacket_alignment); diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp index be837b1..c02afcd 100644 --- a/src/MuxElements.cpp +++ b/src/MuxElements.cpp @@ -201,8 +201,8 @@ void DabLabel::writeLabel(uint8_t* buf) const } } -vector::iterator getSubchannel( - vector& subchannels, int id) +vector::iterator getSubchannel( + vector& subchannels, int id) { return find_if( subchannels.begin(), @@ -254,7 +254,7 @@ std::vector >::iterator getService( throw std::runtime_error("Service not included in any component"); } -bool DabComponent::isPacketComponent(vector& subchannels) const +bool DabComponent::isPacketComponent(vector& subchannels) const { if (subchId > 63) { etiLog.log(error, @@ -337,7 +337,7 @@ const string DabComponent::get_parameter(const string& parameter) const subchannel_type_t DabService::getType(std::shared_ptr ensemble) const { - vector::iterator subchannel; + vector::iterator subchannel; vector::iterator component = getComponent(ensemble->components, id); if (component == ensemble->components.end()) { @@ -515,7 +515,7 @@ const string dabEnsemble::get_parameter(const string& parameter) const return ss.str(); } -unsigned short dabSubchannel::getSizeCu() const +unsigned short DabSubchannel::getSizeCu() const { if (protection.form == UEP) { return Sub_Channel_SizeTable[protection.uep.tableIndex]; @@ -570,17 +570,17 @@ unsigned short dabSubchannel::getSizeCu() const return 0; } -unsigned short dabSubchannel::getSizeByte(void) const +unsigned short DabSubchannel::getSizeByte(void) const { return bitrate * 3; } -unsigned short dabSubchannel::getSizeWord(void) const +unsigned short DabSubchannel::getSizeWord(void) const { return (bitrate * 3) >> 2; } -unsigned short dabSubchannel::getSizeDWord(void) const +unsigned short DabSubchannel::getSizeDWord(void) const { return (bitrate * 3) >> 3; } diff --git a/src/MuxElements.h b/src/MuxElements.h index ef5957f..7f48827 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -168,7 +168,7 @@ class DabLabel class DabService; class DabComponent; -class dabSubchannel; +class DabSubchannel; class dabEnsemble : public RemoteControllable { public: dabEnsemble() @@ -201,7 +201,7 @@ class dabEnsemble : public RemoteControllable { std::vector > services; std::vector components; - std::vector subchannels; + std::vector subchannels; std::vector > clusters; }; @@ -242,10 +242,10 @@ struct dabProtection { }; }; -class dabSubchannel +class DabSubchannel { public: - dabSubchannel(std::string& uid) : + DabSubchannel(std::string& uid) : uid(uid), input(), id(0), @@ -280,9 +280,9 @@ public: }; -class SubchannelId : public std::binary_function { +class SubchannelId : public std::binary_function { public: - bool operator()(const dabSubchannel* subchannel, const int id) const { + bool operator()(const DabSubchannel* subchannel, const int id) const { return subchannel->id == id; } }; @@ -343,7 +343,7 @@ class DabComponent : public RemoteControllable dabFidcComponent fidc; dabPacketComponent packet; - bool isPacketComponent(std::vector& subchannels) const; + bool isPacketComponent(std::vector& subchannels) const; /* Remote control */ virtual void set_parameter(const std::string& parameter, @@ -406,8 +406,8 @@ class DabService : public RemoteControllable DabService(const DabService& other); }; -std::vector::iterator getSubchannel( - std::vector& subchannels, int id); +std::vector::iterator getSubchannel( + std::vector& subchannels, int id); std::vector::iterator getComponent( std::vector& components, diff --git a/src/ParserCmdline.cpp b/src/ParserCmdline.cpp index 6de319b..723efd6 100644 --- a/src/ParserCmdline.cpp +++ b/src/ParserCmdline.cpp @@ -102,7 +102,7 @@ bool parse_cmdline(char **argv, ) { vector::iterator output; - vector::iterator subchannel = ensemble->subchannels.end(); + vector::iterator subchannel = ensemble->subchannels.end(); vector::iterator component = ensemble->components.end(); vector::iterator service = ensemble->services.end(); dabProtection* protection = NULL; @@ -217,7 +217,7 @@ bool parse_cmdline(char **argv, goto EXIT; } - ensemble->subchannels.push_back(new dabSubchannel); + ensemble->subchannels.push_back(new DabSubchannel); subchannel = ensemble->subchannels.end() - 1; protection = &(*subchannel)->protection; diff --git a/src/fig/FIG0.h b/src/fig/FIG0.h index 9e491e9..a096d57 100644 --- a/src/fig/FIG0.h +++ b/src/fig/FIG0.h @@ -66,8 +66,8 @@ class FIG0_1 : public IFIG private: FIGRuntimeInformation *m_rti; bool m_initialised; - std::vector subchannels; - std::vector::iterator subchannelFIG0_1; + std::vector subchannels; + std::vector::iterator subchannelFIG0_1; uint8_t m_watermarkData[128]; size_t m_watermarkSize; diff --git a/src/utils.cpp b/src/utils.cpp index 6940a11..071c0e9 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -479,9 +479,9 @@ void printComponent(DabComponent* component) } } -void printSubchannels(vector& subchannels) +void printSubchannels(vector& subchannels) { - vector::iterator subchannel; + vector::iterator subchannel; int index = 0; for (subchannel = subchannels.begin(); subchannel != subchannels.end(); diff --git a/src/utils.h b/src/utils.h index 926fa3d..485ca9b 100644 --- a/src/utils.h +++ b/src/utils.h @@ -57,7 +57,7 @@ void printServices(const std::vector >& services); void printComponents(std::vector& components); -void printSubchannels(std::vector& subchannels); +void printSubchannels(std::vector& subchannels); /* Print information about the whole ensemble */ void printEnsemble(const std::shared_ptr ensemble); -- cgit v1.2.3