362c1f4c3b5ce9e3fce11167a51fbe4cdb2174de
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp  1) /* Blinker
Stefan Schuermans update copyright header

Stefan Schuermans authored 5 years ago

src/common/Printer.cpp  2)    Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp  3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
src/noarch/Printer.cpp  4)    a blinkenarea.org project */
src/noarch/Printer.cpp  5) 
src/noarch/Printer.cpp  6) #include <iostream>
src/noarch/Printer.cpp  7) #include <stdlib.h>
src/noarch/Printer.cpp  8) #include <string>
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp  9) #include <string.h>
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 10) 
src/noarch/Printer.cpp 11) #include <BlinkenLib/BlinkenFrame.h>
src/noarch/Printer.cpp 12) 
src/noarch/Printer.cpp 13) #include "Directory.h"
src/noarch/Printer.cpp 14) #include "File.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 15) #include "InStreamFile.h"
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 16) #include "Mgrs.h"
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 17) #include "Module.h"
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 18) #include "Printer.h"
src/noarch/Printer.cpp 19) #include "StreamRecv.h"
src/noarch/Printer.cpp 20) 
src/noarch/Printer.cpp 21) namespace Blinker {
src/noarch/Printer.cpp 22) 
src/noarch/Printer.cpp 23) /**
src/noarch/Printer.cpp 24)  * @brief constructor
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 25)  * @param[in] name module name
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 26)  * @param[in] mgrs managers
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 27)  * @param[in] dirBase base directory
src/noarch/Printer.cpp 28)  */
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 29) Printer::Printer(const std::string &name, Mgrs &mgrs,
src/noarch/Printer.cpp 30)                  const Directory &dirBase):
src/noarch/Printer.cpp 31)   Module(name, mgrs, dirBase),
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 32)   m_fileInStream(dirBase.getFile("instream"), mgrs.m_streamMgr)
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 33) {
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 34)   // set up
src/noarch/Printer.cpp 35)   m_fileInStream.setStreamRecv(this);
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 36) }
src/noarch/Printer.cpp 37) 
src/noarch/Printer.cpp 38) /// virtual destructor
src/noarch/Printer.cpp 39) Printer::~Printer()
src/noarch/Printer.cpp 40) {
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 41)   // clean up
src/noarch/Printer.cpp 42)   m_fileInStream.setStreamRecv(NULL);
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 43) }
src/noarch/Printer.cpp 44) 
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 45) /// check for update of configuration
src/noarch/Printer.cpp 46) void Printer::updateConfig()
src/noarch/Printer.cpp 47) {
Stefan Schuermans implemented automatic check...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 48)   // input stream name file was modified -> re-get input stream
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 49)   if (m_fileInStream.checkModified())
src/noarch/Printer.cpp 50)     m_fileInStream.update();
Stefan Schuermans implemented base class for...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 51) }
src/noarch/Printer.cpp 52) 
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 53) /**
src/noarch/Printer.cpp 54)  * @brief set current frame
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 55)  * @param[in] stream stream name
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 56)  * @param[in] pFrame current frame (NULL for none)
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 57)  */
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 58) void Printer::setFrame(const std::string &stream, stBlinkenFrame *pFrame)
Stefan Schuermans implemented stream printer...

Stefan Schuermans authored 13 years ago

src/noarch/Printer.cpp 59) {
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 60)   if (pFrame) {
src/noarch/Printer.cpp 61)     char *str = BlinkenFrameToString(pFrame);
src/noarch/Printer.cpp 62)     for (int i = strlen(str) - 2; i >= 0 && str[i] != '\n'; --i)
src/noarch/Printer.cpp 63)       str[i] = 0; // remove last line (delay)
src/noarch/Printer.cpp 64)     std::cout << "frame" << std::endl << str;
src/noarch/Printer.cpp 65)     free(str);
src/noarch/Printer.cpp 66)   } else {
src/noarch/Printer.cpp 67)     std::cout << "no frame" << std::endl;
src/noarch/Printer.cpp 68)   }
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Printer.cpp 69)   (void)stream; // unused