| 8 | namespace aimrt::examples::cpp::executor::executor_module { |
| 9 | |
| 10 | bool ExecutorModule::Initialize(aimrt::CoreRef core) { |
| 11 | // Save aimrt framework handle |
| 12 | core_ = core; |
| 13 | |
| 14 | // Get executor |
| 15 | work_executor_ = core_.GetExecutorManager().GetExecutor("work_executor"); |
| 16 | AIMRT_CHECK_ERROR_THROW(work_executor_, "Can not get work_executor"); |
| 17 | |
| 18 | // Get thread safe executor |
| 19 | thread_safe_executor_ = core_.GetExecutorManager().GetExecutor("thread_safe_executor"); |
| 20 | AIMRT_CHECK_ERROR_THROW(thread_safe_executor_ && thread_safe_executor_.ThreadSafe(), |
| 21 | "Can not get thread_safe_executor"); |
| 22 | |
| 23 | // Get time schedule executor |
| 24 | time_schedule_executor_ = core_.GetExecutorManager().GetExecutor("time_schedule_executor"); |
| 25 | AIMRT_CHECK_ERROR_THROW(time_schedule_executor_ && time_schedule_executor_.SupportTimerSchedule(), |
| 26 | "Can not get time_schedule_executor"); |
| 27 | |
| 28 | AIMRT_INFO("Init succeeded."); |
| 29 | |
| 30 | return true; |
| 31 | } |
| 32 | |
| 33 | bool ExecutorModule::Start() { |
| 34 | // Test simple execute |
nothing calls this directly
no test coverage detected