MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_line_value()

MAYAFLUX_API float * MayaFlux::get_line_value ( const std::string &  name)

Gets a pointer to a task's current value.

Parameters
nameName of the task
Returns
Pointer to the float value, or nullptr if not found

Definition at line 85 of file Chronie.cpp.

86{
87 if (auto task = get_scheduler()->get_task(name)) {
88 auto cur_val = task->get_state<float>("current_value");
89 if (cur_val) {
90 return cur_val;
91 }
92
93 MF_ERROR(Journal::Component::API, Journal::Context::CoroutineScheduling, "line value not returned from task. Verify that tasks has not returned");
94 return nullptr;
95 }
96 MF_ERROR(Journal::Component::API, Journal::Context::CoroutineScheduling, "Task: {} not found. Verify task validity or if its been scheduled, or its set to retain after completion", name);
97 return nullptr;
98}
#define MF_ERROR(comp, ctx,...)
std::shared_ptr< Vruta::TaskScheduler > get_scheduler()
Gets the task scheduler from the default engine.
Definition Chronie.cpp:22

References MayaFlux::Journal::API, MayaFlux::Journal::CoroutineScheduling, get_scheduler(), and MF_ERROR.

+ Here is the call graph for this function: