| 191 | } |
| 192 | |
| 193 | void ProcessGroup::startProcessing(const std::shared_ptr<TimerDrivenSchedulingAgent>& timeScheduler, const std::shared_ptr<EventDrivenSchedulingAgent> &eventScheduler, |
| 194 | const std::shared_ptr<CronDrivenSchedulingAgent> &cronScheduler) { |
| 195 | std::lock_guard<std::recursive_mutex> lock(mutex_); |
| 196 | |
| 197 | try { |
| 198 | failed_processors_ = processors_; // All processors are marked as failed. |
| 199 | |
| 200 | // Start all the processor node, input and output ports |
| 201 | startProcessingProcessors(timeScheduler, eventScheduler, cronScheduler); |
| 202 | |
| 203 | // Start processing the group |
| 204 | for (auto processGroup : child_process_groups_) { |
| 205 | processGroup->startProcessing(timeScheduler, eventScheduler, cronScheduler); |
| 206 | } |
| 207 | } catch (std::exception &exception) { |
| 208 | logger_->log_debug("Caught Exception %s", exception.what()); |
| 209 | throw; |
| 210 | } catch (...) { |
| 211 | logger_->log_debug("Caught Exception during process group start processing"); |
| 212 | throw; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | void ProcessGroup::stopProcessing(const std::shared_ptr<TimerDrivenSchedulingAgent>& timeScheduler, const std::shared_ptr<EventDrivenSchedulingAgent> &eventScheduler, |
| 217 | const std::shared_ptr<CronDrivenSchedulingAgent> &cronScheduler, const std::function<bool(const std::shared_ptr<Processor>&)>& filter) { |