MayaFlux 0.3.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

Convenience wrapper for Engine::get_line_value() on the default engine.

Definition at line 87 of file Chronie.cpp.

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

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

+ Here is the call graph for this function: