1877dbc58aca019e43f1e2b7bc88d5308731b298
Stefan Schuermans implemented stream receiver

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h   1) /* Blinker
Stefan Schuermans update copyright years

Stefan Schuermans authored 10 years ago

src/noarch/Receiver.h   2)    Copyright 2011-2014 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans implemented stream receiver

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h   3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
src/noarch/Receiver.h   4)    a blinkenarea.org project */
src/noarch/Receiver.h   5) 
src/noarch/Receiver.h   6) #ifndef BLINKER_RECEIVER_H
Stefan Schuermans typo

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h   7) #define BLINKER_RECEIVER_H
Stefan Schuermans implemented stream receiver

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h   8) 
src/noarch/Receiver.h   9) #include <string>
src/noarch/Receiver.h  10) 
src/noarch/Receiver.h  11) #include <BlinkenLib/BlinkenProto.h>
src/noarch/Receiver.h  12) #include <BlinkenLib/BlinkenFrame.h>
src/noarch/Receiver.h  13) 
src/noarch/Receiver.h  14) #include "Directory.h"
src/noarch/Receiver.h  15) #include "File.h"
src/noarch/Receiver.h  16) #include "IoCallee.h"
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h  17) #include "Mgrs.h"
Stefan Schuermans implemented stream receiver

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h  18) #include "Module.h"
src/noarch/Receiver.h  19) #include "OutStreamFile.h"
src/noarch/Receiver.h  20) #include "Protocol.h"
src/noarch/Receiver.h  21) #include "ProtocolFile.h"
src/noarch/Receiver.h  22) #include "SettingFile.h"
src/noarch/Receiver.h  23) #include "Time.h"
src/noarch/Receiver.h  24) #include "TimeCallee.h"
src/noarch/Receiver.h  25) 
src/noarch/Receiver.h  26) namespace Blinker {
src/noarch/Receiver.h  27) 
src/noarch/Receiver.h  28) /// stream receiver
src/noarch/Receiver.h  29) template<typename ADDR, typename SOCK>
src/noarch/Receiver.h  30) class Receiver: public IoCallee, public Module, public TimeCallee
src/noarch/Receiver.h  31) {
src/noarch/Receiver.h  32) protected:
src/noarch/Receiver.h  33)   /// type for address setting file
src/noarch/Receiver.h  34)   typedef SettingFile<ADDR> AddrFile;
src/noarch/Receiver.h  35) 
src/noarch/Receiver.h  36) public:
src/noarch/Receiver.h  37)   /**
src/noarch/Receiver.h  38)    * @brief constructor
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h  39)    * @param[in] name module name
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h  40)    * @param[in] mgrs managers
Stefan Schuermans implemented stream receiver

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h  41)    * @param[in] dirBase base directory
src/noarch/Receiver.h  42)    */
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h  43)   Receiver(const std::string &name, Mgrs &mgrs, const Directory &dirBase);
Stefan Schuermans implemented stream receiver

Stefan Schuermans authored 12 years ago

src/noarch/Receiver.h  44) 
src/noarch/Receiver.h  45)   /// virtual destructor
src/noarch/Receiver.h  46)   virtual ~Receiver();
src/noarch/Receiver.h  47) 
src/noarch/Receiver.h  48) private:
src/noarch/Receiver.h  49)   /// copy constructor disabled
src/noarch/Receiver.h  50)   Receiver(const Receiver &that);
src/noarch/Receiver.h  51) 
src/noarch/Receiver.h  52)   /// assignment operator disabled
src/noarch/Receiver.h  53)   const Receiver & operator=(const Receiver &that);
src/noarch/Receiver.h  54) 
src/noarch/Receiver.h  55) public:
src/noarch/Receiver.h  56)   /// check for update of configuration
src/noarch/Receiver.h  57)   virtual void updateConfig();
src/noarch/Receiver.h  58) 
src/noarch/Receiver.h  59)   /// callback when requested time reached
src/noarch/Receiver.h  60)   virtual void timeCall();
src/noarch/Receiver.h  61) 
src/noarch/Receiver.h  62)   /**
src/noarch/Receiver.h  63)    * @brief callback when I/O object is readable
src/noarch/Receiver.h  64)    * @param[in] io I/O object that is readable
src/noarch/Receiver.h  65)    */
src/noarch/Receiver.h  66)   virtual void ioReadCall(Io *io);
src/noarch/Receiver.h  67) 
src/noarch/Receiver.h  68)   /**
src/noarch/Receiver.h  69)    * @brief callback when I/O object is writable
src/noarch/Receiver.h  70)    * @param[in] io I/O object that is writable
src/noarch/Receiver.h  71)    */
src/noarch/Receiver.h  72)   virtual void ioWriteCall(Io *io);
src/noarch/Receiver.h  73) 
src/noarch/Receiver.h  74) protected:
src/noarch/Receiver.h  75)   /// (re-)read protocol
src/noarch/Receiver.h  76)   void readProto();
src/noarch/Receiver.h  77) 
src/noarch/Receiver.h  78)   /// (re-)read source address
src/noarch/Receiver.h  79)   void readSrc();
src/noarch/Receiver.h  80) 
src/noarch/Receiver.h  81)   /// create socket and bind it
src/noarch/Receiver.h  82)   void createSock();
src/noarch/Receiver.h  83) 
src/noarch/Receiver.h  84)   /// destroy socket
src/noarch/Receiver.h  85)   void destroySock();
src/noarch/Receiver.h  86) 
src/noarch/Receiver.h  87)   /**
src/noarch/Receiver.h  88)    * @brief request stream / cancel stream request
src/noarch/Receiver.h  89)    * @param req if to send a request (otherwise: cancel request)
src/noarch/Receiver.h  90)    */
src/noarch/Receiver.h  91)   void request(bool req);
src/noarch/Receiver.h  92) 
src/noarch/Receiver.h  93)   /// receive data from socket
src/noarch/Receiver.h  94)   void receiveFromSock();
src/noarch/Receiver.h  95) 
src/noarch/Receiver.h  96)   /**
src/noarch/Receiver.h  97)    * @brief process frame
src/noarch/Receiver.h  98)    * @param[in] data received frame protocol data
src/noarch/Receiver.h  99)    */
src/noarch/Receiver.h 100)   void procFrame(const std::string &data);
src/noarch/Receiver.h 101) 
src/noarch/Receiver.h 102)   /// update time callback
src/noarch/Receiver.h 103)   void updateTimeCallback();
src/noarch/Receiver.h 104) 
src/noarch/Receiver.h 105) protected:
src/noarch/Receiver.h 106)   OutStreamFile m_fileOutStream; ///< output stream name file
src/noarch/Receiver.h 107)   AddrFile      m_fileBind;      ///< bind address file
src/noarch/Receiver.h 108)   AddrFile      m_fileSrc;       ///< source address file
src/noarch/Receiver.h 109)   ProtocolFile  m_fileProtocol;  ///< protocol file
Stefan Schuermans implement UDP synchronizati...

Stefan Schuermans authored 10 years ago

src/common/Receiver.h 110)   SOCK          *m_pSock;        ///< socket to use for receiving stream