BlinkenArea - GitList
Repositories
Blog
Wiki
Blinker
Code
Commits
Branches
Tags
Search
Tree:
f87ca98
Branches
Tags
master
Blinker
src
noarch
Priority.h
merged frame processing with no frame processing
Stefan Schuermans
commited
f87ca98
at 2011-12-04 12:58:57
Priority.h
Blame
History
Raw
/* Blinker Copyright 2011 Stefan Schuermans <stefan@blinkenarea.org> Copyleft GNU public license - http://www.gnu.org/copyleft/gpl.html a blinkenarea.org project */ #ifndef PRIORITY_H #define PRIORITY_H #include <list> #include <string> #include <BlinkenLib/BlinkenFrame.h> #include "CallMgr.h" #include "Directory.h" #include "File.h" #include "Module.h" #include "SettingFile.h" #include "StreamMgr.h" namespace Blinker { /// a priority based stream selector class Priority: public Module { protected: /// input to priority based selector class Input; /// input list entry struct InEntry { std::string m_name; ///< name of input list entry Input *m_pInput; ///< input object InEntry(const std::string &name); ///< constructor }; /// input list typedef std::list<InEntry> InList; /// input list iterator typedef InList::const_reverse_iterator InListIt; public: /** * @brief constructor * @param[in] callMgr callback manager * @param[in] streamMgr stream manager * @param[in] dirBase base directory */ Priority(CallMgr &callMgr, StreamMgr &streamMgr, const Directory &dirBase); /// virtual destructor virtual ~Priority(); private: /// copy constructor disabled Priority(const Priority &that); /// assignment operator disabled const Priority & operator=(const Priority &that); public: /// check for update of configuration virtual void updateConfig(); protected: /// light update of input list, i.e. check all entries in current input list void updateInListLight(); /// full update of input list, i.e. scan subdirs in input list directory void updateInListFull(); /// get output stream void getOutStream(); /// release output stream void releaseOutStream(); /** * @brief select specific input (called by inputs) * @param[in] input input to select */ void select(const Input *pInput); /// select lower priority input (called by inputs) void selectLower(); /// send current frame to output stream void curFrame(); /** * @brief set current frame (also called by inputs) * @param[in] pFrame new frame to use (NULL for none) */ void frame(stBlinkenFrame *pFrame); protected: Directory m_dirInputs; ///< input stream directory SettingFile m_fileOutStream; ///< output stream name file InList m_inList; ///< current input list InListIt m_itCurIn; ///< current input std::string m_nameOutStream; ///< name of output stream Stream *m_pOutStream; ///< output stream }; // class Priority } // namespace Blinker #endif // #ifndef PRIORITY_H