Rev 1644 | Rev 1887 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1644 | Rev 1657 | ||
|---|---|---|---|
| Line 45... | Line 45... | ||
| 45 | { |
45 | { |
| 46 | public: |
46 | public: |
| 47 | typedef boost::shared_ptr<Manager> Pointer; |
47 | typedef boost::shared_ptr<Manager> Pointer; |
| 48 | typedef std::map<Node::Id, Node::Pointer> NodeList; |
48 | typedef std::map<Node::Id, Node::Pointer> NodeList; |
| 49 | typedef std::map<Module::FullId, Module::Pointer> ModuleList; |
49 | typedef std::map<Module::FullId, Module::Pointer> ModuleList; |
| 50 | typedef boost::signals2::signal<void( |
50 | typedef boost::signals2::signal<void(Node::Id, bool available)> SignalOnNodeChange; |
| 51 | typedef boost::signals2::signal<void(std::string full_id, bool available)> SignalOnModuleChange; |
51 | typedef boost::signals2::signal<void(std::string full_id, bool available)> SignalOnModuleChange; |
| 52 | typedef boost::signals2::signal<void(std::string full_id, std::string command, common::StringMap variables)> SignalOnModuleMessage; |
52 | typedef boost::signals2::signal<void(std::string full_id, std::string command, common::StringMap variables)> SignalOnModuleMessage; |
| 53 | 53 | ||
| 54 | virtual ~Manager(); |
54 | virtual ~Manager(); |
| 55 | 55 | ||
| 56 | static Pointer Instance(); |
56 | static Pointer Instance(); |
| 57 | static void Create(); |
57 | static void Create(); |
| 58 | static void Delete(); |
58 | static void Delete(); |
| 59 | 59 | ||
| - | 60 | void ConnectSlotNode(const SignalOnNodeChange::slot_type& signal_on_node_change_); |
|
| - | 61 | void ConnectSlotModule(const SignalOnModuleChange::slot_type& slot_on_module_change); |
|
| 60 | void |
62 | void ConnectSlotModule(const SignalOnModuleMessage::slot_type& slot_on_module_message); |
| 61 | 63 | ||
| 62 | void SendMessage(std::string full_id, std::string command, common::StringMap variables); |
64 | void SendMessage(std::string full_id, std::string command, common::StringMap variables); |
| 63 | common::StringList GetAvailableModules(); |
65 | common::StringList GetAvailableModules(); |
| - | 66 | ||
| - | 67 | common::StringList GetAvailableNodes(); |
|
| 64 | bool ProgramNode(Node::Id node_id, bool is_bios, std::string filename); |
68 | bool ProgramNode(Node::Id node_id, bool is_bios, std::string filename); |
| - | 69 | bool ResetNode(Node::Id node_id); |
|
| 65 | 70 | ||
| 66 | private: |
71 | private: |
| 67 | static Pointer instance_; |
72 | static Pointer instance_; |
| 68 | 73 | ||
| 69 | timer::TimerId timer_id_; |
74 | timer::TimerId timer_id_; |