#ifndef __WestonDatabaseMonitor_h_ #define __WestonDatabaseMonitor_h_ #include "../../shared/ThreadClass.h" #include "../misc_framework/DataNodes.h" // We send the entire list out all at once to anyone who is listening. This // is quick and easy and it guarentees that all updates are atomic. class WestonExcludeList : public BroadcastMessage { public: WestonExcludeList(); std::set< std::string > quickstrikeList; std::set< std::string > bollingerList; }; // Add more stuff to the same file even though it's for another user, not // Weston. This avoids multiple database connections at run time and probably // makes things easier to code. We were already using the thread for the dead // man timer, which had nothing to do with Weston. Perhaps we should rename // this from "WestonDatabaseMonitor.h" to "DatabaseMonitor.h". class DatabaseNotes : public BroadcastMessage { public: DatabaseNotes(std::string const &channel) : BroadcastMessage(channel) {} std::map< std::string, double > values; }; class WestonDatabaseMonitor : private ThreadClass { private: enum { mtDeadManTimer, mtQuit }; SelectableRequestQueue _incoming; DataNodeManager *const _dataNodeManager; protected: void threadFunction(); public: WestonDatabaseMonitor(DataNodeManager *dataNodeManager); ~WestonDatabaseMonitor(); static std::string getExcludeListChannel(); static std::string getShaneBirdNotesChannel(); static std::string getJoeFavaloroNotesChannel(); void updateDeadManTimer(); }; #endif