Rev 1614 | Rev 1627 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1614 | Rev 1619 | ||
|---|---|---|---|
| Line 34... | Line 34... | ||
| 34 | 34 | ||
| 35 | Manager::Pointer Manager::instance_; |
35 | Manager::Pointer Manager::instance_; |
| 36 | 36 | ||
| 37 | Manager::Manager() : broker::Subscriber(false), LOG("can::Manager") |
37 | Manager::Manager() : broker::Subscriber(false), LOG("can::Manager") |
| 38 | { |
38 | { |
| - | 39 | // Nyquist–Shannon sampling theorem state that we need to double the time, modules send every 10 seconds |
|
| 39 | this->timer_id_ = timer::Manager::Instance()->Set( |
40 | this->timer_id_ = timer::Manager::Instance()->Set(20000, true); |
| 40 | } |
41 | } |
| 41 | 42 | ||
| 42 | Manager::~Manager() |
43 | Manager::~Manager() |
| 43 | { |
44 | { |
| 44 | } |
45 | } |
| Line 160... | Line 161... | ||
| 160 | LOG.Info("Module " + module->GetFullId() + " is available on node " + type::ToHex(node->GetId()) + "."); |
161 | LOG.Info("Module " + module->GetFullId() + " is available on node " + type::ToHex(node->GetId()) + "."); |
| 161 | this->signal_on_module_change_(module->GetFullId(), true); |
162 | this->signal_on_module_change_(module->GetFullId(), true); |
| 162 | } |
163 | } |
| 163 | else |
164 | else |
| 164 | { |
165 | { |
| - | 166 | node = this->GetNode(module->GetNodeId()); |
|
| - | 167 | node->ResetTimeout(); |
|
| - | 168 | ||
| 165 | this->signal_on_module_message_(module->GetFullId(), payload->GetCommandName(), payload->GetVariables()); |
169 | this->signal_on_module_message_(module->GetFullId(), payload->GetCommandName(), payload->GetVariables()); |
| 166 | } |
170 | } |
| 167 | } |
171 | } |
| 168 | } |
172 | } |
| 169 | } |
173 | } |