Rev 1601 | Rev 1604 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1601 | Rev 1602 | ||
|---|---|---|---|
| Line 36... | Line 36... | ||
| 36 | #include "can/Monitor.h" |
36 | #include "can/Monitor.h" |
| 37 | #include "vm/Manager.h" |
37 | #include "vm/Manager.h" |
| 38 | 38 | ||
| 39 | #include "vm/plugin/System.h" |
39 | #include "vm/plugin/System.h" |
| 40 | #include "vm/plugin/Timer.h" |
40 | #include "vm/plugin/Timer.h" |
| - | 41 | #include "vm/plugin/Module.h" |
|
| 41 | 42 | ||
| 42 | using namespace atom; |
43 | using namespace atom; |
| 43 | 44 | ||
| 44 | logging::Logger LOG("Main"); |
45 | logging::Logger LOG("Main"); |
| 45 | std::vector<broker::Subscriber::Pointer> subscribers; |
46 | std::vector<broker::Subscriber::Pointer> subscribers; |
| Line 122... | Line 123... | ||
| 122 | } |
123 | } |
| 123 | } |
124 | } |
| 124 | 125 | ||
| 125 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::System())); |
126 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::System())); |
| 126 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Timer())); |
127 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Timer())); |
| - | 128 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Module())); |
|
| 127 | 129 | ||
| 128 | if (config::Manager::Instance()->Exist("ScriptPath")) |
130 | if (config::Manager::Instance()->Exist("ScriptPath")) |
| 129 | { |
131 | { |
| 130 | vm::Manager::Instance()->Start(config::Manager::Instance()->GetAsString("ScriptPath")); |
132 | vm::Manager::Instance()->Start(config::Manager::Instance()->GetAsString("ScriptPath")); |
| 131 | } |
133 | } |
| Line 145... | Line 147... | ||
| 145 | } |
147 | } |
| 146 | 148 | ||
| 147 | void CleanUp() |
149 | void CleanUp() |
| 148 | { |
150 | { |
| 149 | subscribers.clear(); |
151 | subscribers.clear(); |
| 150 | vm::Manager::Delete(); |
- | |
| 151 | config::Manager::Delete(); |
152 | config::Manager::Delete(); |
| 152 | timer::Manager::Delete(); |
153 | timer::Manager::Delete(); |
| 153 | can::Manager::Delete(); |
154 | can::Manager::Delete(); |
| - | 155 | vm::Manager::Delete(); |
|
| 154 | can::Protocol::Delete(); |
156 | can::Protocol::Delete(); |
| 155 | broker::Manager::Delete(); |
157 | broker::Manager::Delete(); |
| 156 | net::Manager::Delete(); |
158 | net::Manager::Delete(); |
| 157 | } |
159 | } |
| 158 | 160 | ||