![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "vault/gear/activity.hpp"
Record to describe an Activity, to happen within the Scheduler's control flow.
Definition at line 226 of file activity.hpp.
Classes | |
| union | ArgumentData |
| Storage of Argument data dependent on Activity::verb_. More... | |
| struct | Callback |
| Extension point to invoke. More... | |
| struct | Condition |
| Access gate condition to evaluate. More... | |
| struct | Feed |
| Payload data to provide. More... | |
| struct | Invocation |
| External work functor to activate. More... | |
| struct | Notification |
| Notification towards another Activity. More... | |
| struct | TimeWindow |
| Time window to define for activation. More... | |
| struct | Timing |
| Timing observation to propagate. More... | |
Public Types | |
| enum | Verb { INVOKE , WORKSTART , WORKSTOP , NOTIFY , GATE , POST , FEED , HOOK , TICK } |
| All possible kinds of activities. More... | |
Public Attributes | |
| const Verb | verb_ |
| Activity * | next |
| Activities are organised into chains to represent relations based on verbs. | |
| ArgumentData | data_ |
Public Member Functions | |
| Activity (Verb verb) noexcept | |
| Activity (uint64_t o1, uint64_t o2) noexcept | |
| Activity (JobFunctor &job, Time nominalTime, Activity &feed) noexcept | |
| Activity (Activity *target, Time limitWhen=Time::ANYTIME) noexcept | |
| Activity (int expectNotifications, Time deadline=Time::NEVER) noexcept | |
| Activity (Time when, Activity *followUp) noexcept | |
| Activity (Time start, Time after, Activity *followUp) noexcept | |
| Activity (activity::Hook &callback, size_t arg) noexcept | |
| Activity () noexcept | |
| operator std::string () const | |
| diagnostic representation | |
| std::string | showVerb () const |
| std::string | showData () const |
| template<class EXE > | |
| activity::Proc | activate (Time now, EXE &executionCtx) |
| Core Operation: Activate and perform this Activity. | |
| template<class EXE > | |
| activity::Proc | dispatch (Time now, EXE &executionCtx) |
Entrance point for an activation, which has been dispatched indirectly through the dispatch and/or priority queue; typically this is achieved by invoking the post-λ on the executionCtx, or by activating a POST-Activity. | |
| bool | is (Activity::Verb expectedVerb) const |
| void | incDependencies () |
| void | setNotificationTarget (Activity *target, Time limitStart=Time::ANYTIME) |
| Time | constrainedStart (Time start) |
| Time | constrainedDeath (Time death) |
Private Types | |
| using | Instant = activity::Instant |
Private Member Functions | |
| void | setDefaultArg (Verb verb) noexcept |
| activity::Proc | invokeFunktor (Time) noexcept |
| template<class EXE > | |
| activity::Proc | signalStart (Time now, EXE &executionCtx) |
| template<class EXE > | |
| activity::Proc | signalStop (Time now, EXE &executionCtx) |
| template<class EXE > | |
| activity::Proc | checkGate (Time now, EXE &) |
| activity::Proc | receiveGateNotification (Time now) |
| template<class EXE > | |
| activity::Proc | postSelf (Time now, EXE &executionCtx) |
| template<class EXE > | |
| activity::Proc | postNotify (Time now, EXE &executionCtx) |
| template<class EXE > | |
| activity::Proc | callHook (Time now, EXE &executionCtx) |
| template<class EXE > | |
| activity::Proc | notifyHook (Time now, EXE &executionCtx) |
| template<class EXE > | |
| activity::Proc | doTick (Time now, EXE &executionCtx) |
Definition at line 333 of file activity.hpp.
|
inlinenoexcept |
Definition at line 345 of file activity.hpp.
References Activity::FEED.
|
inlinenoexcept |
Definition at line 352 of file activity.hpp.
References Activity::INVOKE.
|
inlineexplicitnoexcept |
Definition at line 361 of file activity.hpp.
References Activity::NOTIFY.
|
inlineexplicitnoexcept |
Definition at line 369 of file activity.hpp.
References Activity::GATE.
Definition at line 376 of file activity.hpp.
References Activity::POST.
Definition at line 383 of file activity.hpp.
References Activity::POST.
|
inlinenoexcept |
Definition at line 390 of file activity.hpp.
References Activity::HOOK.
|
inlinenoexcept |
Definition at line 397 of file activity.hpp.
References Activity::TICK.
| union vault::gear::Activity::ArgumentData |
| Class Members | ||
|---|---|---|
| Feed | feed | |
| Timing | timing | |
| Callback | callback | |
| Condition | condition | |
| TimeWindow | timeWindow | |
| Invocation | invocation | |
| Notification | notification | |
Collaboration diagram for Activity::ArgumentData:| struct vault::gear::Activity::Callback |
| struct vault::gear::Activity::Feed |
| struct vault::gear::Activity::Invocation |
| struct vault::gear::Activity::Notification |
| struct vault::gear::Activity::TimeWindow |
| struct vault::gear::Activity::Timing |
|
private |
Definition at line 228 of file activity.hpp.
| enum Verb |
All possible kinds of activities.
| Enumerator | |
|---|---|
| INVOKE | dispatch a JobFunctor into a worker thread |
| WORKSTART | signal start of some processing and transition grooming mode ⟼ *work mode |
| WORKSTOP | correspondingly signal end of some processing |
| NOTIFY | push a message to another Activity |
| GATE | probe window + count-down; activate next Activity, else re-schedule |
| POST | post a message providing a chain of further time-bound Activities |
| FEED | supply additional payload data for a preceding Activity |
| HOOK | invoke an extension point through the activity::Hook interface |
| TICK | internal engine »heart beat« for internal maintenance hook(s) |
Definition at line 232 of file activity.hpp.
| operator std::string | ( | ) | const |
diagnostic representation
| string showVerb | ( | ) | const |
Definition at line 70 of file activity-lang.cpp.
References Activity::FEED, Activity::GATE, Activity::HOOK, Activity::INVOKE, Activity::NOTIFY, Activity::POST, Activity::TICK, Activity::verb_, Activity::WORKSTART, and Activity::WORKSTOP.
Referenced by ActivityDetector::buildActivationTap(), and ActivityDetector::buildGateWatcher().
Here is the caller graph for this function:| string showData | ( | ) | const |
Definition at line 87 of file activity-lang.cpp.
References Activity::Callback::arg, Activity::ArgumentData::callback, Activity::ArgumentData::condition, Activity::data_, Activity::Condition::dead, Activity::TimeWindow::dead, Activity::FEED, Activity::ArgumentData::feed, Activity::GATE, Activity::HOOK, Activity::Callback::hook, Activity::Timing::instant, Activity::ArgumentData::invocation, Activity::INVOKE, Activity::TimeWindow::life, Activity::ArgumentData::notification, Activity::NOTIFY, Activity::Feed::one, Activity::POST, Activity::Timing::quality, Activity::Condition::rest, util::showAdr(), util::showPtr(), Activity::Notification::target, Activity::Invocation::task, Activity::TICK, Activity::Invocation::time, Activity::ArgumentData::timeWindow, Activity::Notification::timing, Activity::ArgumentData::timing, util::toString(), Activity::Feed::two, Activity::verb_, Activity::WORKSTART, and Activity::WORKSTOP.
Here is the call graph for this function:| activity::Proc activate | ( | Time | now, |
| EXE & | executionCtx | ||
| ) |
Core Operation: Activate and perform this Activity.
| EXE | concrete binding for the execution context |
| now | current _»wall clock time« (time used for scheduling) |
post : dispatch the given Activity with start timework : drop the GroomingToken and start processingdone : record the end time of a media computationtick : regular maintenance hook nextDefinition at line 626 of file activity.hpp.
References Activity::callHook(), Activity::checkGate(), Activity::doTick(), Activity::FEED, Activity::GATE, Activity::HOOK, Activity::INVOKE, Activity::invokeFunktor(), Activity::NOTIFY, vault::gear::activity::PASS, Activity::POST, Activity::postNotify(), Activity::postSelf(), Activity::signalStart(), Activity::signalStop(), Activity::TICK, Activity::verb_, Activity::WORKSTART, and Activity::WORKSTOP.
Referenced by ActivityLang::activateChain(), ActivityDetector::ActivityProbe::activation(), Activity::dispatch(), ActivityDetector_test::insert_ActivationTap(), SchedulerCommutator_test::verify_Significance(), SchedulerActivity_test::verifyActivity_Gate_block(), SchedulerActivity_test::verifyActivity_Gate_dead(), SchedulerActivity_test::verifyActivity_Gate_opened(), SchedulerActivity_test::verifyActivity_Gate_pass(), ActivityDetector_test::watch_ActivationProbe(), ActivityDetector_test::watch_ActivationTap(), ActivityDetector_test::watch_gate(), and ActivityDetector_test::watch_notification().
Here is the call graph for this function:
Here is the caller graph for this function:| activity::Proc dispatch | ( | Time | now, |
| EXE & | executionCtx | ||
| ) |
Entrance point for an activation, which has been dispatched indirectly through the dispatch and/or priority queue; typically this is achieved by invoking the post-λ on the executionCtx, or by activating a POST-Activity.
Control flow passing here has acquired the GroomingToken and can thus assume single threaded execution until WORKSTART.
Notably this entrance is used to implement gating to wait for prerequisites; when a notification is passed to a GATE-Activity, the embedded counter is decremented; after all prerequisites are „checked off“ this way, the Activity-chain behind the Gate is activated.
| now | the scheduler-time; assuming that a call through the post-λ will only be actually de-queued when scheduler-time equals the start time defined in the POST activity and passed through the post-λ as parameter. |
NOTIFY-Activity: it is not activated itself, rather the #notify operation is invoked on its target argument; this is necessary since a notification passes control-flow outside the regular linear next-chain. Definition at line 676 of file activity.hpp.
References Activity::activate(), Activity::FEED, Activity::GATE, Activity::HOOK, Activity::notifyHook(), vault::gear::activity::PASS, Activity::POST, Activity::receiveGateNotification(), and Activity::verb_.
Referenced by ActivityLang::dispatchChain(), ActivityDetector::ActivityProbe::notify(), SchedulerActivity_test::verifyActivity_Gate_notify(), and SchedulerActivity_test::verifyActivity_Gate_opened().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 422 of file activity.hpp.
References Activity::verb_.
Referenced by ActivityDetector::ActivityProbe::activation(), Activity::constrainedDeath(), Activity::constrainedStart(), Term::expectNotification(), ActivityDetector::ActivityProbe::getDeadline(), Activity::incDependencies(), ActivityDetector::ActivityProbe::notify(), Activity::postNotify(), Activity::postSelf(), SchedulerActivity_test::scenario_IOJob(), SchedulerActivity_test::scenario_MetaJob(), SchedulerActivity_test::scenario_Notification(), Activity::setNotificationTarget(), Term::setupGate(), Term::severAsyncChain(), SchedulerActivity_test::verifyActivity_Post(), and ActivityDetector_test::watch_ActivationProbe().
Here is the caller graph for this function:
|
inline |
Definition at line 428 of file activity.hpp.
References Activity::ArgumentData::condition, Activity::data_, Activity::GATE, Activity::Condition::incDependencies(), and Activity::is().
Referenced by Term::expectNotification().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 435 of file activity.hpp.
References Activity::data_, Activity::is(), Activity::ArgumentData::notification, Activity::NOTIFY, Activity::Notification::target, and Activity::Notification::timing.
Referenced by Term::expectNotification().
Here is the call graph for this function:
Here is the caller graph for this function:| start | constrain by a POST-Activity's start time |
Definition at line 443 of file activity.hpp.
References Activity::data_, Activity::is(), Activity::TimeWindow::life, util::max(), Activity::POST, and Activity::ArgumentData::timeWindow.
Referenced by ActivationEvent::refineTo().
Here is the call graph for this function:
Here is the caller graph for this function:| death | constrain by a POST-Activity's deadline |
Definition at line 450 of file activity.hpp.
References Activity::data_, Activity::TimeWindow::dead, Activity::is(), util::min(), Activity::POST, and Activity::ArgumentData::timeWindow.
Referenced by ActivationEvent::refineTo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivatenoexcept |
Definition at line 459 of file activity.hpp.
References Time::ANYTIME, Activity::ArgumentData::condition, Activity::data_, Activity::Condition::dead, Activity::TimeWindow::dead, Activity::GATE, Activity::Timing::instant, Activity::ArgumentData::invocation, Activity::INVOKE, Activity::TimeWindow::life, Time::NEVER, Activity::POST, Activity::Condition::rest, Activity::Invocation::time, Activity::ArgumentData::timeWindow, Activity::ArgumentData::timing, Activity::WORKSTART, and Activity::WORKSTOP.
|
inlineprivatenoexcept |
Definition at line 485 of file activity.hpp.
References Activity::data_, Activity::FEED, Activity::ArgumentData::feed, vault::gear::activity::HALT, Activity::ArgumentData::invocation, Activity::INVOKE, JobClosure::invokeJobOperation(), Activity::next, ON_EXCEPTION_RETURN, Activity::Feed::one, vault::gear::activity::PASS, Activity::Invocation::task, Activity::Invocation::time, Activity::Feed::two, and Activity::verb_.
Referenced by Activity::activate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 511 of file activity.hpp.
References Activity::data_, vault::gear::activity::PASS, Activity::Timing::quality, and Activity::ArgumentData::timing.
Referenced by Activity::activate().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 519 of file activity.hpp.
References Activity::data_, vault::gear::activity::PASS, Activity::Timing::quality, and Activity::ArgumentData::timing.
Referenced by Activity::activate().
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 527 of file activity.hpp.
References Activity::ArgumentData::condition, Activity::data_, Activity::GATE, Activity::Condition::isDead(), Activity::Condition::isHold(), vault::gear::activity::PASS, vault::gear::activity::SKIP, and Activity::verb_.
Referenced by Activity::activate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 539 of file activity.hpp.
References Activity::ArgumentData::condition, Activity::data_, Activity::GATE, Activity::Condition::isFree(), Activity::Condition::lockPermanently(), vault::gear::activity::PASS, Activity::Condition::rest, vault::gear::activity::SKIP, and Activity::verb_.
Referenced by Activity::dispatch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 556 of file activity.hpp.
References Activity::data_, Activity::TimeWindow::dead, Activity::is(), Activity::TimeWindow::life, Time::NEVER, Activity::next, Activity::POST, and Activity::ArgumentData::timeWindow.
Referenced by Activity::activate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 567 of file activity.hpp.
References Activity::ArgumentData::callback, Activity::ArgumentData::condition, Activity::data_, Activity::GATE, Activity::Condition::getDeadline(), Hook::getDeadline(), Activity::HOOK, Activity::Callback::hook, Activity::is(), Time::NEVER, Activity::ArgumentData::notification, Activity::NOTIFY, Activity::Notification::target, and Activity::Notification::timing.
Referenced by Activity::activate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 585 of file activity.hpp.
References Hook::activation(), Activity::ArgumentData::callback, Activity::data_, Activity::Callback::hook, and vault::gear::activity::PASS.
Referenced by Activity::activate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 593 of file activity.hpp.
References Activity::ArgumentData::callback, Activity::data_, Activity::Callback::hook, Hook::notify(), and vault::gear::activity::PASS.
Referenced by Activity::dispatch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
Definition at line 601 of file activity.hpp.
Referenced by Activity::activate().
Here is the caller graph for this function:| const Verb verb_ |
Definition at line 243 of file activity.hpp.
Referenced by Activity::activate(), Activity::checkGate(), Activity::dispatch(), BlockFlow_test::handleEpoch(), ActivityDetector_test::insert_ActivationTap(), Activity::invokeFunktor(), Activity::is(), ActivityDetector::ActivityProbe::lastInvoked(), Activity::receiveGateNotification(), Activity::showData(), Activity::showVerb(), and BlockFlow_test::simpleUsage().
| Activity* next |
Activities are organised into chains to represent relations based on verbs.
Definition at line 249 of file activity.hpp.
Referenced by ActivityDetector::ActivityProbe::ActivityProbe(), Epoch< ALO >::EpochGate::EpochGate(), ActivityLang::activateChain(), ActivityDetector::buildGateWatcher(), Epoch< ALO >::EpochGate::claimNextSlot(), SchedulerActivity_test::dispatchChain(), ActivityLang::dispatchChain(), Epoch< ALO >::EpochGate::filledSlots(), Term::findTail(), Epoch< ALO >::EpochGate::hasFreeSlot(), Term::insert(), ActivityDetector_test::insert_ActivationTap(), Term::insertWorkBracket(), SchedulerCommutator_test::integratedWorkCycle(), Activity::invokeFunktor(), Activity::postSelf(), SchedulerActivity_test::scenario_IOJob(), SchedulerActivity_test::scenario_MetaJob(), SchedulerActivity_test::scenario_Notification(), SchedulerActivity_test::scenario_RenderJob(), Term::setupInvocation(), Term::severAsyncChain(), SchedulerActivity_test::verifyActivity_Gate_block(), SchedulerActivity_test::verifyActivity_Gate_notify(), SchedulerActivity_test::verifyActivity_Gate_opened(), SchedulerActivity_test::verifyActivity_Gate_pass(), SchedulerActivity_test::verifyActivity_Invoke(), SchedulerActivity_test::verifyActivity_Post(), ActivityDetector_test::watch_ActivationTap(), ActivityDetector_test::watch_gate(), and ActivityDetector_test::watch_notification().
| ArgumentData data_ |
Definition at line 329 of file activity.hpp.
Referenced by Activity::callHook(), Activity::checkGate(), Activity::constrainedDeath(), Activity::constrainedStart(), Epoch< ALO >::EpochGate::deadline(), Term::expectNotification(), ActivityDetector::ActivityProbe::getDeadline(), BlockFlow_test::handleEpoch(), Activity::incDependencies(), ActivityDetector_test::insert_ActivationTap(), Activity::invokeFunktor(), Epoch< ALO >::EpochGate::isAlive(), ActivityDetector::ActivityProbe::lastInvoked(), Activity::notifyHook(), Activity::postNotify(), Activity::postSelf(), Activity::receiveGateNotification(), SchedulerActivity_test::scenario_IOJob(), SchedulerActivity_test::scenario_Notification(), Activity::setDefaultArg(), Activity::setNotificationTarget(), Term::setupGate(), Activity::showData(), Activity::signalStart(), Activity::signalStop(), ActivityDetector::ActivityProbe::target(), and SchedulerActivity_test::verifyActivity_Notify().
Inheritance diagram for Activity:
Collaboration diagram for Activity: