/* Blinker
Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
a blinkenarea.org project */
#include <list>
#include <string>
#include <BlinkenLib/BlinkenFrame.h>
#include "Directory.h"
#include "File.h"
#include "ListTracker.h"
#include "ListTracker_impl.h"
#include "Mgrs.h"
#include "Module.h"
#include "Priority.h"
#include "PriorityInput.h"
#include "OutStreamFile.h"
#include "StreamRecv.h"
namespace Blinker {
/**
* @brief constructor
* @param[in] name module name
* @param[in] mgrs managers
* @param[in] dirBase base directory
*/
Priority::Priority(const std::string &name, Mgrs &mgrs,
const Directory &dirBase):
Module(name, mgrs, dirBase),
m_fileOutStream(dirBase.getFile("outstream"), mgrs.m_streamMgr),
m_inListTracker(*this, dirBase.getSubdir("inputs")),
m_itCurIn(m_inListTracker.m_list.rend()),
m_updateNeeded(false)
{
m_inListTracker.init();
updateSelection();
}
/// virtual destructor
Priority::~Priority()
{
m_inListTracker.clear();
}
/// check for update of configuration
void Priority::updateConfig()
{
// input list update