MayaFlux 0.1.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 81 of file Chronie.cpp.

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

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

+ Here is the call graph for this function: