Lumiera  0.pre.03
»edit your freedom«
ActivityDetector::ActivityProbe Class Reference

Description

A rigged CALLBACK-Activity to watch passing of activations.

Definition at line 352 of file activity-detector.hpp.

Public Member Functions

 ActivityProbe (string id, EventLog &masterLog, uint const &invocationSeqNr)
 
 ActivityProbe (Activity const &subject, string id, EventLog &masterLog, uint const &invocationSeqNr)
 
 operator string () const
 
- Public Member Functions inherited from Activity
 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
 
template<class EXE >
activity::Proc activate (Time now, EXE &executionCtx)
 Core Operation: Activate and perform this Activity. More...
 
Time constrainedDeath (Time death)
 
Time constrainedStart (Time start)
 
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. More...
 
void incDependencies ()
 
bool is (Activity::Verb expectedVerb) const
 
 operator std::string () const
 diagnostic representation
 
void setNotificationTarget (Activity *target, Time limitStart=Time::ANYTIME)
 
std::string showData () const
 
std::string showVerb () const
 
- Public Member Functions inherited from Hook
virtual ~Hook ()
 this is an interface
 
 operator std::string () const
 

Static Public Member Functions

static Time lastInvoked (Activity const *act)
 

Private Member Functions

activity::Proc activation (Activity &thisHook, Time now, void *executionCtx) override
 Callback on activation of the corresponding HOOK-Activity. More...
 
std::string diagnostic () const override
 
Time getDeadline () const override
 
activity::Proc notify (Activity &thisHook, Time now, void *executionCtx) override
 Callback when dispatching a NOTIFY-Activity to thisHook.
 
Activitytarget ()
 
Activity const * target () const
 

Private Attributes

TimeVar invoked_ {Time::ANYTIME}
 
Logger log_
 

Additional Inherited Members

- Public Types inherited from Activity
enum  Verb {
  INVOKE,
  WORKSTART,
  WORKSTOP,
  NOTIFY,
  GATE,
  POST,
  FEED,
  HOOK,
  TICK
}
 All possible kinds of activities. More...
 
- Public Attributes inherited from Activity
ArgumentData data_
 
Activitynext
 Activities are organised into chains to represent relations based on verbs.
 
const Verb verb_
 

Member Function Documentation

◆ activation()

activity::Proc activation ( Activity thisHook,
Time  now,
void *  executionCtx 
)
inlineoverrideprivatevirtual

Callback on activation of the corresponding HOOK-Activity.

Parameters
thisHookthe Activity record wired to this hook
nowcurrent »wall-clock-time« as used by the Scheduler
executionCtxopaque pointer to the actual execution context
Returns
decision how to proceed with the activation
Remarks
the intended use is to rig this callback based on additional knowledge regarding the usage context. Through thisHook, the follow-up chain is accessible, and an additional payload data field (size_t). Since the execution context is a concept, it is necessary to know the actual type of the concrete execution context and cast down in the implementation. This mechanism is used especially for detecting expected test invocations.

Implements Hook.

Definition at line 372 of file activity-detector.hpp.

References Activity::HOOK.

+ Inheritance diagram for ActivityDetector::ActivityProbe:
+ Collaboration diagram for ActivityDetector::ActivityProbe:

The documentation for this class was generated from the following file: