/* 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 <stdlib.h>
#include <string>
#include <string.h>
#include <BlinkenLib/BlinkenFrame.h>
#include <BlinkenLib/BlinkenProto.h>
#ifdef BLINKER_CFG_ETHERPIX
extern "C" {
#include <etherpix/etherpix.h>
} // extern "C"
#endif // #ifdef BLINKER_CFG_ETHERPIX
#include "Directory.h"
#include "File.h"
#include "EtherPix.h"
#include "InStreamFile.h"
#include "Mgrs.h"
#include "Module.h"
#include "Size.h"
#include "StreamRecv.h"
#include "Time.h"
#include "TimeCallee.h"
namespace Blinker {
/**
* @brief constructor
* @param[in] name module name
* @param[in] mgrs managers
* @param[in] dirBase base directory
*/
EtherPix::EtherPix(const std::string &name, Mgrs &mgrs,
const Directory &dirBase):
Module(name, mgrs, dirBase),
m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr),
m_fileConfig(dirBase.getFile("etherpix.etp")),
m_pDisplay(NULL)
{
// set up
m_fileInStream.setStreamRecv(this);
createDisplay();
}
/// virtual destructor
EtherPix::~EtherPix()