summaryrefslogtreecommitdiff
path: root/lib/Kratos
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kratos')
-rw-r--r--lib/Kratos/DFADriver.pm5
-rw-r--r--lib/Kratos/DFADriver/Model.pm9
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/Kratos/DFADriver.pm b/lib/Kratos/DFADriver.pm
index 046a013..b7e1200 100644
--- a/lib/Kratos/DFADriver.pm
+++ b/lib/Kratos/DFADriver.pm
@@ -911,6 +911,11 @@ sub to_test_cc {
DeclareThread(DriverEvalThread, driverEvalThread, 256);
+EOF
+
+ $buf .= $self->model->heap_code;
+
+ $buf .= <<"EOF";
void DriverEvalThread::action()
{
Guarded_Buzzer buzzer;
diff --git a/lib/Kratos/DFADriver/Model.pm b/lib/Kratos/DFADriver/Model.pm
index e6f8142..ef821e7 100644
--- a/lib/Kratos/DFADriver/Model.pm
+++ b/lib/Kratos/DFADriver/Model.pm
@@ -156,6 +156,9 @@ sub parse_xml {
if ( my ($node) = $xml->findnodes('/data/startup/code') ) {
$self->{startup}{code} = $node->textContent;
}
+ if ( my ($node) = $xml->findnodes('/data/heap/code') ) {
+ $self->{heap}{code} = $node->textContent;
+ }
if ( my ($node) = $xml->findnodes('/data/after-transition/code') ) {
$self->{after_transition}{code} = $node->textContent;
}
@@ -453,6 +456,12 @@ sub startup_code {
return $self->{startup}{code} // q{};
}
+sub heap_code {
+ my ($self) = @_;
+
+ return $self->{heap}{code} // q{};
+}
+
sub after_transition_code {
my ($self) = @_;