f670ca05dd608c9d5b0300ca1dc493f6ffd8afa1
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 10 years ago

src/noarch/Sender.h   2)    Copyright 2011-2014 Stefan Schuermans <stefan@blinkenarea.org>
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h   3)    Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
src/noarch/Sender.h   4)    a blinkenarea.org project */
src/noarch/Sender.h   5) 
Stefan Schuermans namespace for preprocessor...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h   6) #ifndef BLINKER_SENDER_H
src/noarch/Sender.h   7) #define BLINKER_SENDER_H
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h   8) 
src/noarch/Sender.h   9) #include <list>
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  10) #include <map>
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  11) #include <string>
src/noarch/Sender.h  12) 
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  13) #include <BlinkenLib/BlinkenProto.h>
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  14) #include <BlinkenLib/BlinkenFrame.h>
src/noarch/Sender.h  15) 
src/noarch/Sender.h  16) #include "Directory.h"
src/noarch/Sender.h  17) #include "File.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  18) #include "InStreamFile.h"
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  19) #include "IoCallee.h"
Stefan Schuermans put all managers in one str...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  20) #include "Mgrs.h"
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  21) #include "Module.h"
Stefan Schuermans converted sender to use lis...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  22) #include "ListTracker.h"
Stefan Schuermans simplified sender module a...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  23) #include "Protocol.h"
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  24) #include "ProtocolFile.h"
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  25) #include "SettingFile.h"
src/noarch/Sender.h  26) #include "StreamRecv.h"
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  27) #include "Time.h"
Stefan Schuermans now repeating frames after...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  28) #include "TimeCallee.h"
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  29) 
src/noarch/Sender.h  30) namespace Blinker {
src/noarch/Sender.h  31) 
src/noarch/Sender.h  32) /// stream sender
src/noarch/Sender.h  33) template<typename ADDR, typename SOCK>
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  34) class Sender: public IoCallee, public Module, public StreamRecv,
src/noarch/Sender.h  35)               public TimeCallee
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  36) {
src/noarch/Sender.h  37) protected:
Stefan Schuermans implemented specialized set...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  38)   /// type for address setting file
src/noarch/Sender.h  39)   typedef SettingFile<ADDR> AddrFile;
src/noarch/Sender.h  40) 
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  41)   /// static destination
Stefan Schuermans sender static destination n...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  42)   class Dest;
src/noarch/Sender.h  43) 
Stefan Schuermans converted sender to use lis...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  44)   /// static destination list tracker
src/noarch/Sender.h  45)   typedef ListTracker<Sender, Dest, Directory> DestListTracker;
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  46) 
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  47)   /// dynamic destinations: address -> time of last request
src/noarch/Sender.h  48)   typedef std::map<ADDR, Time> DynDests;
src/noarch/Sender.h  49) 
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  50) public:
src/noarch/Sender.h  51)   /**
src/noarch/Sender.h  52)    * @brief constructor
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

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

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  54)    * @param[in] mgrs managers
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  55)    * @param[in] dirBase base directory
src/noarch/Sender.h  56)    */
Stefan Schuermans make modules know their name

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  57)   Sender(const std::string &name, Mgrs &mgrs, const Directory &dirBase);
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  58) 
src/noarch/Sender.h  59)   /// virtual destructor
src/noarch/Sender.h  60)   virtual ~Sender();
src/noarch/Sender.h  61) 
src/noarch/Sender.h  62) private:
src/noarch/Sender.h  63)   /// copy constructor disabled
src/noarch/Sender.h  64)   Sender(const Sender &that);
src/noarch/Sender.h  65) 
src/noarch/Sender.h  66)   /// assignment operator disabled
src/noarch/Sender.h  67)   const Sender & operator=(const Sender &that);
src/noarch/Sender.h  68) 
src/noarch/Sender.h  69) public:
src/noarch/Sender.h  70)   /// check for update of configuration
src/noarch/Sender.h  71)   virtual void updateConfig();
src/noarch/Sender.h  72) 
src/noarch/Sender.h  73)   /**
src/noarch/Sender.h  74)    * @brief set current frame
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  75)    * @param[in] stream stream name
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  76)    * @param[in] pFrame current frame (NULL for none)
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  77)    */
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  78)   virtual void setFrame(const std::string &stream, stBlinkenFrame *pFrame);
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  79) 
Stefan Schuermans fixed comment typo

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  80)   /// callback when requested time reached
Stefan Schuermans now repeating frames after...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  81)   virtual void timeCall();
src/noarch/Sender.h  82) 
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  83)   /**
src/noarch/Sender.h  84)    * @brief callback when I/O object is readable
src/noarch/Sender.h  85)    * @param[in] io I/O object that is readable
src/noarch/Sender.h  86)    */
src/noarch/Sender.h  87)   virtual void ioReadCall(Io *io);
src/noarch/Sender.h  88) 
src/noarch/Sender.h  89)   /**
src/noarch/Sender.h  90)    * @brief callback when I/O object is writable
src/noarch/Sender.h  91)    * @param[in] io I/O object that is writable
src/noarch/Sender.h  92)    */
src/noarch/Sender.h  93)   virtual void ioWriteCall(Io *io);
src/noarch/Sender.h  94) 
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  95) protected:
Stefan Schuermans simplified sender module a...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  96)   /// (re-)read protocol
src/noarch/Sender.h  97)   void readProto();
Stefan Schuermans sender static destination n...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  98) 
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h  99)   /// create socket and bind it
src/noarch/Sender.h 100)   void createSock();
src/noarch/Sender.h 101) 
src/noarch/Sender.h 102)   /// destroy socket
src/noarch/Sender.h 103)   void destroySock();
src/noarch/Sender.h 104) 
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 105)   /// remove timed-out dynamic destinations
src/noarch/Sender.h 106)   void removeTimedOutDynDests();
src/noarch/Sender.h 107) 
Stefan Schuermans simplified implementation o...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 108)   /// send current protocol data to all destinations
src/noarch/Sender.h 109)   void sendAllProto();
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 110) 
src/noarch/Sender.h 111)   /// send "no frame" to all destinations
src/noarch/Sender.h 112)   void sendAllNoFrame();
src/noarch/Sender.h 113) 
src/noarch/Sender.h 114)   /**
src/noarch/Sender.h 115)    * @brief send data to static/dynamic destinations
Stefan Schuermans sender static destination n...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 116)    * @param[in] data *pData protocol data to send
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 117)    */
Stefan Schuermans simplified sender module a...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 118)   void sendDests(const std::string *pData);
Stefan Schuermans added stream name to stream...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 119) 
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 120)   /**
Stefan Schuermans simplified implementation o...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 121)    * @brief send protocol data to address
Stefan Schuermans typo

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 122)    * @param[in] data protocol data of frame (empty if unknown)
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 123)    * @param[in] addr address to send to
src/noarch/Sender.h 124)    */
Stefan Schuermans simplified implementation o...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 125)   void sendProto(const std::string &data, const ADDR &addr) const;
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 126) 
src/noarch/Sender.h 127)   /**
Stefan Schuermans now repeating frames after...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 128)    * @brief convert frame to protocol data
Stefan Schuermans merged frame processing wit...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 129)    * @param[in] pFrame frame (NULL for none)
Stefan Schuermans typo

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 130)    * @param[out] data protocol data
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 131)    */
Stefan Schuermans simplified sender module a...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 132)   void frame2data(stBlinkenFrame *pFrame, std::string &data) const;
Stefan Schuermans now repeating frames after...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 133) 
Stefan Schuermans implemented dynamic destina...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 134)   /// receive data from socket
src/noarch/Sender.h 135)   void receiveFromSock();
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 136) 
src/noarch/Sender.h 137) protected:
Stefan Schuermans converted sender to use lis...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 138)   InStreamFile    m_fileInStream;    ///< input stream name file
src/noarch/Sender.h 139)   AddrFile        m_fileBind;        ///< bind address file
src/noarch/Sender.h 140)   ProtocolFile    m_fileProtocol;    ///< protocol file
src/noarch/Sender.h 141)   SOCK            *m_pSock;          ///< socket to use for sending streams
src/noarch/Sender.h 142)   DestListTracker m_destListTracker; ///< static destinations tracker
src/noarch/Sender.h 143)   DynDests        m_dynDests;        ///< dynamic destinations
Stefan Schuermans 80 char reformatting

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 144)   std::string     m_noFrameData;     /**< "no frame" protocol data
src/noarch/Sender.h 145)                                           (empty if unknown) */
src/noarch/Sender.h 146)   std::string     m_data;            /**< current protocol data
src/noarch/Sender.h 147)                                           (empty if unknown) */
Stefan Schuermans MCUF sender module implemented

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 148) }; // class Sender
src/noarch/Sender.h 149) 
src/noarch/Sender.h 150) } // namespace Blinker
src/noarch/Sender.h 151) 
Stefan Schuermans namespace for preprocessor...

Stefan Schuermans authored 12 years ago

src/noarch/Sender.h 152) #endif // #ifndef BLINKER_SENDER_H