Commit e645e12d authored by Maxime Perrotin's avatar Maxime Perrotin

Add demo with 3 nodes

parent a7438fe9
TASTE-Dataview DEFINITIONS ::= BEGIN
-- In this ACN model, you can specify custom binary encoding rules for
-- your data types. For example if you require a specific memory layout
-- for a record, or need to add padding fields, define endianness, etc.
-- you can do that with ACN. Refer to the ACN user manual for details.
-- TASTE-Boolean []
END
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 => "/home/taste/tool-inst/include/ocarina/runtime/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 => "/home/taste/tool-inst/include/ocarina/runtime/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 => "/home/taste/tool-inst/include/ocarina/runtime/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 => ("../../../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;
#!/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=$(pwd)/.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"
source user_init_last.sh
fi
/* User code: This file will not be overwritten by TASTE. */
#include "function1.h"
void function1_startup()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
}
void function1_PI_f1(const asn1SccTASTE_Boolean *IN_a)
{
/* Write your code here! */
}
/* This file was generated automatically: DO NOT MODIFY IT ! */
/* Declaration of the functions that have to be provided by the user */
#ifndef __USER_CODE_H_function1__
#define __USER_CODE_H_function1__
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void function1_startup();
void function1_PI_f1(const asn1SccTASTE_Boolean *);
#ifdef __cplusplus
}
#endif
#endif
/* User code: This file will not be overwritten by TASTE. */
#include "function2.h"
void function2_startup()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
}
void function2_PI_f2(const asn1SccTASTE_Boolean *IN_a)
{
/* Write your code here! */
}
/* This file was generated automatically: DO NOT MODIFY IT ! */
/* Declaration of the functions that have to be provided by the user */
#ifndef __USER_CODE_H_function2__
#define __USER_CODE_H_function2__
#include "C_ASN1_Types.h"
#ifdef __cplusplus
extern "C" {
#endif
void function2_startup();
void function2_PI_f2(const asn1SccTASTE_Boolean *);
#ifdef __cplusplus
}
#endif
#endif
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