Activity-Lang: create standard wiring for CALC-Term
This commit is contained in:
parent
80a48abcf4
commit
3bd4305dab
2 changed files with 70 additions and 7 deletions
|
|
@ -53,6 +53,7 @@
|
|||
#include "lib/time/timevalue.hpp"
|
||||
//#include "lib/util.hpp"
|
||||
|
||||
//#include <tuple>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
|
|
@ -129,9 +130,24 @@ namespace gear {
|
|||
void
|
||||
configureTemplate (Template kind)
|
||||
{
|
||||
|
||||
switch (kind) {
|
||||
case CALC_JOB:
|
||||
setupGate();
|
||||
insertWorkBracket();
|
||||
break;
|
||||
case LOAD_JOB:
|
||||
UNIMPLEMENTED ("wiring for async job");
|
||||
break;
|
||||
case META_JOB:
|
||||
/* use the minimal default wiring */
|
||||
break;
|
||||
default:
|
||||
NOTREACHED ("uncovered Activity verb in activation function.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Activity*
|
||||
setupInvocation (Job& job)
|
||||
{
|
||||
|
|
@ -153,6 +169,44 @@ namespace gear {
|
|||
{
|
||||
return & alloc_.create (start,after,followUp);
|
||||
}
|
||||
|
||||
void
|
||||
setupGate()
|
||||
{
|
||||
if (gate_) return;
|
||||
gate_ = & alloc_.create (0, Time{post_->data_.timeWindow.dead});
|
||||
insert (post_, gate_);
|
||||
}
|
||||
|
||||
void
|
||||
insertWorkBracket()
|
||||
{
|
||||
auto start = alloc_.create (Activity::WORKSTART);
|
||||
auto stop = alloc_.create (Activity::WORKSTOP);
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1283 define the "quality" parameter to distinguish observable execution times
|
||||
|
||||
insert (gate_? gate_: post_, &start);
|
||||
insert (findTail (start.next), &stop);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
insert (Activity* anchor, Activity* target)
|
||||
{
|
||||
REQUIRE (anchor);
|
||||
REQUIRE (target);
|
||||
target->next = anchor->next;
|
||||
anchor->next = target;
|
||||
}
|
||||
|
||||
static Activity*
|
||||
findTail (Activity* chain)
|
||||
{
|
||||
REQUIRE (chain);
|
||||
while (chain->next)
|
||||
chain = chain->next;
|
||||
return chain;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -80111,8 +80111,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1689200547247" ID="ID_1506436785" MODIFIED="1693269217510" TEXT="termBuilder">
|
||||
<arrowlink COLOR="#4e4671" DESTINATION="ID_469443507" ENDARROW="Default" ENDINCLINATION="-463;535;" ID="Arrow_ID_1203697100" STARTARROW="None" STARTINCLINATION="-890;-116;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1693269179507" ID="ID_286775090" LINK="#ID_1334461256" MODIFIED="1693275234891" TEXT="einfachst möglichen activity::Term konstruieren">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1693269179507" ID="ID_286775090" LINK="#ID_1334461256" MODIFIED="1693323260073" TEXT="einfachst möglichen activity::Term konstruieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1693269232884" ID="ID_1940626454" MODIFIED="1693269393485" TEXT="ActivityDetector stellt auch Dummy-Job bereit">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
|
|
@ -80139,13 +80139,13 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693269199928" ID="ID_185134867" MODIFIED="1693269214903" TEXT="minimale Ausstattung verifizieren">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1693269199928" ID="ID_185134867" MODIFIED="1693323275781" TEXT="minimale Ausstattung verifizieren">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1693275251993" ID="ID_101711182" MODIFIED="1693275264459" TEXT="Ankerpunkt ist eine POST-Activity">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693269490081" ID="ID_815043128" MODIFIED="1693269501096" TEXT="POST hat das Timing-Window übernommen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1693269490081" ID="ID_815043128" MODIFIED="1693323265343" TEXT="POST hat das Timing-Window übernommen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693269535563" ID="ID_1083096028" MODIFIED="1693275264466" TEXT="Activities sind verlinkt">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
|
|
@ -80168,12 +80168,21 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689200553782" ID="ID_472609287" MODIFIED="1689200578260" TEXT="scenario_RenderJob">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1693323299522" ID="ID_1282022548" MODIFIED="1693323306513" TEXT="Grundstruktur verdrahten">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689200553782" ID="ID_1346681233" MODIFIED="1689200586861" TEXT="scenario_IOJob">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1693323299522" ID="ID_392906930" MODIFIED="1693323317032" TEXT="Grundstruktur verdrahten">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1689200553782" ID="ID_722630098" MODIFIED="1689200595611" TEXT="scenario_MetaJob">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1693323319980" ID="ID_1996463444" MODIFIED="1693323335269" TEXT="die minimale default-Verdrahtung genügt">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue