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

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

Definition at line 89 of file Chronie.cpp.

90{
91 if (auto task = get_scheduler()->get_task(name)) {
92 auto cur_val = task->get_state<float>("current_value");
93 if (cur_val) {
94 return cur_val;
95 }
96
97 MF_ERROR(Journal::Component::API, Journal::Context::CoroutineScheduling, "line value not returned from task. Verify that tasks has not returned");
98 return nullptr;
99 }
100 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);
101 return nullptr;
102}
#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: