Activity-Lang: setup to watch a Gate-Activity
ouch... this becomes kindof convoluted, due to the lack of dynamic extension points
This commit is contained in:
parent
f0d71672d8
commit
8a85e57235
3 changed files with 45 additions and 6 deletions
|
|
@ -296,7 +296,7 @@ namespace test {
|
|||
|
||||
|
||||
/** @test inject (prepend) an ActivationTap into existing wiring
|
||||
* @todo WIP 8/23 ✔ define 🔁 implement
|
||||
* @todo WIP 8/23 ✔ define ✔ implement
|
||||
*/
|
||||
void
|
||||
insert_ActivationTap()
|
||||
|
|
@ -337,11 +337,24 @@ namespace test {
|
|||
|
||||
|
||||
/** @test TODO diagnostic setup to watch Activity::GATE activation
|
||||
* @todo WIP 7/23 ⟶ define ⟶ implement
|
||||
* @todo WIP 7/23 🔁 define ⟶ implement
|
||||
*/
|
||||
void
|
||||
watch_gate()
|
||||
{
|
||||
ActivityDetector detector;
|
||||
|
||||
Activity gate{0};
|
||||
Activity followUp;
|
||||
gate.next = &followUp;
|
||||
|
||||
Activity* wiring = &gate;
|
||||
detector.watchGate (wiring);
|
||||
|
||||
Time tt{5,5};
|
||||
wiring->activate(tt, detector.executionCtx);
|
||||
|
||||
cout<<detector.showLog()<<endl;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -502,6 +502,22 @@ namespace test {
|
|||
return *wiring;
|
||||
}
|
||||
|
||||
Activity&
|
||||
buildGateWatcher (Activity& gate)
|
||||
{
|
||||
Activity& watcher = buildActivationTap (gate);
|
||||
insertActivationTap (gate.next, "after"+gate.showVerb()+util::showAddr(gate));
|
||||
return watcher;
|
||||
}
|
||||
|
||||
Activity&
|
||||
watchGate (Activity*& wiring)
|
||||
{
|
||||
wiring = wiring? & buildGateWatcher (*wiring)
|
||||
: & buildActivationProbe ("tail-"+util::showAddr(&wiring));
|
||||
return *wiring;
|
||||
}
|
||||
|
||||
|
||||
struct FakeExecutionCtx;
|
||||
using SIG_post = activity::Proc(Time, Activity&, FakeExecutionCtx&);
|
||||
|
|
|
|||
|
|
@ -82282,15 +82282,18 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689205423173" ID="ID_935068564" MODIFIED="1689205426133" TEXT="watchGate">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689205423173" ID="ID_935068564" MODIFIED="1692487675023" TEXT="watchGate">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1692485210898" ID="ID_1284233307" MODIFIED="1692485224634" TEXT="komplexe Aufgabe">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1692485226036" ID="ID_1556332540" MODIFIED="1692485237497" TEXT="das Gate bietet eigentlich keine Erweiterungspunkte"/>
|
||||
<node CREATED="1692485238133" ID="ID_904790600" MODIFIED="1692485265925" TEXT="zudem müssen mehrere Ein/Ausgänge überwacht werden"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1692485300157" ID="ID_1563739402" MODIFIED="1692485367133" TEXT="ActivityProbe vorschalten">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1692487689444" ID="ID_1980202996" MODIFIED="1692487705987" TEXT="sinnvolle IDs für die Verifikation erzeugen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1692485300157" ID="ID_1563739402" MODIFIED="1692487715332" TEXT="ActivityProbe vorschalten">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1692485311859" ID="ID_1216045769" MODIFIED="1692485364424" TEXT="diese kann Aktivierung aufzeichnen">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
|
|
@ -82298,6 +82301,13 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1692485417998" ID="ID_856616436" MODIFIED="1692487971912" TEXT="zudem Probe auf den next-Ptr legen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1692485434421" ID="ID_1307528934" MODIFIED="1692487980102" TEXT="passende ID hierfür vergeben">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node CREATED="1692485443450" ID="ID_577582748" MODIFIED="1692485453069" TEXT="damit wird überprüfbar, wenn das Gate "feuert""/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue