Rev 1602 | Rev 1608 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1602 | Rev 1604 | ||
|---|---|---|---|
| Line 110... | Line 110... | ||
| 110 | { |
110 | { |
| 111 | subscribers.push_back(can::Monitor::Pointer(new can::Monitor(config::Manager::Instance()->GetAsInt("MonitorPort")))); |
111 | subscribers.push_back(can::Monitor::Pointer(new can::Monitor(config::Manager::Instance()->GetAsInt("MonitorPort")))); |
| 112 | } |
112 | } |
| 113 | 113 | ||
| 114 | subscribers.push_back(can::Manager::Instance()); |
114 | subscribers.push_back(can::Manager::Instance()); |
| - | 115 | ||
| - | 116 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::System())); |
|
| - | 117 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Timer())); |
|
| - | 118 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Module())); |
|
| - | 119 | ||
| - | 120 | if (config::Manager::Instance()->Exist("ScriptPath")) |
|
| - | 121 | { |
|
| - | 122 | vm::Manager::Instance()->Start(config::Manager::Instance()->GetAsString("ScriptPath")); |
|
| - | 123 | } |
|
| 115 | 124 | ||
| 116 | if (config::Manager::Instance()->Exist("CanNet")) |
125 | if (config::Manager::Instance()->Exist("CanNet")) |
| 117 | { |
126 | { |
| 118 | type::StringList cannetworks = config::Manager::Instance()->GetAsStringVector("CanNet"); |
127 | type::StringList cannetworks = config::Manager::Instance()->GetAsStringVector("CanNet"); |
| 119 | 128 | ||
| 120 | for (int n = 0; n < cannetworks.size(); n++) |
129 | for (int n = 0; n < cannetworks.size(); n++) |
| 121 | { |
130 | { |
| 122 | subscribers.push_back(can::Network::Pointer(new can::Network(cannetworks[n]))); |
131 | subscribers.push_back(can::Network::Pointer(new can::Network(cannetworks[n]))); |
| 123 | } |
132 | } |
| 124 | } |
- | |
| 125 | - | ||
| 126 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::System())); |
- | |
| 127 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Timer())); |
- | |
| 128 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Module())); |
- | |
| 129 | - | ||
| 130 | if (config::Manager::Instance()->Exist("ScriptPath")) |
- | |
| 131 | { |
- | |
| 132 | vm::Manager::Instance()->Start(config::Manager::Instance()->GetAsString("ScriptPath")); |
- | |
| 133 | } |
133 | } |
| 134 | 134 | ||
| 135 | LOG.Info("Initialization complete."); |
135 | LOG.Info("Initialization complete."); |
| 136 | 136 | ||
| 137 | boost::mutex::scoped_lock guard(guard_mutex); |
137 | boost::mutex::scoped_lock guard(guard_mutex); |