...
 
Commits (6)
--------------------------------------------------------
--! File generated by asn2aadl v1.2359: DO NOT EDIT !
--! File generated by asn2aadl v2.1.10: DO NOT EDIT !
--------------------------------------------------------
--! InputASN1FileChecksum:c4cca3f50df525b08cac54f4b04c5297:/home/taste/tool-src/testSuites/Demo_ContextParams/DataView.asn:
--! InputASN1FileChecksum:ee8a7e01f29874c0d50f437d5abb9599:/home/taste/tool-inst/share/taste-types/taste-types.asn:
--------------------------------------------------------
package DataView
......@@ -10,41 +13,79 @@ public
with Taste;
with Base_Types;
with Deployment;
-- No more private heap required (we use the space certified compiler)
-- Memory_Required: 0
DATA Simulink_Tunable_Parameter
PROPERTIES
TASTE::Ada_Package_Name => "TASTE-Directives";
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Simulink-Tunable-Parameter";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Simulink_Tunable_Parameter;
DATA Timer
PROPERTIES
TASTE::Ada_Package_Name => "TASTE-Directives";
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Timer";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Timer;
DATA TASTE_Directive
DATA Taste_directive
PROPERTIES
TASTE::Ada_Package_Name => "TASTE-Directives";
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Taste-directive";
Deployment::ASN1_Module_Name => "TASTE-Directives";
END TASTE_Directive;
TASTE::Forbid_in_PI => true;
END Taste_directive;
data Stream_Element_Buffer
-- Root type for buffer elements
properties
Data_Model::Data_Representation => Character;
end Stream_Element_Buffer;
DATA T_UInt32
DATA T_SEQUENCE
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/testSuites/Demo_ContextParams/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 16; suggested aligned message buffer is...
Source_Data_Size => 16 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-SEQUENCE";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END T_SEQUENCE;
DATA T_SEQUENCE_Buffer_Max
END T_SEQUENCE_Buffer_Max;
DATA IMPLEMENTATION T_SEQUENCE_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_SEQUENCE
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (16); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_SEQUENCE_Buffer_Max.impl;
DATA T_SEQUENCE_Buffer
END T_SEQUENCE_Buffer;
DATA IMPLEMENTATION T_SEQUENCE_Buffer.impl
-- Buffer to hold a marshalled data of type T_SEQUENCE
SUBCOMPONENTS
Buffer : data T_SEQUENCE_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_SEQUENCE_Buffer.impl;
DATA T_Int8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-inst/share/taste-types/taste-types.asn");
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => ASN1;
......@@ -52,38 +93,77 @@ PROPERTIES
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt32";
Type_Source_Name => "T-Int8";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt32;
END T_Int8;
DATA T_UInt32_Buffer_Max
END T_UInt32_Buffer_Max;
DATA T_Int8_Buffer_Max
END T_Int8_Buffer_Max;
DATA IMPLEMENTATION T_UInt32_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt32
DATA IMPLEMENTATION T_Int8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Int8
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt32_Buffer_Max.impl;
END T_Int8_Buffer_Max.impl;
DATA T_UInt32_Buffer
END T_UInt32_Buffer;
DATA T_Int8_Buffer
END T_Int8_Buffer;
DATA IMPLEMENTATION T_UInt32_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt32
DATA IMPLEMENTATION T_Int8_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int8
SUBCOMPONENTS
Buffer : data T_UInt32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
Buffer : data T_Int8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt32_Buffer.impl;
END T_Int8_Buffer.impl;
DATA T_INTEGER
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/testSuites/Demo_ContextParams/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-INTEGER";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_INTEGER;
DATA T_INTEGER_Buffer_Max
END T_INTEGER_Buffer_Max;
DATA IMPLEMENTATION T_INTEGER_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_INTEGER
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_INTEGER_Buffer_Max.impl;
DATA T_INTEGER_Buffer
END T_INTEGER_Buffer;
DATA IMPLEMENTATION T_INTEGER_Buffer.impl
-- Buffer to hold a marshalled data of type T_INTEGER
SUBCOMPONENTS
Buffer : data T_INTEGER_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_INTEGER_Buffer.impl;
DATA T_UInt8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-inst/share/taste-types/taste-types.asn");
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => ASN1;
......@@ -114,7 +194,7 @@ DATA IMPLEMENTATION T_UInt8_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt8
SUBCOMPONENTS
Buffer : data T_UInt8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt8_Buffer.impl;
......@@ -122,7 +202,7 @@ END T_UInt8_Buffer.impl;
DATA T_Boolean
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-inst/share/taste-types/taste-types.asn");
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => ASN1;
......@@ -153,54 +233,15 @@ DATA IMPLEMENTATION T_Boolean_Buffer.impl
-- Buffer to hold a marshalled data of type T_Boolean
SUBCOMPONENTS
Buffer : data T_Boolean_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Boolean_Buffer.impl;
DATA T_SEQUENCE
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 16; suggested aligned message buffer is...
Source_Data_Size => 16 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-SEQUENCE";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END T_SEQUENCE;
DATA T_SEQUENCE_Buffer_Max
END T_SEQUENCE_Buffer_Max;
DATA IMPLEMENTATION T_SEQUENCE_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_SEQUENCE
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (16); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_SEQUENCE_Buffer_Max.impl;
DATA T_SEQUENCE_Buffer
END T_SEQUENCE_Buffer;
DATA IMPLEMENTATION T_SEQUENCE_Buffer.impl
-- Buffer to hold a marshalled data of type T_SEQUENCE
SUBCOMPONENTS
Buffer : data T_SEQUENCE_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_SEQUENCE_Buffer.impl;
DATA T_Int8
DATA T_UInt32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-inst/share/taste-types/taste-types.asn");
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => ASN1;
......@@ -208,38 +249,38 @@ PROPERTIES
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int8";
Type_Source_Name => "T-UInt32";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_Int8;
END T_UInt32;
DATA T_Int8_Buffer_Max
END T_Int8_Buffer_Max;
DATA T_UInt32_Buffer_Max
END T_UInt32_Buffer_Max;
DATA IMPLEMENTATION T_Int8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Int8
DATA IMPLEMENTATION T_UInt32_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt32
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int8_Buffer_Max.impl;
END T_UInt32_Buffer_Max.impl;
DATA T_Int8_Buffer
END T_Int8_Buffer;
DATA T_UInt32_Buffer
END T_UInt32_Buffer;
DATA IMPLEMENTATION T_Int8_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int8
DATA IMPLEMENTATION T_UInt32_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt32
SUBCOMPONENTS
Buffer : data T_Int8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
Buffer : data T_UInt32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int8_Buffer.impl;
END T_UInt32_Buffer.impl;
DATA T_Int32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("~/tool-inst/share/taste-types/taste-types.asn");
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => ASN1;
......@@ -270,48 +311,22 @@ DATA IMPLEMENTATION T_Int32_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int32
SUBCOMPONENTS
Buffer : data T_Int32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int32_Buffer.impl;
DATA T_INTEGER
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => ASN1;
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-INTEGER";
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_INTEGER;
DATA T_INTEGER_Buffer_Max
END T_INTEGER_Buffer_Max;
SYSTEM Taste_DataView
END Taste_DataView;
DATA IMPLEMENTATION T_INTEGER_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_INTEGER
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_INTEGER_Buffer_Max.impl;
DATA T_INTEGER_Buffer
END T_INTEGER_Buffer;
DATA IMPLEMENTATION T_INTEGER_Buffer.impl
-- Buffer to hold a marshalled data of type T_INTEGER
SYSTEM IMPLEMENTATION Taste_DataView.others
SUBCOMPONENTS
Buffer : data T_INTEGER_Buffer_Max.impl;
Length : data Base_Types::Unsigned_16;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_INTEGER_Buffer.impl;
T_SEQUENCE : DATA T_SEQUENCE;
T_Int8 : DATA T_Int8;
T_INTEGER : DATA T_INTEGER;
T_UInt8 : DATA T_UInt8;
T_Boolean : DATA T_Boolean;
T_UInt32 : DATA T_UInt32;
T_Int32 : DATA T_Int32;
END Taste_DataView.others;
end DataView;
---------------------------------------------------
-- AADL2.1
-- 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::cyclic_function;
WITH interfaceview::IV::passive_function;
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_cyclic_function : SYSTEM interfaceview::IV::cyclic_function::cyclic_function.others {
Taste::FunctionName => "cyclic_function";
};
IV_passive_function : SYSTEM interfaceview::IV::passive_function::passive_function.others {
Taste::FunctionName => "passive_function";
};
demo : PROCESS deploymentview::DV::Node1::demo.others {
Taste::coordinates => "113382 63614 152813 89886";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "108453 56108 157742 93639";
};
PROPERTIES
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_cyclic_function;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_passive_function;
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 => "102292 45385 163903 99000";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
This diff is collapsed.
PACKAGE interfaceview::IV
PUBLIC
WITH DataView;
WITH interfaceview::FV;
WITH Taste;
---------------------------------------------------
-- TASTE Interface View
---------------------------------------------------
SYSTEM interfaceview
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
cyclic_function: SYSTEM interfaceview::IV::cyclic_function.others
{ Taste::Coordinates => "33 84 203 239"; };
passive_function: SYSTEM interfaceview::IV::passive_function.others
{ Taste::Coordinates => "350 97 553 274"; };
CONNECTIONS
obj553 : SUBPROGRAM ACCESS passive_function.compute_data_obj108 -> cyclic_function.compute_data_obj86
{ Taste::Coordinates => "203 161 276 161 276 193 350 193"; };
END interfaceview.others;
---------------------------------------------------
-- TASTE Function: interfaceview::IV::cyclic_function
---------------------------------------------------
SYSTEM cyclic_function
FEATURES
cyclic_activation_obj75 : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::cyclic_activation_obj75.others
{ Taste::Coordinates => "33 132";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 500 ms;
Taste::Deadline => 500 ms;
Taste::Importance => MEDIUM ;};
compute_data_obj86 : REQUIRES SUBPROGRAM ACCESS interfaceview::FV::compute_data_obj108.others
{ Taste::Coordinates => "203 161";
Taste::RCMoperationKind => unprotected;};
PROPERTIES
Source_Language => C;
Taste::Coordinates => "33 84 203 239";
Taste::Instance_Name => "cyclic_function";
END cyclic_function;
SYSTEM IMPLEMENTATION cyclic_function.others
SUBCOMPONENTS
cyclic_activation_obj75_impl : SUBPROGRAM interfaceview::FV::cyclic_activation_obj75.others
{ Compute_Execution_Time => 0ms..500ms ;};
CONNECTIONS
SUBPROGRAM ACCESS cyclic_activation_obj75_impl -> cyclic_activation_obj75;
END cyclic_function.others;
---------------------------------------------------
-- TASTE Function: interfaceview::IV::passive_function
---------------------------------------------------
SYSTEM passive_function
FEATURES
compute_data_obj108 : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::compute_data_obj108.others
{ Taste::Coordinates => "350 193";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 100 ms;
Taste::Importance => MEDIUM ;};
PROPERTIES
Source_Language => C;
Taste::Coordinates => "350 97 553 274";
Taste::Instance_Name => "passive_function";
END passive_function;
SYSTEM IMPLEMENTATION passive_function.others
SUBCOMPONENTS
test1_obj97 : DATA DataView::T_INTEGER
{ Taste::FS_Default_Value => "3"; };
compute_data_obj108_impl : SUBPROGRAM interfaceview::FV::compute_data_obj108.others
{ Compute_Execution_Time => 0ms..0ms ;};
CONNECTIONS
DATA ACCESS test1_obj97 -> compute_data_obj108_impl.test1_obj97;
SUBPROGRAM ACCESS compute_data_obj108_impl -> compute_data_obj108;
END passive_function.others;
PROPERTIES
Taste::Coordinates => "0 0 2970 2100";
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
END interfaceview::IV;
PACKAGE interfaceview::FV
PUBLIC
WITH DataView;
WITH TASTE;
SUBPROGRAM cyclic_activation_obj75
END cyclic_activation_obj75;
SUBPROGRAM IMPLEMENTATION cyclic_activation_obj75.others
END cyclic_activation_obj75.others;
SUBPROGRAM compute_data_obj108
FEATURES
my_in : IN PARAMETER DataView::T_SEQUENCE
{ Taste::encoding => NATIVE; };
result : OUT PARAMETER DataView::T_INTEGER
{ Taste::encoding => NATIVE; };
test1_obj97 : REQUIRES DATA ACCESS DataView::T_INTEGER;
END compute_data_obj108;
SUBPROGRAM IMPLEMENTATION compute_data_obj108.others
END compute_data_obj108.others;
END interfaceview::FV;
---------------------------------------------------
-- AADL2.1
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::cyclic_function
PUBLIC
WITH interfaceview::IV::passive_function;
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 .. 500 ms;
END PI_cyclic_activation.others;
SUBPROGRAM RI_compute_data
FEATURES
my_in : IN PARAMETER DataView::T_SEQUENCE {
Taste::encoding => NATIVE;
};
result : OUT PARAMETER DataView::T_INTEGER {
Taste::encoding => NATIVE;
};
END RI_compute_data;
SUBPROGRAM IMPLEMENTATION RI_compute_data.others
END RI_compute_data.others;
SYSTEM cyclic_function
FEATURES
PI_cyclic_activation : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::cyclic_function::PI_cyclic_activation.others {
Taste::coordinates => "33 132";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 500 ms;
Taste::Deadline => 500 ms;
Taste::InterfaceName => "cyclic_activation";
};
RI_compute_data : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::passive_function::PI_compute_data.others {
Taste::coordinates => "203 161";
Taste::RCMoperationKind => unprotected;
Taste::InterfaceName => "compute_data";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => enabled;
END cyclic_function;
SYSTEM IMPLEMENTATION cyclic_function.others
END cyclic_function.others;
END interfaceview::IV::cyclic_function;
PACKAGE interfaceview::IV::passive_function
PUBLIC
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_compute_data
FEATURES
my_in : IN PARAMETER DataView::T_SEQUENCE {
Taste::encoding => NATIVE;
};
result : OUT PARAMETER DataView::T_INTEGER {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_compute_data;
SUBPROGRAM IMPLEMENTATION PI_compute_data.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_compute_data.others;
SYSTEM passive_function
FEATURES
PI_compute_data : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::passive_function::PI_compute_data.others {
Taste::coordinates => "350 193";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 100 ms;
Taste::InterfaceName => "compute_data";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => enabled;
END passive_function;
SYSTEM IMPLEMENTATION passive_function.others
SUBCOMPONENTS
test1_obj97 : DATA DataView::T_INTEGER {
Taste::FS_Default_Value => "3";
};
END passive_function.others;
END interfaceview::IV::passive_function;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::cyclic_function;
WITH interfaceview::IV::passive_function;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SYSTEM interfaceview
END interfaceview;
SYSTEM IMPLEMENTATION interfaceview.others
SUBCOMPONENTS
cyclic_function : SYSTEM interfaceview::IV::cyclic_function::cyclic_function.others {
Taste::coordinates => "33 84 203 239";
};
passive_function : SYSTEM interfaceview::IV::passive_function::passive_function.others {
Taste::coordinates => "350 97 553 274";
};
CONNECTIONS
passive_function_PI_compute_data_cyclic_function_RI_compute_data : SUBPROGRAM ACCESS passive_function.PI_compute_data -> cyclic_function.RI_compute_data {
Taste::coordinates => "203 161 276 161 276 193 350 193";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 2970 2100";
Taste::version => "2.0";
END interfaceview::IV;
#!/bin/bash
# must be set from ~/assert_env.sh
[ ! -z "$CLEANUP" ] && rm -rf binary.linux.*
cd Inputs/code
rm -rf *.zip
zip cyclic_function cyclic_function/*
zip passive_function passive_function/*
cd ../..
# build with the C runtime
assert-builder-ocarina.py \
-f \
-p \
--aadlv2 \
-o binary.linux.pohic \
-i ./Inputs/InterfaceView.aadl \
-c ./Inputs/DeploymentView.aadl \
-C passive_function:./Inputs/code/passive_function.zip \
-C cyclic_function:./Inputs/code/cyclic_function.zip || exit 1
# build with the Ada runtime
assert-builder-ocarina.py \
-f \
--aadlv2 \
-o binary.linux.ada \
-i ./Inputs/InterfaceView.aadl \
-c ./Inputs/DeploymentView.aadl \
-C passive_function:./Inputs/code/passive_function.zip \
-C cyclic_function:./Inputs/code/cyclic_function.zip || exit 1
#!/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
# 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 cyclic_function.zip && zip cyclic_function cyclic_function/* && cd $OLDPWD
cd "$SKELS" && rm -f passive_function.zip && zip passive_function passive_function/* && 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
# Build with Ada runtime
USE_POHIC=0
cd "$CWD" && assert-builder-ocarina.py \
--fast \
$DEBUG_MODE \
--aadlv2 \
--keep-case \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o binary.ada \
--subC cyclic_function:"$SKELS"/cyclic_function.zip \
--subC passive_function:"$SKELS"/passive_function.zip \
$ORCHESTRATOR_OPTIONS
# Build with the C runtime
OUTPUTDIR=binary.c
ORCHESTRATOR_OPTIONS+=" -p "
cd "$CWD" && assert-builder-ocarina.py \
--fast \
$DEBUG_MODE \
--aadlv2 \
--keep-case \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
--subC cyclic_function:"$SKELS"/cyclic_function.zip \
--subC passive_function:"$SKELS"/passive_function.zip \
$ORCHESTRATOR_OPTIONS
if [ -f user_init_last.sh ]
then
echo -e "${INFO} Executing user-defined post-build script"
source user_init_last.sh
fi
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
#include <stdio.h>
#ifdef REPORT_MALLOC
#include <malloc.h>
#endif
#include "cyclic_function.h"
#include <stdio.h>
void cyclic_function_startup()
{
printf ("[cyclic function] startup done\n");
}
void cyclic_function_PI_cyclic_activation()
{
static asn1SccT_INTEGER i=0, j=0;
asn1SccT_INTEGER result=0;
asn1SccT_SEQUENCE seq;
seq.x=i;
seq.y=j;
#if WORD_SIZE==8
printf("cycle: input i=%lld, j=%lld\n", i, j);
#else
printf("cycle: input i=%ld, j=%ld\n", i, j);
#endif
cyclic_function_RI_compute_data(&seq, &result);
#if WORD_SIZE==8
printf(" result of computation: %lld\n", result);
#else
printf(" result of computation: %ld\n", result);
#endif
i++;
j++;
#ifdef REPORT_MALLOC
printf("Heap used so far:\n");
printf("total space allocated from system: %d\n", mallinfo().arena);
printf("total allocated space: %d\n", mallinfo().uordblks);
printf("total non-inuse space: %d\n", mallinfo().fordblks);
#endif
#ifdef COVERAGE
__gcov_flush();
#endif
}
/* User code: This file will not be overwritten by TASTE. */
#include "cyclic_function.h"
#include <stdio.h>
#ifdef REPORT_MALLOC
#include <malloc.h>
#endif
#include "cyclic_function.h"
#include <stdio.h>
void cyclic_function_startup()
{
printf ("[cyclic function] startup done\n");
}
void cyclic_function_PI_cyclic_activation()
{
static asn1SccT_INTEGER i=0, j=0;
asn1SccT_INTEGER result=0;
asn1SccT_SEQUENCE seq;
seq.x=i;
seq.y=j;
#if WORD_SIZE==8
printf("cycle: input i=%lld, j=%lld\n", i, j);
#else
printf("cycle: input i=%ld, j=%ld\n", i, j);
#endif
cyclic_function_RI_compute_data(&seq, &result);
#if WORD_SIZE==8
printf(" result of computation: %lld\n", result);
#else
printf(" result of computation: %ld\n", result);
#endif
i++;
j++;
#ifdef REPORT_MALLOC
printf("Heap used so far:\n");
printf("total space allocated from system: %d\n", mallinfo().arena);
printf("total allocated space: %d\n", mallinfo().uordblks);
printf("total non-inuse space: %d\n", mallinfo().fordblks);
#endif
#ifdef COVERAGE
__gcov_flush();
#endif
}
......@@ -7,11 +7,20 @@
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void cyclic_function_startup();
void cyclic_function_PI_cyclic_activation();
extern void cyclic_function_RI_compute_data(const asn1SccT_SEQUENCE *, asn1SccT_INTEGER *);
extern void cyclic_function_RI_compute_data(const asn1SccT_SEQUENCE *,
asn1SccT_INTEGER *);
#ifdef __cplusplus
}
#endif
#endif
/*
Code automatically generated by asn1scc tool
*/
#include <limits.h>
#include <string.h>
#include <math.h>
#include "Context-passive-function.h"
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccContext_passive_function_Initialize(asn1SccContext_passive_function* pVal)
{
*pVal = (asn1SccContext_passive_function) {
.test1 = 0
};
}
#endif
flag asn1SccContext_passive_function_IsConstraintValid(const asn1SccContext_passive_function* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = asn1SccT_INTEGER_IsConstraintValid(&pVal->test1, pErrCode);
return ret;
}
const asn1SccContext_passive_function passive_function_ctxt = {
.test1 = 3
};
#ifndef GENERATED_ASN1SCC_CONTEXT_PASSIVE_FUNCTION_H
#define GENERATED_ASN1SCC_CONTEXT_PASSIVE_FUNCTION_H
/*
Code automatically generated by asn1scc tool
*/
#include "dataview-uniq.h"
#include "asn1crt.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
asn1SccT_INTEGER test1;
} asn1SccContext_passive_function;
#define asn1SccContext_passive_function_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccContext_passive_function_REQUIRED_BITS_FOR_ENCODING 8
#define asn1SccContext_passive_function_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccContext_passive_function_REQUIRED_BITS_FOR_ACN_ENCODING 8
#define asn1SccContext_passive_function_REQUIRED_BYTES_FOR_XER_ENCODING 88
void asn1SccContext_passive_function_Initialize(asn1SccContext_passive_function* pVal);
flag asn1SccContext_passive_function_IsConstraintValid(const asn1SccContext_passive_function* val, int* pErrCode);
extern const asn1SccContext_passive_function passive_function_ctxt;
/* ================= Encoding/Decoding function prototypes =================
* These functions are placed at the end of the file to make sure all types
* have been declared first, in case of parameterized ACN encodings
* ========================================================================= */
#ifdef __cplusplus
}
#endif
#endif
This diff is collapsed.
This diff is collapsed.
/*
Code automatically generated by asn1scc tool
*/
#include <limits.h>
#include <string.h>
#include <math.h>
#include "dataview-uniq.h"
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccT_Int32_Initialize(asn1SccT_Int32* pVal)
{
*pVal = (asn1SccT_Int32) -2147483648LL;
}
#endif
flag asn1SccT_Int32_IsConstraintValid(const asn1SccT_Int32* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = (-2147483648LL <= *pVal && *pVal <= 2147483647LL);
*pErrCode = ret ? 0 : ERR_asn1SccT_Int32;
return ret;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccT_UInt32_Initialize(asn1SccT_UInt32* pVal)
{
*pVal = (asn1SccT_UInt32) 0;
}
#endif
flag asn1SccT_UInt32_IsConstraintValid(const asn1SccT_UInt32* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = (*pVal <= 4294967295LL);
*pErrCode = ret ? 0 : ERR_asn1SccT_UInt32;
return ret;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccT_Int8_Initialize(asn1SccT_Int8* pVal)
{
*pVal = (asn1SccT_Int8) -128;
}
#endif
flag asn1SccT_Int8_IsConstraintValid(const asn1SccT_Int8* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = (-128 <= *pVal && *pVal <= 127);
*pErrCode = ret ? 0 : ERR_asn1SccT_Int8;
return ret;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccT_UInt8_Initialize(asn1SccT_UInt8* pVal)
{
*pVal = (asn1SccT_UInt8) 0;
}
#endif
flag asn1SccT_UInt8_IsConstraintValid(const asn1SccT_UInt8* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = (*pVal <= 255);
*pErrCode = ret ? 0 : ERR_asn1SccT_UInt8;
return ret;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccT_Boolean_Initialize(asn1SccT_Boolean* pVal)
{
*pVal = (asn1SccT_Boolean) FALSE;
}
#endif
flag asn1SccT_Boolean_IsConstraintValid(const asn1SccT_Boolean* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = TRUE; *pErrCode = 0;
return ret;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccT_INTEGER_Initialize(asn1SccT_INTEGER* pVal)
{
*pVal = (asn1SccT_INTEGER) 0;
}
#endif
flag asn1SccT_INTEGER_IsConstraintValid(const asn1SccT_INTEGER* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = (*pVal <= 255);
*pErrCode = ret ? 0 : ERR_asn1SccT_INTEGER;
return ret;
}
#if !defined(_MSC_VER) || _MSC_VER >= 1800
void asn1SccT_SEQUENCE_Initialize(asn1SccT_SEQUENCE* pVal)
{
*pVal = (asn1SccT_SEQUENCE) {
.x = 0,
.y = 0
};
}
#endif
flag asn1SccT_SEQUENCE_IsConstraintValid(const asn1SccT_SEQUENCE* pVal, int* pErrCode)
{
flag ret = TRUE;
*pErrCode=0;
(void)pVal;
ret = asn1SccT_INTEGER_IsConstraintValid(&pVal->x, pErrCode);
if (ret) {
ret = asn1SccT_INTEGER_IsConstraintValid(&pVal->y, pErrCode);
}
return ret;
}
#ifndef GENERATED_ASN1SCC_DATAVIEW_UNIQ_H
#define GENERATED_ASN1SCC_DATAVIEW_UNIQ_H
/*
Code automatically generated by asn1scc tool
*/
#include "asn1crt.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef asn1SccSint asn1SccT_Int32;
#define asn1SccT_Int32_REQUIRED_BYTES_FOR_ENCODING 4
#define asn1SccT_Int32_REQUIRED_BITS_FOR_ENCODING 32
#define asn1SccT_Int32_REQUIRED_BYTES_FOR_ACN_ENCODING 4
#define asn1SccT_Int32_REQUIRED_BITS_FOR_ACN_ENCODING 32
#define asn1SccT_Int32_REQUIRED_BYTES_FOR_XER_ENCODING 39
void asn1SccT_Int32_Initialize(asn1SccT_Int32* pVal);
flag asn1SccT_Int32_IsConstraintValid(const asn1SccT_Int32* val, int* pErrCode);
#ifndef ERR_asn1SccT_Int32
#define ERR_asn1SccT_Int32 1001 /*(-2147483648 .. 2147483647)*/
#endif
typedef asn1SccUint asn1SccT_UInt32;
#define asn1SccT_UInt32_REQUIRED_BYTES_FOR_ENCODING 4
#define asn1SccT_UInt32_REQUIRED_BITS_FOR_ENCODING 32
#define asn1SccT_UInt32_REQUIRED_BYTES_FOR_ACN_ENCODING 4
#define asn1SccT_UInt32_REQUIRED_BITS_FOR_ACN_ENCODING 32
#define asn1SccT_UInt32_REQUIRED_BYTES_FOR_XER_ENCODING 41
void asn1SccT_UInt32_Initialize(asn1SccT_UInt32* pVal);
flag asn1SccT_UInt32_IsConstraintValid(const asn1SccT_UInt32* val, int* pErrCode);
#ifndef ERR_asn1SccT_UInt32
#define ERR_asn1SccT_UInt32 1002 /*(0 .. 4294967295)*/
#endif
typedef asn1SccSint asn1SccT_Int8;
#define asn1SccT_Int8_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_Int8_REQUIRED_BITS_FOR_ENCODING 8
#define asn1SccT_Int8_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccT_Int8_REQUIRED_BITS_FOR_ACN_ENCODING 8
#define asn1SccT_Int8_REQUIRED_BYTES_FOR_XER_ENCODING 37
void asn1SccT_Int8_Initialize(asn1SccT_Int8* pVal);
flag asn1SccT_Int8_IsConstraintValid(const asn1SccT_Int8* val, int* pErrCode);
#ifndef ERR_asn1SccT_Int8
#define ERR_asn1SccT_Int8 1003 /*(-128 .. 127)*/
#endif
typedef asn1SccUint asn1SccT_UInt8;
#define asn1SccT_UInt8_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_UInt8_REQUIRED_BITS_FOR_ENCODING 8
#define asn1SccT_UInt8_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccT_UInt8_REQUIRED_BITS_FOR_ACN_ENCODING 8
#define asn1SccT_UInt8_REQUIRED_BYTES_FOR_XER_ENCODING 39
void asn1SccT_UInt8_Initialize(asn1SccT_UInt8* pVal);
flag asn1SccT_UInt8_IsConstraintValid(const asn1SccT_UInt8* val, int* pErrCode);
#ifndef ERR_asn1SccT_UInt8
#define ERR_asn1SccT_UInt8 1004 /*(0 .. 255)*/
#endif
typedef flag asn1SccT_Boolean;
#define asn1SccT_Boolean_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BITS_FOR_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BITS_FOR_ACN_ENCODING 1
#define asn1SccT_Boolean_REQUIRED_BYTES_FOR_XER_ENCODING 36
void asn1SccT_Boolean_Initialize(asn1SccT_Boolean* pVal);
flag asn1SccT_Boolean_IsConstraintValid(const asn1SccT_Boolean* val, int* pErrCode);
typedef asn1SccUint asn1SccT_INTEGER;
#define asn1SccT_INTEGER_REQUIRED_BYTES_FOR_ENCODING 1
#define asn1SccT_INTEGER_REQUIRED_BITS_FOR_ENCODING 8
#define asn1SccT_INTEGER_REQUIRED_BYTES_FOR_ACN_ENCODING 1
#define asn1SccT_INTEGER_REQUIRED_BITS_FOR_ACN_ENCODING 8
#define asn1SccT_INTEGER_REQUIRED_BYTES_FOR_XER_ENCODING 43
void asn1SccT_INTEGER_Initialize(asn1SccT_INTEGER* pVal);
flag asn1SccT_INTEGER_IsConstraintValid(const asn1SccT_INTEGER* val, int* pErrCode);
#ifndef ERR_asn1SccT_INTEGER
#define ERR_asn1SccT_INTEGER 1005 /*(0 .. 255)*/
#endif
typedef struct {
asn1SccT_INTEGER x;
asn1SccT_INTEGER y;
} asn1SccT_SEQUENCE;
#define asn1SccT_SEQUENCE_REQUIRED_BYTES_FOR_ENCODING 2
#define asn1SccT_SEQUENCE_REQUIRED_BITS_FOR_ENCODING 16
#define asn1SccT_SEQUENCE_REQUIRED_BYTES_FOR_ACN_ENCODING 2
#define asn1SccT_SEQUENCE_REQUIRED_BITS_FOR_ACN_ENCODING 16
#define asn1SccT_SEQUENCE_REQUIRED_BYTES_FOR_XER_ENCODING 79
void asn1SccT_SEQUENCE_Initialize(asn1SccT_SEQUENCE* pVal);
flag asn1SccT_SEQUENCE_IsConstraintValid(const asn1SccT_SEQUENCE* val, int* pErrCode);
/* ================= Encoding/Decoding function prototypes =================
* These functions are placed at the end of the file to make sure all types
* have been declared first, in case of parameterized ACN encodings
* ========================================================================= */
#ifdef __cplusplus
}
#endif
#endif
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
#include "passive_function.h"
#include "Context-passive-function.h"
#include <stdio.h>
void passive_function_startup()
{
printf ("[passive_function] startup done\n");
}
void passive_function_PI_compute_data(const asn1SccT_SEQUENCE *IN_my_in, asn1SccT_INTEGER *OUT_result)
{
*OUT_result = IN_my_in->x + IN_my_in->y;
// passive_function_ctxt.test1 = *OUT_result;
/* test1 is a context parameter */
// printf("test1 = %lld\n", passive_function_ctxt.test1);
printf("test1 = %lld\n", *OUT_result);
if (*OUT_result > 255) *OUT_result = 255;
}
/* User code: This file will not be overwritten by TASTE. */
/* Functions to be filled by the user (never overwritten by buildsupport tool) */
#include "passive_function.h"
#include "Context-passive-function.h"
#include <stdio.h>
void passive_function_startup()
{
printf ("[passive_function] startup done\n");
}
void passive_function_PI_compute_data(const asn1SccT_SEQUENCE *IN_my_in, asn1SccT_INTEGER *OUT_result)
{
*OUT_result = IN_my_in->x + IN_my_in->y;
// passive_function_ctxt.test1 = *OUT_result;
/* test1 is a context parameter */
// printf("test1 = %lld\n", passive_function_ctxt.test1);
printf("test1 = %lld\n", *OUT_result);
if (*OUT_result > 255) *OUT_result = 255;
}
......@@ -7,9 +7,18 @@
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void passive_function_startup();
void passive_function_PI_compute_data(const asn1SccT_SEQUENCE *, asn1SccT_INTEGER *);
void passive_function_PI_compute_data(const asn1SccT_SEQUENCE *,
asn1SccT_INTEGER *);
#ifdef __cplusplus
}
#endif
#endif
This diff is collapsed.
......@@ -4,8 +4,8 @@ import sys
timeout = 5
binaries = [
"binary.linux.ada/binaries/demo_obj80",
"binary.linux.pohic/binaries/demo_obj80"]
"binary.ada/binaries/demo",
"binary.c/binaries/demo"]
expected = [
["\[passive_function\] startup done", "\[cyclic function\] startup done"],
......
---------------------------------------------------
-- AADL2.0
-- TASTE
--
-- AADL2.1
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
......@@ -11,17 +11,19 @@ PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS cortex_m_partition
END cortex_m_partition;
PROCESS crazyflie_v2_partition
END crazyflie_v2_partition;
PROCESS IMPLEMENTATION cortex_m_partition.others
END cortex_m_partition.others;
PROCESS IMPLEMENTATION crazyflie_v2_partition.others
END crazyflie_v2_partition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
WITH ocarina_processors_arm;
WITH deploymentview::DV::Node1;
WITH Taste;
......@@ -33,25 +35,23 @@ END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_Function1 : SYSTEM interfaceview::IV::Function1.others {
Taste::coordinates => "708 975 1103 1303";
IV_Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::FunctionName => "Function1";
};
IV_Function2 : SYSTEM interfaceview::IV::Function2.others {
Taste::coordinates => "1195 928 1565 1334";
IV_Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::FunctionName => "Function2";
};
cortex_m_partition : PROCESS deploymentview::DV::Node1::cortex_m_partition.others {
Taste::coordinates => "653 746 1769 1453";
crazyflie_v2_partition : PROCESS deploymentview::DV::Node1::crazyflie_v2_partition.others {
Taste::coordinates => "104907 68615 158936 96673";
Deployment::Port_Number => 0;
};
cortex_m_i : PROCESSOR ocarina_processors_arm::cortex_m.i {
Taste::coordinates => "513 544 1909 1554";
crazyflie_v2_gnat : PROCESSOR ocarina_processors_arm::crazyflie_v2.gnat {
Taste::coordinates => "98153 60599 165690 100681";
};
PROPERTIES
Taste::APLC_Binding => (reference (cortex_m_partition)) APPLIES TO IV_Function1;
Taste::APLC_Binding => (reference (cortex_m_partition)) APPLIES TO IV_Function2;
Actual_Processor_Binding => (reference (cortex_m_i)) APPLIES TO cortex_m_partition;
Taste::APLC_Binding => (reference (crazyflie_v2_partition)) APPLIES TO IV_Function1;
Taste::APLC_Binding => (reference (crazyflie_v2_partition)) APPLIES TO IV_Function2;
Actual_Processor_Binding => (reference (crazyflie_v2_gnat)) APPLIES TO crazyflie_v2_partition;
END Node1.others;
SYSTEM deploymentview
......@@ -60,15 +60,15 @@ END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "339 256 2083 1698";
Taste::coordinates => "89711 49147 174132 106407";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 2970 2100";
Taste::version => "1.3.19";
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.0";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
Taste::HWLibraries => ("../../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
#!/bin/bash -e
# This script will build your TASTE system.
# You must check it before running it: it may need to be adapted to your context:
# 1) You may need to fix some paths and filenames (path to interface/deployment views)
# 2) You may need to specify additional paths for the compiler to find .h file
# (e.g. "export C_INCLUDE_PATH=/usr/include/xenomai/analogy/:$C_INCLUDE_PATH")
# 3) You may need to link with pre-built libraries, using the -l option
# (e.g. -l /usr/lib/libanalogy.a,/usr/lib/librtdm.a)
# 4) You may need to change the runtime (add -p flag to select PolyORB-HI-C)
# etc.
# Note: TASTE will not overwrite your changes - if you need to update some parts
# you will have to merge the changes with the newly-created "build-script.new.sh" file.
taste-update-data-view || exit 1
rm -f function0.zip
zip function0 function0/*
rm -f function1.zip
zip function1 function1/*
[ ! -z "$CLEANUP" ] && rm -rf binary
echo Building the system with the Ada runtime
assert-builder-ocarina.py \
-f \
# 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.'