Commit 9cd32554 authored by Maxime Perrotin's avatar Maxime Perrotin

Add Demo_RI_Names

parent 9a9245ba
This diff is collapsed.
---------------------------------------------------
-- AADL2.2
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS demo
END demo;
PROCESS IMPLEMENTATION demo.others
END demo.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::A;
WITH interfaceview::IV::B;
WITH interfaceview::IV::C;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_A : SYSTEM interfaceview::IV::A::A.others {
Taste::FunctionName => "A";
};
IV_B : SYSTEM interfaceview::IV::B::B.others {
Taste::FunctionName => "B";
};
IV_C : SYSTEM interfaceview::IV::C::C.others {
Taste::FunctionName => "C";
};
demo : PROCESS deploymentview::DV::Node1::demo.others {
Taste::coordinates => "104703 68940 141589 89543";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "100092 63211 146200 92643";
};
PROPERTIES
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_A;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_B;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_C;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO demo;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "94328 54802 151964 96848";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.2";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------------------
-- AADL2.2
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::A
PUBLIC
WITH interfaceview::IV::B;
WITH interfaceview::IV::C;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_cyclic_activation
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_cyclic_activation;
SUBPROGRAM IMPLEMENTATION PI_cyclic_activation.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_cyclic_activation.others;
SUBPROGRAM RI_caller
END RI_caller;
SUBPROGRAM IMPLEMENTATION RI_caller.others
END RI_caller.others;
SUBPROGRAM RI_call_c
END RI_call_c;
SUBPROGRAM IMPLEMENTATION RI_call_c.others
END RI_call_c.others;
SYSTEM A
FEATURES
PI_cyclic_activation : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::A::PI_cyclic_activation.others {
Taste::coordinates => "551 529";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 2000 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "cyclic_activation";
};
RI_caller : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::B::PI_callee.others {
Taste::coordinates => "1146 606";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "caller";
Taste::labelInheritance => "true";
};
RI_call_c : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::C::PI_callee.others {
Taste::coordinates => "1146 760";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "call_c";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => enabled;
END A;
SYSTEM IMPLEMENTATION A.others
END A.others;
END interfaceview::IV::A;
PACKAGE interfaceview::IV::B
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_callee
PROPERTIES
Taste::Associated_Queue_Size => 2;
END PI_callee;
SUBPROGRAM IMPLEMENTATION PI_callee.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_callee.others;
SUBPROGRAM PI_second_callee
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_second_callee;
SUBPROGRAM IMPLEMENTATION PI_second_callee.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_second_callee.others;
SYSTEM B
FEATURES
PI_callee : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::B::PI_callee.others {
Taste::coordinates => "1814 606";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "callee";
};
PI_second_callee : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::B::PI_second_callee.others {
Taste::coordinates => "1974 907";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "second_callee";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => enabled;
END B;
SYSTEM IMPLEMENTATION B.others
END B.others;
END interfaceview::IV::B;
PACKAGE interfaceview::IV::C
PUBLIC
WITH interfaceview::IV::B;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_cyclic_activation
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_cyclic_activation;
SUBPROGRAM IMPLEMENTATION PI_cyclic_activation.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_cyclic_activation.others;
SUBPROGRAM PI_callee
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_callee;
SUBPROGRAM IMPLEMENTATION PI_callee.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_callee.others;
SUBPROGRAM RI_second_callee
END RI_second_callee;
SUBPROGRAM IMPLEMENTATION RI_second_callee.others
END RI_second_callee.others;
SUBPROGRAM RI_callee
END RI_callee;
SUBPROGRAM IMPLEMENTATION RI_callee.others
END RI_callee.others;
SYSTEM C
FEATURES
PI_cyclic_activation : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::C::PI_cyclic_activation.others {
Taste::coordinates => "1666 1310";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 5000 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "cyclic_activation";
};
PI_callee : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::C::PI_callee.others {
Taste::coordinates => "1666 1362";
Taste::RCMoperationKind => sporadic;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "callee";
};
RI_second_callee : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::B::PI_second_callee.others {
Taste::coordinates => "1973 1219";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "second_callee";
Taste::labelInheritance => "true";
};
RI_callee : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::B::PI_callee.others {
Taste::coordinates => "1751 1219";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "callee";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => enabled;
END C;
SYSTEM IMPLEMENTATION C.others
END C.others;
END interfaceview::IV::C;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::A;
WITH interfaceview::IV::B;
WITH interfaceview::IV::C;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SYSTEM interfaceview
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
A : SYSTEM interfaceview::IV::A::A.others {
Taste::coordinates => "551 435 1146 885";
};
B : SYSTEM interfaceview::IV::B::B.others {
Taste::coordinates => "1814 424 2423 907";
};
C : SYSTEM interfaceview::IV::C::C.others {
Taste::coordinates => "1666 1219 2202 1436";
};
CONNECTIONS
B_PI_callee_A_RI_caller : SUBPROGRAM ACCESS B.PI_callee -> A.RI_caller {
Taste::coordinates => "1146 606 1480 606 1480 606 1814 606";
};
C_PI_callee_A_RI_call_c : SUBPROGRAM ACCESS C.PI_callee -> A.RI_call_c {
Taste::coordinates => "1146 760 1406 760 1406 1362 1666 1362";
};
B_PI_callee_C_RI_callee : SUBPROGRAM ACCESS B.PI_callee -> C.RI_callee {
Taste::coordinates => "1751 1219 1751 606 1814 606";
};
B_PI_second_callee_C_RI_second_callee : SUBPROGRAM ACCESS B.PI_second_callee -> C.RI_second_callee {
Taste::coordinates => "1973 1219 1973 1064 1974 1064 1974 907";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 2970 2100";
Taste::version => "2.2";
END interfaceview::IV;
KAZOO=../../kazoo
all: c
ada: test-parse-ada
make -C output.ada
cp a/a.c output.pohic/a/C/src
cp b/b.c output.pohic/b/C/src
cp b/b.c output.pohic/b/C/src
cd output.ada/build && \
ocarina -x main.aadl && \
make -f Makefile.taste
c: test-parse-c # Polyorb_HI_C output
cp a/a.c output.pohic/a/C/src
cp b/b.c output.pohic/b/C/src
cp b/b.c output.pohic/b/C/src
make -C output.pohic
test-parse-ada: clean-ada
$(KAZOO) --gw \
-o output.ada \
--glue \
--debug
test-parse-c: clean-c
$(KAZOO) -p --gw \
-o output.pohic \
--glue -g
buildsupport_pohic:
buildsupport -o output.buildsupport.pohic -p --aadlv2 --glue -i InterfaceView.aadl -c DeploymentView.aadl -d DataView.aadl ../common/ocarina_components.aadl ../common/TASTE_IV_Properties.aadl ../common/TASTE_DV_Properties.aadl
buildsupport_pohiada:
buildsupport -o output.buildsupport.ada --aadlv2 --glue -i InterfaceView.aadl -c DeploymentView.aadl -d DataView.aadl ../common/ocarina_components.aadl ../common/TASTE_IV_Properties.aadl ../common/TASTE_DV_Properties.aadl
gdb: clean
gdb --args $(KAZOO) --gw \
-o output.pohic \
--glue \
--debug
clean-ada:
rm -rf output.ada
clean-c:
rm -rf output.pohic
skeletons:
$(KAZOO) -p --gw --glue -o code && make -C code dataview
clean-skeletons:
rm -rf code
clean: clean-ada clean-c clean-skeletons
.PHONY: clean clean-ada clean-c test-parse-ada gdb test-parse-c buildsupport_pohic buildsupport_pohiada c skeletons clean-skeletons
Demo_RI_Names
This tests the case when RI have a different name from the PI it is connected to. Various combinations.
if dataview needs to be updated, run taste-update-data-view TPOS_Dataview.asn
MY-MODULE DEFINITIONS AUTOMATIC TAGS ::= BEGIN
T-POS ::= CHOICE {
first-choice INTEGER (0..10),
second-choice SEQUENCE {
intVal INTEGER (-10..10),
boolVal BOOLEAN
},
third-choice OCTET STRING (SIZE(1000))
}
END
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
#include "a.h"
#include <stdio.h>
void a_startup()
{
printf ("[A] startup\n");
}
void a_PI_cyclic_activation()
{
printf ("[A] cyclic activation. calling B and C\n");
a_RI_caller ();
a_RI_call_c ();
}
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
#include "b.h"
#include <stdio.h>
void b_startup()
{
/* Write your initialization code here,
but do not make any call to a required interface!! */
printf ("[B] startup\n");
}
void b_PI_callee()
{
printf ("[B] callee\n");
}
void b_PI_second_callee ()
{
printf ("[B] second_callee\n");
}
#!/bin/bash
mkdir -p .cache
export PROJECT_CACHE=$HOME/.taste_AST_cache
rm -f a.zip
zip a a/*
rm -f b.zip
zip b b/*
rm -f c.zip
zip c c/*
[ ! -z "$CLEANUP" ] && rm -rf binary.linux.*
# C runtime
assert-builder-ocarina.py \
-f \
-p \
--aadlv2 \
--interfaceView interfaceview.aadl \
--deploymentView deploymentview.aadl \
-o binary.linux.pohic \
--subC a:a.zip \
--subC b:b.zip \
--subC c:c.zip
# Ada runtime
assert-builder-ocarina.py \
-f \
--aadlv2 \
--interfaceView interfaceview.aadl \
--deploymentView deploymentview.aadl \
-o binary.linux.ada \
--subC a:a.zip \
--subC b:b.zip \
--subC c:c.zip
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
#include "c.h"
#include <stdio.h>
void c_startup()
{
printf ("[C] startup\n");
}
void c_PI_cyclic_activation()
{
printf ("[C] cyclic activation. calling B (callee and second_callee)\n");
c_RI_callee ();
c_RI_second_callee ();
}
void c_PI_callee()
{
printf ("[C] callee\n");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment