Rev 1604 | Rev 1627 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1604 | Rev 1614 | ||
|---|---|---|---|
| Line 44... | Line 44... | ||
| 44 | { |
44 | { |
| 45 | public: |
45 | public: |
| 46 | typedef boost::shared_ptr<Manager> Pointer; |
46 | typedef boost::shared_ptr<Manager> Pointer; |
| 47 | typedef std::map<Node::Id, Node::Pointer> NodeList; |
47 | typedef std::map<Node::Id, Node::Pointer> NodeList; |
| 48 | typedef std::map<Module::FullId, Module::Pointer> ModuleList; |
48 | typedef std::map<Module::FullId, Module::Pointer> ModuleList; |
| - | 49 | typedef boost::signals2::signal<void(unsigned int node_id, bool available)> SignalOnNodeChange; |
|
| 49 | typedef boost::signals2::signal<void(std::string full_id, bool available)> SignalOnModuleChange; |
50 | typedef boost::signals2::signal<void(std::string full_id, bool available)> SignalOnModuleChange; |
| 50 | typedef boost::signals2::signal<void(std::string full_id, std::string command, type::StringMap variables)> SignalOnModuleMessage; |
51 | typedef boost::signals2::signal<void(std::string full_id, std::string command, type::StringMap variables)> SignalOnModuleMessage; |
| 51 | 52 | ||
| 52 | virtual ~Manager(); |
53 | virtual ~Manager(); |
| 53 | 54 | ||
| 54 | static Pointer Instance(); |
55 | static Pointer Instance(); |
| 55 | static void Create(); |
56 | static void Create(); |
| 56 | static void Delete(); |
57 | static void Delete(); |
| 57 | 58 | ||
| 58 | void ConnectSlots(const SignalOnModuleChange::slot_type& slot_on_module_change, const SignalOnModuleMessage::slot_type& slot_on_module_message); |
59 | void ConnectSlots(const SignalOnNodeChange::slot_type& signal_on_node_change_, const SignalOnModuleChange::slot_type& slot_on_module_change, const SignalOnModuleMessage::slot_type& slot_on_module_message); |
| 59 | 60 | ||
| 60 | void SendMessage(std::string full_id, std::string command, type::StringMap variables); |
61 | void SendMessage(std::string full_id, std::string command, type::StringMap variables); |
| 61 | bool IsModuleAvailable(std::string full_id); |
62 | bool IsModuleAvailable(std::string full_id); |
| 62 | 63 | ||
| 63 | private: |
64 | private: |
| Line 66... | Line 67... | ||
| 66 | timer::TimerId timer_id_; |
67 | timer::TimerId timer_id_; |
| 67 | 68 | ||
| 68 | NodeList nodes_; |
69 | NodeList nodes_; |
| 69 | ModuleList modules_; |
70 | ModuleList modules_; |
| 70 | 71 | ||
| - | 72 | SignalOnNodeChange signal_on_node_change_; |
|
| 71 | SignalOnModuleChange signal_on_module_change_; |
73 | SignalOnModuleChange signal_on_module_change_; |
| 72 | SignalOnModuleMessage signal_on_module_message_; |
74 | SignalOnModuleMessage signal_on_module_message_; |
| 73 | 75 | ||
| 74 | Manager(); |
76 | Manager(); |
| 75 | 77 | ||