summaryrefslogtreecommitdiffstats
path: root/src/fig
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-10 11:39:25 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-10-10 11:39:25 +0200
commit2e71bf974f42cfe9edf9c8289602eec0c7ecadf9 (patch)
tree574bd00266dacf3dc7b21d6f601131c85340663b /src/fig
parentbbafa23de92eb542f4c8266d484aed9faf88d360 (diff)
parent4576c71f10dc009ce0dd9aedbc2f81a3e1a8be0e (diff)
downloaddabmux-2e71bf974f42cfe9edf9c8289602eec0c7ecadf9.tar.gz
dabmux-2e71bf974f42cfe9edf9c8289602eec0c7ecadf9.tar.bz2
dabmux-2e71bf974f42cfe9edf9c8289602eec0c7ecadf9.zip
Merge next into servicelinking
Diffstat (limited to 'src/fig')
-rw-r--r--src/fig/FIGCarousel.cpp28
-rw-r--r--src/fig/FIGCarousel.h5
2 files changed, 6 insertions, 27 deletions
diff --git a/src/fig/FIGCarousel.cpp b/src/fig/FIGCarousel.cpp
index bd2bf51..ac2a80b 100644
--- a/src/fig/FIGCarousel.cpp
+++ b/src/fig/FIGCarousel.cpp
@@ -113,11 +113,11 @@ FIGCarousel::FIGCarousel(std::shared_ptr<dabEnsemble> ensemble) :
void FIGCarousel::load_and_allocate(IFIG& fig, FIBAllocation fib)
{
- int type = fig.figtype();
- int extension = fig.figextension();
-
- m_figs_available[std::make_pair(type, extension)] = &fig;
- allocate_fig_to_fib(type, extension, fib);
+ FIGCarouselElement el;
+ el.fig = &fig;
+ el.deadline = 0;
+ el.increase_deadline();
+ m_fibs[fib].push_back(el);
}
void FIGCarousel::update(unsigned long currentFrame)
@@ -125,24 +125,6 @@ void FIGCarousel::update(unsigned long currentFrame)
m_rti.currentFrame = currentFrame;
}
-void FIGCarousel::allocate_fig_to_fib(int figtype, int extension, FIBAllocation fib)
-{
- auto fig = m_figs_available.find(std::make_pair(figtype, extension));
-
- if (fig != m_figs_available.end()) {
- FIGCarouselElement el;
- el.fig = fig->second;
- el.deadline = 0;
- el.increase_deadline();
- m_fibs[fib].push_back(el);
- }
- else {
- std::stringstream ss;
- ss << "No FIG " << figtype << "/" << extension << " available";
- throw std::runtime_error(ss.str());
- }
-}
-
void dumpfib(const uint8_t *buf, size_t bufsize) {
std::cerr << "FIB ";
for (size_t i = 0; i < bufsize; i++) {
diff --git a/src/fig/FIGCarousel.h b/src/fig/FIGCarousel.h
index be0b23f..f52f266 100644
--- a/src/fig/FIGCarousel.h
+++ b/src/fig/FIGCarousel.h
@@ -3,7 +3,7 @@
2011, 2012 Her Majesty the Queen in Right of Canada (Communications
Research Center Canada)
- Copyright (C) 2015
+ Copyright (C) 2016
Matthias P. Braendli, matthias.braendli@mpb.li
Implementation of the FIG carousel to schedule the FIGs into the
@@ -62,8 +62,6 @@ class FIGCarousel {
void update(unsigned long currentFrame);
- void allocate_fig_to_fib(int figtype, int extension, FIBAllocation fib);
-
/* Write all FIBs to the buffer, including correct padding and crc.
* Returns number of bytes written.
*
@@ -81,7 +79,6 @@ class FIGCarousel {
void load_and_allocate(IFIG& fig, FIBAllocation fib);
FIGRuntimeInformation m_rti;
- std::map<std::pair<int, int>, IFIG*> m_figs_available;
// Some FIGs can be mapped to a specific FIB or to FIB_ANY
std::map<FIBAllocation, std::list<FIGCarouselElement> > m_fibs;