Rev 1642 | Rev 1647 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1642 | Rev 1644 | ||
|---|---|---|---|
| Line 103... | Line 103... | ||
| 103 | net::Manager::Create(); |
103 | net::Manager::Create(); |
| 104 | can::Protocol::Create(); |
104 | can::Protocol::Create(); |
| 105 | control::Manager::Create(); |
105 | control::Manager::Create(); |
| 106 | vm::Manager::Create(); |
106 | vm::Manager::Create(); |
| 107 | 107 | ||
| 108 | if (config::Manager::Instance()->Exist("StoragePath")) |
- | |
| 109 | { |
- | |
| 110 | storage::Manager::Instance()->SetRootPath(config::Manager::Instance()->GetAsString("StoragePath")); |
108 | storage::Manager::Instance()->SetRootPath(config::Manager::Instance()->GetAsString("StoragePath")); |
| 111 | } |
- | |
| 112 | 109 | ||
| 113 | if (config::Manager::Instance()->Exist("ProtocolFile")) |
- | |
| 114 | { |
- | |
| 115 | can::Protocol::Instance()->Load(config::Manager::Instance()->GetAsString("ProtocolFile")); |
110 | can::Protocol::Instance()->Load(config::Manager::Instance()->GetAsString("ProtocolFile")); |
| 116 | } |
- | |
| 117 | 111 | ||
| 118 | if (config::Manager::Instance()->Exist("MonitorPort")) |
112 | if (config::Manager::Instance()->Exist("MonitorPort")) |
| 119 | { |
113 | { |
| 120 | subscribers.push_back(can::Monitor::Pointer(new can::Monitor(config::Manager::Instance()->GetAsInt("MonitorPort")))); |
114 | subscribers.push_back(can::Monitor::Pointer(new can::Monitor(config::Manager::Instance()->GetAsInt("MonitorPort")))); |
| 121 | } |
115 | } |
| - | 116 | ||
| - | 117 | subscribers.push_back(control::Manager::Instance()); |
|
| 122 | 118 | ||
| 123 | subscribers.push_back(control::Manager::Instance()); |
- | |
| 124 | - | ||
| 125 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::System(vm::Manager::Instance()->GetIoService( |
119 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::System(vm::Manager::Instance()->GetIoService()))); |
| 126 | - | ||
| 127 | if (config::Manager::Instance()->Exist("CommandPort")) |
- | |
| 128 | { |
- | |
| 129 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Console(vm::Manager::Instance()->GetIoService(), config::Manager::Instance()->GetAsInt("CommandPort")))); |
120 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Console(vm::Manager::Instance()->GetIoService(), config::Manager::Instance()->GetAsInt("CommandPort")))); |
| 130 | } |
- | |
| 131 | - | ||
| 132 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Storage(vm::Manager::Instance()->GetIoService()))); |
121 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Storage(vm::Manager::Instance()->GetIoService()))); |
| 133 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Timer(vm::Manager::Instance()->GetIoService()))); |
122 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Timer(vm::Manager::Instance()->GetIoService()))); |
| 134 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Module(vm::Manager::Instance()->GetIoService()))); |
123 | vm::Manager::Instance()->AddPlugin(vm::Plugin::Pointer(new vm::plugin::Module(vm::Manager::Instance()->GetIoService()))); |
| 135 | 124 | ||
| 136 | if (config::Manager::Instance()->Exist("ScriptPath")) |
- | |
| 137 | { |
- | |
| 138 | vm::Manager::Instance()->Start(config::Manager::Instance()->GetAsString("ScriptPath")); |
125 | vm::Manager::Instance()->Start(config::Manager::Instance()->GetAsString("ScriptPath")); |
| 139 | } |
- | |
| 140 | 126 | ||
| 141 | if (config::Manager::Instance()->Exist("CanNet")) |
127 | if (config::Manager::Instance()->Exist("CanNet")) |
| 142 | { |
128 | { |
| 143 | common::StringList cannetworks = config::Manager::Instance()->GetAsStringVector("CanNet"); |
129 | common::StringList cannetworks = config::Manager::Instance()->GetAsStringVector("CanNet"); |
| 144 | 130 | ||