Commit 0d2a245b authored by Maxime Perrotin's avatar Maxime Perrotin

Add test case for POHIAda distributed system

parent ac3ae7e0
......@@ -6,20 +6,35 @@
@@-- @_Thread_Has_Param_@ : |_ true if the thread has a param
@@-- @_Node_Name_@ : Name of the node containing this partition
@@-- @_Blocks_@ : Code generated for protected functions
@@-- @_Block_Names@ : Vector_Tag: list of block (user functions) names
@@-- @_Block_Languages_@ : |_ Corresponding implementation language
@@-- @_Coverage_@ : True if user requested code coverage enable
@@-- @_Package_Name_@ : AADL Package name for the target (e.g. ocarina_porocessors_x86)
@@-- @_CPU_Name_@ : CPU Name (e.g. x86_linux)
@@-- @_CPU_Name_@ : CPU AADL Identifier (e.g. x86_inst)
@@-- @_CPU_Family_@ : CPU Kind (e.g. leon3)
@@-- @_CPU_Instance_@ : AADL component instance (e.g. rtems_posix)
@@-- @_CPU_Platform_@ : AADL CPU_Platform (e.g. PLATFORM_NATIVE)
@@-- @_CPU_Classifier_@ : AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
@@-- @_VP_Name_@ : Virtual processor name on which the partition is bounded
@@-- @_VP_Platform_@ : Virtual processor platform (e.g. PLATFORM_AIR)
@@-- @_VP_Classifier_@ : Virtual processor classifier
@@-- @_Ada_Runtime_@ : Set if CPU_Platform = PLATFORM_GNAT_RUNTIME
@@-- @_Bound_Functions_@ : List of user functions from Interface view
@@-- @_Thread_Src_Name_@ : Vector tag : connection thread name (source)
@@-- @_Thread_Dst_Name_@ : Vector tag : connection thread name (dest)
@@-- @_Thread_Src_Port_@ : Vector tag : connection port name (source)
@@-- @_Thread_Dst_Port_@ : Vector tag : connection port name (dest)
@@-- @_In_Port_Names_@ : Vector tag: input ports of the partition
@@-- @_In_Port_Thread_Name_@ : |_ corresponding thread inside the partition
@@-- @_In_Port_Type_Name_@ : |_ corresponding parameter type name (optional)
@@-- @_Out_Port_Names_@ : Vector tag: output ports of the partition
@@-- @_Out_Port_Type_Name_@ : |_ corresponding parameter type name (optional)
@@-- @_Out_Port_Thread_Name_@ : |_ corresponding thread inside the partition
@@-- @_Part_Out_Port_Name_@ : Vector tag: output ports of the partition (can be several times the same)
@@-- @_Connected_Threads_@ : |_ Corresponding thread connected to it
with PolyORB_HI.Utils;
use PolyORB_HI.Utils;
@@IF@@ @_Thread_Src_Name'Length_@ > 0
@@IF@@ @_In_Port_Names'Length_@ > 0 or @_Out_Port_Names'Length_@ > 0 or @_Thread_Src_Name'Length_@ > 0
with PolyORB_HI_Generated.Activity,
PolyORB_HI.Errors;
use PolyORB_HI_Generated.Activity;
......
......@@ -10,7 +10,9 @@
@@-- @_Block_Languages_@ : |_ Corresponding implementation language
@@-- @_Coverage_@ : True if user requested code coverage enable
@@-- @_Package_Name_@ : AADL Package name for the target (e.g. ocarina_porocessors_x86)
@@-- @_CPU_Name_@ : CPU Name (e.g. x86_linux)
@@-- @_CPU_Name_@ : CPU AADL Identifier (e.g. x86_inst)
@@-- @_CPU_Family_@ : CPU Kind (e.g. leon3)
@@-- @_CPU_Instance_@ : AADL component instance (e.g. rtems_posix)
@@-- @_CPU_Platform_@ : AADL CPU_Platform (e.g. PLATFORM_NATIVE)
@@-- @_CPU_Classifier_@ : AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
@@-- @_VP_Name_@ : Virtual processor name on which the partition is bounded
......@@ -26,21 +28,25 @@
@@-- @_In_Port_Thread_Name_@ : |_ corresponding thread inside the partition
@@-- @_In_Port_Type_Name_@ : |_ corresponding parameter type name (optional)
@@-- @_Out_Port_Names_@ : Vector tag: output ports of the partition
@@-- @_Out_Port_Thread_Name_@ : |_ corresponding thread inside the partition
@@-- @_Out_Port_Type_Name_@ : |_ corresponding parameter type name (optional)
@@-- @_Out_Port_Thread_Name_@ : |_ corresponding thread inside the partition
@@-- @_Part_Out_Port_Name_@ : Vector tag: output ports of the partition (can be several times the same)
@@-- @_Connected_Threads_@ : |_ Corresponding thread connected to it
with Interfaces.C;
with PolyORB_HI_Generated.Deployment;
use PolyORB_HI_Generated.Deployment;
@@TABLE@@
@@IF@@ @_Thread_Has_Param_@
@@SET@@ Need_Types=True
@@END_IF@@
@@IF@@ @_Thread_Has_Param_@
@@SET@@ Need_Types=True
@@END_IF@@
@@END_TABLE@@
@@IF@@ @_Out_Port_Type_Name_@ /= "" @@-- Also check the output ports
@@SET@@ Need_Types=True
@@END_IF@@
@@IF@@ @_Need_Types_@
with PolyORB_HI_Generated.Types;
use PolyORB_HI_Generated.Types;
@@END_IF@@
@@-- Make sure at least someone includes the user Ada packages (for compilation/elaboration)
@@TABLE@@
@@IF@@ @_Block_Languages_@ = SDL or @_Block_Languages_@ = Ada
......
......@@ -38,6 +38,7 @@
#include "@_LOWER:Name_@.h"
#include "@_LOWER:Name_@_enums_def.h"
@@IF@@ @_List_Of_ASync_PIs'Length_@ > 1 @@-- 1 because we ignore Poll
typedef struct _PI_Messages {
T_@_LOWER:Name_@_PI_list msg_id;
union {
......@@ -48,7 +49,11 @@ typedef struct _PI_Messages {
@@END_TABLE@@
} msg_data;
} PI_Messages;
@@ELSE@@
typedef bool PI_Messages;
@@END_IF@@
@@IF@@ @_List_Of_ASync_RIs'Length_@ > 0
typedef struct _RI_Messages {
T_@_LOWER:Name_@_RI_list msg_id;
union {
......@@ -59,6 +64,9 @@ typedef struct _RI_Messages {
@@END_TABLE@@
} msg_data;
} RI_Messages;
@@ELSE@@
typedef bool RI_Messages;
@@END_IF@@
@@IF@@ @_List_Of_PIs'Length_@ > 0
// Queues of messages going from the binary to the user (PIs, or TMs)
......
function1.zip
function2.zip
This diff is collapsed.
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
TASTE-Boolean ::= BOOLEAN
-- ASN.1 Type definitions must start with an uppercase
-- Field names in records (SEQUENCE) must start with a lowercase
-- Underscores are not allowed: use dash (hyphen)
-- Simple types:
-- MyInteger ::= INTEGER (0..255)
-- MyReal ::= REAL (0.0 .. 1000.0)
-- MyBool ::= BOOLEAN
-- MyEnum ::= ENUMERATED { hello, world, how-are-you }
-- Complex types:
-- MySeq ::= SEQUENCE {
-- input-data MyInteger,
-- output-data MyInteger,
-- validity ENUMERATED { valid, invalid }
-- }
--
-- MyChoice ::= CHOICE {
-- a BOOLEAN,
-- b MySeq
-- }
--
-- MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
--
-- MyOctStr ::= OCTET STRING (SIZE (3))
--
-- -- You can also declare constants
-- myVar MySeqOf ::= { hello, world }
END
---------------------------------------------------
-- AADL2.1
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH ocarina_buses;
WITH ocarina_drivers;
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS node2
END node2;
PROCESS IMPLEMENTATION node2.others
END node2.others;
DEVICE generic_sockets_ip_pohiada
EXTENDS ocarina_drivers::generic_sockets_ip
FEATURES
link : REFINED TO REQUIRES BUS ACCESS ocarina_buses::ip.i {
Taste::coordinates => "109475 68027";
};
PROPERTIES
Taste::Interface_Coordinates => "122438 77785" APPLIES TO link;
Deployment::Help => "Write your ASN.1 configuration here";
Deployment::Configuration => "{devname ""eth0"", address ""127.0.0.1"" , port 5114}";
Deployment::Config => "../../polyorb-hi-c/src/drivers/configuration/ip.asn";
Deployment::Version => "0.1beta";
END generic_sockets_ip_pohiada;
DEVICE IMPLEMENTATION generic_sockets_ip_pohiada.others
EXTENDS ocarina_drivers::generic_sockets_ip.pohiada
END generic_sockets_ip_pohiada.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV::Node2
PUBLIC
WITH ocarina_buses;
WITH ocarina_drivers;
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS node1
END node1;
PROCESS IMPLEMENTATION node1.others
END node1.others;
DEVICE generic_sockets_ip_pohiada
EXTENDS ocarina_drivers::generic_sockets_ip
FEATURES
link : REFINED TO REQUIRES BUS ACCESS ocarina_buses::ip.i {
Taste::coordinates => "156349 68118";
};
PROPERTIES
Taste::Interface_Coordinates => "138837 74445" APPLIES TO link;
Deployment::Help => "Write your ASN.1 configuration here";
Deployment::Configuration => "{devname ""eth0"", address ""127.0.0.1"" , port 5115}";
Deployment::Config => "../../polyorb-hi-c/src/drivers/configuration/ip.asn";
Deployment::Version => "0.1beta";
END generic_sockets_ip_pohiada;
DEVICE IMPLEMENTATION generic_sockets_ip_pohiada.others
EXTENDS ocarina_drivers::generic_sockets_ip.pohiada
END generic_sockets_ip_pohiada.others;
END deploymentview::DV::Node2;
PACKAGE deploymentview::DV::Node3
PUBLIC
WITH ocarina_buses;
WITH ocarina_drivers;
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS node3
END node3;
PROCESS IMPLEMENTATION node3.others
END node3.others;
DEVICE generic_sockets_ip_pohiada
EXTENDS ocarina_drivers::generic_sockets_ip
FEATURES
link : REFINED TO REQUIRES BUS ACCESS ocarina_buses::ip.i {
Taste::coordinates => "110999 103674";
};
PROPERTIES
Taste::Interface_Coordinates => "131498 81125" APPLIES TO link;
Deployment::Help => "Write your ASN.1 configuration here";
Deployment::Configuration => "{devname ""eth0"", address ""127.0.0.1"" , port 5116}";
Deployment::Config => "../../polyorb-hi-c/src/drivers/configuration/ip.asn";
Deployment::Version => "0.1beta";
END generic_sockets_ip_pohiada;
DEVICE IMPLEMENTATION generic_sockets_ip_pohiada.others
EXTENDS ocarina_drivers::generic_sockets_ip.pohiada
END generic_sockets_ip_pohiada.others;
END deploymentview::DV::Node3;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Function2;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node1;
WITH interfaceview::IV::Function1;
WITH deploymentview::DV::Node2;
WITH interfaceview::IV::Function3;
WITH deploymentview::DV::Node3;
WITH ocarina_buses;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
FEATURES
generic_sockets_ip_pohiada_ip_i : REQUIRES BUS ACCESS ocarina_buses::ip.i;
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::FunctionName => "Function2";
};
node2 : PROCESS deploymentview::DV::Node1::node2.others {
Taste::coordinates => "95630 50635 114818 61755";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "93771 49233 117757 65118";
};
generic_sockets_ip_pohiada : DEVICE deploymentview::DV::Node1::generic_sockets_ip_pohiada.others {
Taste::coordinates => "103767 65443 109475 69377";
};
CONNECTIONS
generic_sockets_ip_pohiada_ip_i_link : BUS ACCESS generic_sockets_ip_pohiada_ip_i -> generic_sockets_ip_pohiada.link;
PROPERTIES
Taste::APLC_Binding => (reference (node2)) APPLIES TO IV_Function2;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO node2;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO generic_sockets_ip_pohiada;
END Node1.others;
SYSTEM Node2
FEATURES
generic_sockets_ip_pohiada_ip_i : REQUIRES BUS ACCESS ocarina_buses::ip.i;
END Node2;
SYSTEM IMPLEMENTATION Node2.others
SUBCOMPONENTS
IV_Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::FunctionName => "Function1";
};
node1 : PROCESS deploymentview::DV::Node2::node1.others {
Taste::coordinates => "152671 52582 172763 63125";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "150159 49570 175274 64631";
};
generic_sockets_ip_pohiada : DEVICE deploymentview::DV::Node2::generic_sockets_ip_pohiada.others {
Taste::coordinates => "156349 65537 165206 70699";
};
CONNECTIONS
generic_sockets_ip_pohiada_ip_i_link : BUS ACCESS generic_sockets_ip_pohiada_ip_i -> generic_sockets_ip_pohiada.link;
PROPERTIES
Taste::APLC_Binding => (reference (node1)) APPLIES TO IV_Function1;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO node1;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO generic_sockets_ip_pohiada;
END Node2.others;
SYSTEM Node3
FEATURES
generic_sockets_ip_pohiada_ip_i : REQUIRES BUS ACCESS ocarina_buses::ip.i;
END Node3;
SYSTEM IMPLEMENTATION Node3.others
SUBCOMPONENTS
IV_Function3 : SYSTEM interfaceview::IV::Function3::Function3.others {
Taste::FunctionName => "Function3";
};
node3 : PROCESS deploymentview::DV::Node3::node3.others {
Taste::coordinates => "93202 90183 111638 99747";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "90898 87451 113942 101113";
};
generic_sockets_ip_pohiada : DEVICE deploymentview::DV::Node3::generic_sockets_ip_pohiada.others {
Taste::coordinates => "101231 101573 110999 105977";
};
CONNECTIONS
generic_sockets_ip_pohiada_ip_i_link : BUS ACCESS generic_sockets_ip_pohiada_ip_i -> generic_sockets_ip_pohiada.link;
PROPERTIES
Taste::APLC_Binding => (reference (node3)) APPLIES TO IV_Function3;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO node3;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO generic_sockets_ip_pohiada;
END Node3.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "91390 48860 121372 71552";
};
Node2 : SYSTEM Node2.others {
Taste::coordinates => "147324 49265 178717 70781";
};
Node3 : SYSTEM Node3.others {
Taste::coordinates => "87713 87242 116519 106760";
};
ip_i : BUS ocarina_buses::ip.i {
Taste::coordinates => "122438 74445 143695 81125";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
CONNECTIONS
Connection1 : BUS ACCESS ip_i -> Node1.generic_sockets_ip_pohiada_ip_i {
Taste::coordinates => "109475 68027 115956 68027 115956 77785 122438 77785";
};
Connection2 : BUS ACCESS ip_i -> Node2.generic_sockets_ip_pohiada_ip_i {
Taste::coordinates => "156349 68118 138837 68118 138837 74445";
};
Connection3 : BUS ACCESS ip_i -> Node3.generic_sockets_ip_pohiada_ip_i {
Taste::coordinates => "110999 103674 131498 103674 131498 81125";
};
PROPERTIES
Actual_Connection_Binding => (reference (ip_i)) APPLIES TO interfaceview.Function1_PI_f1_Function3_RI_f1;
Actual_Connection_Binding => (reference (ip_i)) APPLIES TO interfaceview.Function2_PI_f2_Function3_RI_f2;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("/home/taste/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------------------
-- AADL2.1
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::Function1
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_f1
FEATURES
a : IN PARAMETER DataView::TASTE_Boolean {
Taste::encoding => NATIVE;
};
END PI_f1;
SUBPROGRAM IMPLEMENTATION PI_f1.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_f1.others;
SYSTEM Function1
FEATURES
PI_f1 : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1::PI_f1.others {
Taste::coordinates => "117107 54673";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "f1";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END Function1;
SYSTEM IMPLEMENTATION Function1.others
END Function1.others;
END interfaceview::IV::Function1;
PACKAGE interfaceview::IV::Function2
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_f2
FEATURES
a : IN PARAMETER DataView::TASTE_Boolean {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_f2;
SUBPROGRAM IMPLEMENTATION PI_f2.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_f2.others;
SYSTEM Function2
FEATURES
PI_f2 : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_f2.others {
Taste::coordinates => "117224 83715";
Taste::RCMoperationKind => sporadic;
Taste::InterfaceName => "f2";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
END Function2;
SYSTEM IMPLEMENTATION Function2.others
END Function2.others;
END interfaceview::IV::Function2;
PACKAGE interfaceview::IV::Function3
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM RI_f1
FEATURES
a : IN PARAMETER DataView::TASTE_Boolean {
Taste::encoding => NATIVE;
};
END RI_f1;
SUBPROGRAM IMPLEMENTATION RI_f1.others
END RI_f1.others;
SUBPROGRAM RI_f2
FEATURES
a : IN PARAMETER DataView::TASTE_Boolean {
Taste::encoding => NATIVE;
};
END RI_f2;
SUBPROGRAM IMPLEMENTATION RI_f2.others
END RI_f2.others;
SYSTEM Function3
FEATURES
RI_f1 : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function1::PI_f1.others {
Taste::coordinates => "144855 68078";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "f1";
Taste::labelInheritance => "true";
};
RI_f2 : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_f2.others {
Taste::coordinates => "144855 76310";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "f2";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (GUI);
Taste::Active_Interfaces => any;
END Function3;
SYSTEM IMPLEMENTATION Function3.others
END Function3.others;
END interfaceview::IV::Function3;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
WITH interfaceview::IV::Function3;
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
Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::coordinates => "93591 51616 117107 67489";
};
Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::coordinates => "92886 80187 117224 98294";
};
Function3 : SYSTEM interfaceview::IV::Function3::Function3.others {
Taste::coordinates => "144855 64550 166607 83480";
};
CONNECTIONS
Function1_PI_f1_Function3_RI_f1 : SUBPROGRAM ACCESS Function1.PI_f1 -> Function3.RI_f1 {
Taste::coordinates => "144855 68078 130981 68078 130981 54673 117107 54673";
};
Function2_PI_f2_Function3_RI_f2 : SUBPROGRAM ACCESS Function2.PI_f2 -> Function3.RI_f2 {
Taste::coordinates => "144855 76310 131039 76310 131039 83715 117224 83715";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
END interfaceview::IV;
KAZOO=../../kazoo
# this project is POHIAda only
all: ada
ada: test-parse-ada
cp function1/function1.c output.ada/function1/C/src
cp function2/function2.c output.ada/function2/C/src
make -C output.ada
test-parse-ada: clean-ada
$(KAZOO) --gw \
-o output.ada \
--glue \
--debug
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
skeletons:
$(KAZOO) -p --gw --glue -o code && make -C code dataview
clean-skeletons:
rm -rf code
clean: clean-ada clean-skeletons
.PHONY: clean clean-ada test-parse-ada gdb buildsupport_pohiada skeletons clean-skeletons
#!/bin/bash -e
# This script will build your TASTE system.
# You should not change this file as it was automatically generated.
# If you need additional preprocessing, there are three hook files
# that you can provide and that are called dring the build:
# user_init_pre.sh, user_init_post.sh and user_init_last.sh
# These files will never get overwritten by TASTE.'
# Inside these files you may set some environment variables:
# C_INCLUDE_PATH=/usr/include/xenomai/analogy/:${C_INCLUDE_PATH}
# unset USE_POHIC
CWD=$(pwd)
if [ -t 1 ] ; then
COLORON="\e[1m\e[32m"
COLOROFF="\e[0m"
else
COLORON=""
COLOROFF=""
fi
INFO="${COLORON}[INFO]${COLOROFF}"
if [ -f user_init_pre.sh ]
then
echo -e "${INFO} Executing user-defined init script"
source user_init_pre.sh
fi
# Set up the cache to limit the calls to ASN1SCC in DMT tools
mkdir -p .cache
export PROJECT_CACHE=$HOME/.taste_AST_cache
# Use PolyORB-HI-C runtime
USE_POHIC=1
# Set Debug mode by default
DEBUG_MODE=--debug
# Detect models from Ellidiss tools v2, and convert them to 1.3
INTERFACEVIEW=InterfaceView.aadl
grep "version => \"2" InterfaceView.aadl >/dev/null && {
echo -e "${INFO} Converting interface view from V2 to V1.3"
TASTE --load-interface-view InterfaceView.aadl --export-interface-view-to-1_3 __iv_1_3.aadl
INTERFACEVIEW=__iv_1_3.aadl
};
if [ -z "$DEPLOYMENTVIEW" ]
then
DEPLOYMENTVIEW=DeploymentView.aadl
fi
# Detect models from Ellidiss tools v2, and convert them to 1.3
grep "version => \"2" "$DEPLOYMENTVIEW" >/dev/null && {
echo -e "${INFO} Converting deployment view from V2 to V1.3"
TASTE --load-deployment-view "$DEPLOYMENTVIEW" --export-deployment-view-to-1_3 __dv_1_3.aadl
DEPLOYMENTVIEW=__dv_1_3.aadl
};
SKELS="./"
# Check if Dataview references existing files
mono $(which taste-extract-asn-from-design.exe) -i "$INTERFACEVIEW" -j /tmp/dv.asn
cd "$SKELS" && rm -f function1.zip && zip function1 function1/* && cd $OLDPWD
cd "$SKELS" && rm -f function2.zip && zip function2 function2/* && cd $OLDPWD
[ ! -z "$CLEANUP" ] && rm -rf binary*
if [ -f ConcurrencyView.pro ]
then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView.pro "
elif [ -f ConcurrencyView_Properties.aadl ]
then
ORCHESTRATOR_OPTIONS+=" -w ConcurrencyView_Properties.aadl "
fi
if [ -f user_init_post.sh ]
then
echo -e "${INFO} Executing user-defined post-init script"
source user_init_post.sh
fi
if [ -f additionalCommands.sh ]
then
source additionalCommands.sh
fi
if [ ! -z "$USE_POHIC" ]
then
OUTPUTDIR=binary.c
ORCHESTRATOR_OPTIONS+=" -p "
elif [ ! -z "$USE_POHIADA" ]
then
OUTPUTDIR=binary.ada
else
OUTPUTDIR=binary
fi
cd "$CWD" && assert-builder-ocarina.py \
--fast \
$DEBUG_MODE \
--aadlv2 \
--keep-case \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
--subC function1:"$SKELS"/function1.zip \
--subC function2:"$SKELS"/function2.zip \
$ORCHESTRATOR_OPTIONS
if [ -f user_init_last.sh ]
then
echo -e "${INFO} Executing user-defined post-build script"