Stefan Schuermans
added buffer to serial device output dropping frames on serial output if buffer gets too full (more than 10 frames) added support for high baudrates
Stefan Schuermans commited 9418df2 at 2011-12-27 08:02:03
/* Blinker
Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org>
Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
a blinkenarea.org project */
#include <string>
#include <BlinkenLib/BlinkenFrame.h>
#include <BlinkenLib/BlinkenProto.h>
#include "Device.h"
#include "Directory.h"
#include "File.h"
#include "InStreamFile.h"
#include "Mgrs.h"
#include "Module.h"
#include "NameFile.h"
#include "Output.h"
#include "Protocol.h"
#include "ProtocolFile.h"
#include "SerCfgFile.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
*/
Output::Output(const std::string &name, Mgrs &mgrs,
const Directory &dirBase):
Module(name, mgrs, dirBase),
m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr),
m_fileProtocol(dirBase.getFile("protocol")),
m_fileDevice(dirBase.getFile("device")),
m_fileSerCfg(dirBase.getFile("ser_cfg")),
m_pDevice(NULL)
{
// set up
m_fileInStream.setStreamRecv(this);
readProto();
openDevice();
}
/// virtual destructor
Output::~Output()
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX