implemented loveletter module
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 1) /* Blinker
|
update copyright header
Stefan Schuermans authored 5 years ago
|
src/common/Loveletter.h 2) Copyright 2011-2019 Stefan Schuermans <stefan@blinkenarea.org>
|
implemented loveletter module
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 3) Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html
src/noarch/Loveletter.h 4) a blinkenarea.org project */
src/noarch/Loveletter.h 5)
src/noarch/Loveletter.h 6) #ifndef BLINKER_LOVELETTER_H
src/noarch/Loveletter.h 7) #define BLINKER_LOVELETTER_H
src/noarch/Loveletter.h 8)
src/noarch/Loveletter.h 9) #include <list>
src/noarch/Loveletter.h 10) #include <map>
src/noarch/Loveletter.h 11) #include <string>
src/noarch/Loveletter.h 12)
src/noarch/Loveletter.h 13) #include <BlinkenLib/BlinkenMovie.h>
src/noarch/Loveletter.h 14)
src/noarch/Loveletter.h 15) #include "Directory.h"
src/noarch/Loveletter.h 16) #include "File.h"
src/noarch/Loveletter.h 17) #include "InStreamFile.h"
src/noarch/Loveletter.h 18) #include "ListTracker.h"
src/noarch/Loveletter.h 19) #include "Mgrs.h"
src/noarch/Loveletter.h 20) #include "Module.h"
|
clarified operator connecti...
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 21) #include "NameFile.h"
|
implemented loveletter module
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 22) #include "OpConn.h"
src/noarch/Loveletter.h 23) #include "OpConnIf.h"
src/noarch/Loveletter.h 24) #include "OpReqIf.h"
src/noarch/Loveletter.h 25) #include "OutStreamFile.h"
src/noarch/Loveletter.h 26) #include "StreamRecv.h"
src/noarch/Loveletter.h 27) #include "Time.h"
src/noarch/Loveletter.h 28) #include "TimeCallee.h"
src/noarch/Loveletter.h 29)
src/noarch/Loveletter.h 30) namespace Blinker {
src/noarch/Loveletter.h 31)
src/noarch/Loveletter.h 32) /// on demand movie player
src/noarch/Loveletter.h 33) class Loveletter: public Module, public OpReqIf, public StreamRecv,
src/noarch/Loveletter.h 34) public TimeCallee
src/noarch/Loveletter.h 35) {
src/noarch/Loveletter.h 36) protected:
src/noarch/Loveletter.h 37) /// movie
src/noarch/Loveletter.h 38) class Movie;
src/noarch/Loveletter.h 39)
src/noarch/Loveletter.h 40) /// movie tracker
src/noarch/Loveletter.h 41) typedef ListTracker<Loveletter, Movie, File> MovieTracker;
src/noarch/Loveletter.h 42)
src/noarch/Loveletter.h 43) /// movie iterator
src/noarch/Loveletter.h 44) typedef MovieTracker::ListIt MovieIt;
src/noarch/Loveletter.h 45)
src/noarch/Loveletter.h 46) /// map from movie number to movie
src/noarch/Loveletter.h 47) typedef std::map<std::string, Movie *> MovieMap;
src/noarch/Loveletter.h 48)
src/noarch/Loveletter.h 49) public:
src/noarch/Loveletter.h 50) /**
src/noarch/Loveletter.h 51) * @brief constructor
src/noarch/Loveletter.h 52) * @param[in] name module name
src/noarch/Loveletter.h 53) * @param[in] mgrs managers
src/noarch/Loveletter.h 54) * @param[in] dirBase base directory
src/noarch/Loveletter.h 55) */
src/noarch/Loveletter.h 56) Loveletter(const std::string &name, Mgrs &mgrs, const Directory &dirBase);
src/noarch/Loveletter.h 57)
src/noarch/Loveletter.h 58) /// virtual destructor
src/noarch/Loveletter.h 59) virtual ~Loveletter();
src/noarch/Loveletter.h 60)
src/noarch/Loveletter.h 61) private:
src/noarch/Loveletter.h 62) /// copy constructor disabled
src/noarch/Loveletter.h 63) Loveletter(const Loveletter &that);
src/noarch/Loveletter.h 64)
src/noarch/Loveletter.h 65) /// assignment operator disabled
src/noarch/Loveletter.h 66) const Loveletter & operator=(const Loveletter &that);
src/noarch/Loveletter.h 67)
src/noarch/Loveletter.h 68) public:
src/noarch/Loveletter.h 69) /// check for update of configuration
src/noarch/Loveletter.h 70) virtual void updateConfig();
src/noarch/Loveletter.h 71)
src/noarch/Loveletter.h 72) /**
src/noarch/Loveletter.h 73) * @brief set current frame
src/noarch/Loveletter.h 74) * @param[in] stream stream name
src/noarch/Loveletter.h 75) * @param[in] pFrame current frame (NULL for none)
src/noarch/Loveletter.h 76) */
src/noarch/Loveletter.h 77) virtual void setFrame(const std::string &stream, stBlinkenFrame *pFrame);
src/noarch/Loveletter.h 78)
src/noarch/Loveletter.h 79) /// callback when requested time reached
src/noarch/Loveletter.h 80) virtual void timeCall();
src/noarch/Loveletter.h 81)
src/noarch/Loveletter.h 82) /**
|
fix comment typo
Stefan Schuermans authored 5 years ago
|
src/common/Loveletter.h 83) * @brief check if accepting new operator connection is possible
|
implemented loveletter module
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 84) * @param[in] name operator interface name
src/noarch/Loveletter.h 85) * @return if accepting new connection is possible
src/noarch/Loveletter.h 86) */
src/noarch/Loveletter.h 87) virtual bool acceptNewOpConn(const std::string &name);
src/noarch/Loveletter.h 88)
src/noarch/Loveletter.h 89) /**
src/noarch/Loveletter.h 90) * @brief new operator connection
src/noarch/Loveletter.h 91) * @param[in] name operator interface name
src/noarch/Loveletter.h 92) * @param[in] pConn operator connection object
|
clarified operator connecti...
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 93) *
src/noarch/Loveletter.h 94) * The new connection may not yet be used for sending inside this callback.
|
implemented loveletter module
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 95) */
src/noarch/Loveletter.h 96) virtual void newOpConn(const std::string &name, OpConn *pConn);
src/noarch/Loveletter.h 97)
src/noarch/Loveletter.h 98) /**
src/noarch/Loveletter.h 99) * @brief key command received on operator connection
src/noarch/Loveletter.h 100) * @param[in] pConn operator connection object
src/noarch/Loveletter.h 101) * @param[in] key key that was pressed
src/noarch/Loveletter.h 102) */
src/noarch/Loveletter.h 103) virtual void opConnRecvKey(OpConn *pConn, char key);
src/noarch/Loveletter.h 104)
src/noarch/Loveletter.h 105) /**
src/noarch/Loveletter.h 106) * @brief play command received on operator connection
src/noarch/Loveletter.h 107) * @param[in] pConn operator connection object
src/noarch/Loveletter.h 108) * @param[in] sound name of sound to play
src/noarch/Loveletter.h 109) */
src/noarch/Loveletter.h 110) virtual void opConnRecvPlay(OpConn *pConn, const std::string &sound);
src/noarch/Loveletter.h 111)
src/noarch/Loveletter.h 112) /**
src/noarch/Loveletter.h 113) * @brief operator connection is closed
src/noarch/Loveletter.h 114) * @param[in] pConn operator connection object
|
clarified operator connecti...
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 115) *
src/noarch/Loveletter.h 116) * The connection may not be used for sending any more in this callback.
|
implemented loveletter module
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 117) */
src/noarch/Loveletter.h 118) virtual void opConnClose(OpConn *pConn);
src/noarch/Loveletter.h 119)
src/noarch/Loveletter.h 120) protected:
src/noarch/Loveletter.h 121) /// check if current movie changed and react
src/noarch/Loveletter.h 122) void checkCurChanged();
src/noarch/Loveletter.h 123)
src/noarch/Loveletter.h 124) /// process current frame
src/noarch/Loveletter.h 125) void procFrame();
src/noarch/Loveletter.h 126)
src/noarch/Loveletter.h 127) /// send current frame to output stream
src/noarch/Loveletter.h 128) void sendFrame();
src/noarch/Loveletter.h 129)
src/noarch/Loveletter.h 130) /// close current operator connection
src/noarch/Loveletter.h 131) void closeOpConn();
src/noarch/Loveletter.h 132)
src/noarch/Loveletter.h 133) /// start playing movie (indictaed by m_movieNumber)
src/noarch/Loveletter.h 134) void startPlaying();
src/noarch/Loveletter.h 135)
src/noarch/Loveletter.h 136) /// stop playing movie
src/noarch/Loveletter.h 137) void stopPlaying();
src/noarch/Loveletter.h 138)
src/noarch/Loveletter.h 139) protected:
|
clarified operator connecti...
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 140) NameFile m_fileSound; ///< file containing sound name
|
implemented loveletter module
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 141) OutStreamFile m_fileOutStream; ///< output stream name file
src/noarch/Loveletter.h 142) InStreamFile m_fileHaltStream; /**< halt stream name file
src/noarch/Loveletter.h 143) (playing halts if stream active) */
src/noarch/Loveletter.h 144) MovieTracker m_movieTracker; ///< current movies
src/noarch/Loveletter.h 145) MovieMap m_movieMap; ///< map from movie number to movie
src/noarch/Loveletter.h 146) bool m_curValid; ///< if there is a current frame
src/noarch/Loveletter.h 147) Movie *m_pCurMovie; ///< current movie or NULL
src/noarch/Loveletter.h 148) int m_curFrame; ///< current frame in movie
src/noarch/Loveletter.h 149) bool m_curChange; ///< current movie changed
src/noarch/Loveletter.h 150) bool m_halted; ///< if playing is halted
src/noarch/Loveletter.h 151) Time m_remainTime; /**< remaining time of current frame
src/noarch/Loveletter.h 152) (valid if m_curValid && m_halted) */
src/noarch/Loveletter.h 153) Time m_nextTime; /**< when to show next frame
src/noarch/Loveletter.h 154) (valid if m_curValid && !m_halted) */
src/noarch/Loveletter.h 155) OpConn *m_pOpConn; ///< current operator connection or NULL
|
clarified operator connecti...
Stefan Schuermans authored 12 years ago
|
src/noarch/Loveletter.h 156) bool m_sendPlay; ///< if sending play request needed
|