Commit 3012f606 authored by Maxime Perrotin's avatar Maxime Perrotin

Demonstrate support of multiple instances in TASTE

Tada!!!
parent 7f0c2d56
PACKAGE process_package_proxy
PUBLIC
WITH process_package;
WITH AI;
SYSTEM deploymentview
EXTENDS process_package::deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.final
EXTENDS process_package::deploymentview.final
PROPERTIES
AI::root_system => "SELECTED";
Priority => 2 APPLIES TO x86_partition.function2;
Priority => 2 APPLIES TO x86_partition.function3;
END deploymentview.final;
END process_package_proxy;
TASTE-Dataview DEFINITIONS ::= BEGIN
MyInteger[]
MyReal[]
MyBool[]
MyEnum[]
MySeq[]
MyChoice[]
MySeqOf[]
MyOctStr[]
END
\ No newline at end of file
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- 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 Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS x86_partition
END x86_partition;
PROCESS IMPLEMENTATION x86_partition.others
END x86_partition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::mygui;
WITH interfaceview::IV::Function2;
WITH interfaceview::IV::Function3;
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_Function1 : SYSTEM interfaceview::IV::Function1::Function1.others {
Taste::FunctionName => "Function1";
};
IV_mygui : SYSTEM interfaceview::IV::mygui::mygui.others {
Taste::FunctionName => "mygui";
};
IV_Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::FunctionName => "Function2";
};
IV_Function3 : SYSTEM interfaceview::IV::Function3::Function3.others {
Taste::FunctionName => "Function3";
};
x86_partition : PROCESS deploymentview::DV::Node1::x86_partition.others {
Taste::coordinates => "106102 64781 138458 87480";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "102057 58295 142503 90723";
};
PROPERTIES
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function1;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_mygui;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function2;
Taste::APLC_Binding => (reference (x86_partition)) APPLIES TO IV_Function3;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO x86_partition;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "97001 49030 147559 95355";
};
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.
#!/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
# 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
# Generate code for OpenGEODE function function1
cd "$SKELS"/function1 && opengeode --toAda function1.pr system_structure.pr && cd $OLDPWD
# Generate code for OpenGEODE function generic_a
cd "$SKELS"/generic_a && opengeode --toAda generic_a.pr system_structure.pr && cd $OLDPWD
# Generate code for function function2 (instance of OpenGEODE function generic_a)
cd "$SKELS"/function2 && opengeode --toAda system_structure.pr ../generic_a/generic_a.pr && rm -f generic_a.ad* && cd $OLDPWD
# Generate code for function function3 (instance of OpenGEODE function generic_a)
cd "$SKELS"/function3 && opengeode --toAda system_structure.pr ../generic_a/generic_a.pr && rm -f generic_a.ad* && cd $OLDPWD
cd "$SKELS" && rm -f function1.zip && zip function1 function1/* && cd $OLDPWD
cd "$SKELS" && rm -f generic_a.zip && zip generic_a generic_a/* && cd $OLDPWD
cd "$SKELS" && rm -f function2.zip && zip function2 function2/* && cd $OLDPWD
cd "$SKELS" && rm -f function3.zip && zip function3 function3/* && 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 [ ! -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 \
--aadlv2 \
--keep-case \
--interfaceView "$INTERFACEVIEW" \
--deploymentView "$DEPLOYMENTVIEW" \
-o "$OUTPUTDIR" \
--subAda function1:"$SKELS"/function1.zip \
--with-extra-Ada-code generic_a:"$SKELS"/generic_a \
--subAda function2:"$SKELS"/function2.zip \
--subAda function3:"$SKELS"/function3.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
isImportDeclaration('deploymentview::DV','PUBLIC','interfaceview::IV','').
isSubcomponent('deploymentview::DV','Node1','others','IV_Function1','SYSTEM','interfaceview::IV::Function1.others','NIL','NIL','').
isProperty('NIL','=>','deploymentview::DV','Node1','others','IV_Function1','Taste::FunctionName','"Function1"','').
isProperty('NIL','APPLIES TO','deploymentview::DV','Node1','others','IV_Function1','Taste::APLC_Binding','(reference (x86_partition))','').
isSubcomponent('deploymentview::DV','Node1','others','IV_mygui','SYSTEM','interfaceview::IV::mygui.others','NIL','NIL','').
isProperty('NIL','=>','deploymentview::DV','Node1','others','IV_mygui','Taste::FunctionName','"mygui"','').
isProperty('NIL','APPLIES TO','deploymentview::DV','Node1','others','IV_mygui','Taste::APLC_Binding','(reference (x86_partition))','').
isSubcomponent('deploymentview::DV','Node1','others','IV_Function2','SYSTEM','interfaceview::IV::Function2.others','NIL','NIL','').
isProperty('NIL','=>','deploymentview::DV','Node1','others','IV_Function2','Taste::FunctionName','"Function2"','').
isProperty('NIL','APPLIES TO','deploymentview::DV','Node1','others','IV_Function2','Taste::APLC_Binding','(reference (x86_partition))','').
isSubcomponent('deploymentview::DV','Node1','others','IV_Function3','SYSTEM','interfaceview::IV::Function3.others','NIL','NIL','').
isProperty('NIL','=>','deploymentview::DV','Node1','others','IV_Function3','Taste::FunctionName','"Function3"','').
isProperty('NIL','APPLIES TO','deploymentview::DV','Node1','others','IV_Function3','Taste::APLC_Binding','(reference (x86_partition))','').
isComponentType('deploymentview::DV::Node1','PUBLIC','x86_partition','PROCESS','NIL','').
isComponentImplementation('deploymentview::DV::Node1','PUBLIC','x86_partition','others','PROCESS','NIL','others','').
isProperty('NIL','APPLIES TO','deploymentview::DV','Node1','others','x86_partition','Actual_Processor_Binding','(reference (x86_linux))','').
isSubcomponent('deploymentview::DV','Node1','others','x86_partition','PROCESS','deploymentview::DV::Node1::x86_partition.others','NIL','NIL','').
isProperty('NIL','=>','deploymentview::DV','Node1','others','x86_partition','Taste::coordinates','"106102 64781 138458 87480"','').
isProperty('NIL','=>','deploymentview::DV','Node1','others','x86_partition','Deployment::Port_Number','0','').
isImportDeclaration('deploymentview::DV','PUBLIC','ocarina_processors_x86','').
isProperty('NIL','=>','deploymentview::DV','x86','NIL','NIL','Scheduling_Protocol','Posix_1003_Highest_Priority_First_Protocol','').
isSubcomponent('deploymentview::DV','Node1','others','x86_linux','PROCESSOR','ocarina_processors_x86::x86.linux','NIL','NIL','').
isProperty('NIL','=>','deploymentview::DV','Node1','others','x86_linux','Taste::coordinates','"102057 58295 142503 90723"','').
isComponentType('deploymentview::DV','PUBLIC','Node1','SYSTEM','NIL','').
isComponentImplementation('deploymentview::DV','PUBLIC','Node1','others','SYSTEM','NIL','others','').
isSubcomponent('deploymentview::DV','deploymentview','others','Node1','SYSTEM','Node1.others','NIL','NIL','').
isProperty('NIL','=>','deploymentview::DV','deploymentview','others','Node1','Taste::coordinates','"97001 49030 147559 95355"','').
isPackage('deploymentview::DV::Node1','PUBLIC','').
isImportDeclaration('deploymentview::DV::Node1','PUBLIC','Taste','').
isImportDeclaration('deploymentview::DV::Node1','PUBLIC','Deployment','').
isImportDeclaration('deploymentview::DV::Node1','PUBLIC','TASTE_DV_Properties','').
isImportDeclaration('deploymentview::DV','PUBLIC','deploymentview::DV::Node1','').
isProperty('_','_','_','_','_','_','LMP::Unparser_ID_Case','AsIs','').
isProperty('_','_','_','_','_','_','LMP::Unparser_Insert_Header','Yes','').
isVersion('AADL2.1','TASTE type deploymentview','','generated code: do not edit').
isPackage('deploymentview::DV','PUBLIC','').
isImportDeclaration('deploymentview::DV','PUBLIC','Taste','').
isImportDeclaration('deploymentview::DV','PUBLIC','Deployment','').
isProperty('NIL','=>','deploymentview::DV','NIL','NIL','NIL','Taste::coordinates','"0 0 297000 210000"','').
isProperty('NIL','=>','deploymentview::DV','NIL','NIL','NIL','Taste::version','"1.3"','').
isProperty('NIL','=>','deploymentview::DV','NIL','NIL','NIL','Taste::interfaceView','"InterfaceView.aadl"','').
isProperty('NIL','=>','deploymentview::DV','NIL','NIL','NIL','Taste::HWLibraries','("../../tool-inst/share/ocarina/AADLv2/ocarina_components.aadl")','').
isComponentType('deploymentview::DV','PUBLIC','deploymentview','SYSTEM','NIL','').
isComponentImplementation('deploymentview::DV','PUBLIC','deploymentview','others','SYSTEM','NIL','others','').
isImportDeclaration('deploymentview::DV','PUBLIC','interfaceview::IV','').
isSubcomponent('deploymentview::DV','deploymentview','others','interfaceview','SYSTEM','interfaceview::IV::interfaceview.others','NIL','NIL','').
isImportDeclaration('deploymentview::DV','PUBLIC','TASTE_DV_Properties','').
TASTE-MONITORING DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
TASTE-Peek ::= SEQUENCE {
base-address INTEGER (0..4294967295), -- 32bits type
offset INTEGER (-2147483648..2147483647),
base-type ENUMERATED { int-32, int-64, real-single, real-double, octet-string },
nb-of-elements INTEGER (1..10), -- nb-of-elements EXCEPT for octet-string (1 element)
sample-time INTEGER (0..15) -- in seconds
}
TASTE-Peek-list ::= SEQUENCE (SIZE (0..5)) OF TASTE-Peek
TASTE-Peek-id ::= INTEGER (0..4294967295)
TASTE-Peek-id-list ::= SEQUENCE (SIZE (1..10)) OF TASTE-Peek-id
TASTE-Monitoring-value ::= CHOICE {
int-32 INTEGER (-2147483648 .. 2147483647) ,
int-64 INTEGER (-9223372036854775807 .. 9223372036854775807),
real-single REAL (-100000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000.0),
real-double REAL (-100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0),
octet-string OCTET STRING (SIZE (0..10))
}
-- Result: memory value
TASTE-Monitoring ::= SEQUENCE {
id TASTE-Peek-id,
values SEQUENCE (SIZE (1..10)) OF TASTE-Monitoring-value
}
TASTE-Monitoring-list ::= SEQUENCE (SIZE (0..5)) OF TASTE-Monitoring
TASTE-Poke-list ::= TASTE-Monitoring-list
empty-peek-list TASTE-Peek-list ::= {}
empty-poke-list TASTE-Poke-list ::= {}
-- Type to hold a maximum number of peek values (defined in a context parameter, thus patchable)
TASTE-Peek-limit ::= INTEGER (0..1000)
END
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- 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
TASTE-BasicTypes DEFINITIONS ::=
BEGIN
-- Set of TASTE predefined basic types
T-Int32 ::= INTEGER (-2147483648 .. 2147483647)
T-UInt32 ::= INTEGER (0 .. 4294967295)
T-Int8 ::= INTEGER (-128 .. 127)
T-UInt8 ::= INTEGER (0 .. 255)
T-Boolean ::= BOOLEAN
END
/* CIF PROCESS (250, 150), (150, 75) */
process function1;
/* CIF TEXT (734, 141), (290, 227) */
-- Text area for declarations and comments
dcl cond myBool := false;
/* CIF ENDTEXT */
/* CIF START (458, 122), (70, 35) */
START;
/* CIF NEXTSTATE (458, 172), (70, 35) */
NEXTSTATE Wait;
/* CIF state (458, 172), (70, 35) */
state Wait;
/* CIF input (458, 227), (70, 35) */
input toto;
/* CIF task (418, 282), (150, 35) */
task cond := not cond;
/* CIF output (418, 337), (149, 35) */
output doSomething(cond);
/* CIF output (441, 392), (104, 35) */
output Hello1(true);
/* CIF output (439, 447), (108, 35) */
output Hello2(false);
/* CIF NEXTSTATE (458, 497), (70, 35) */
NEXTSTATE wait;
endstate;
endprocess function1;
\ No newline at end of file
/* CIF Keep Specific Geode ASNFilename 'dataview-uniq.asn' */
USE Datamodel;
SYSTEM function1;
SIGNAL toto;
/* CIF Keep Specific Geode PARAMNAMES p0 */
SIGNAL doSomething (MyBool);
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL Hello1 (MyBool);
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL Hello2 (MyBool);
CHANNEL c
FROM ENV TO function1 WITH toto;
FROM function1 TO ENV WITH doSomething,Hello1,Hello2;
ENDCHANNEL;
BLOCK function1;
SIGNALROUTE r
FROM ENV TO function1 WITH toto;
FROM function1 TO ENV WITH doSomething,Hello1,Hello2;
CONNECT c and r;
PROCESS function1 REFERENCED;
ENDBLOCK;
ENDSYSTEM;
\ No newline at end of file
TASTE-MONITORING DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
TASTE-Peek ::= SEQUENCE {
base-address INTEGER (0..4294967295), -- 32bits type
offset INTEGER (-2147483648..2147483647),
base-type ENUMERATED { int-32, int-64, real-single, real-double, octet-string },
nb-of-elements INTEGER (1..10), -- nb-of-elements EXCEPT for octet-string (1 element)
sample-time INTEGER (0..15) -- in seconds
}
TASTE-Peek-list ::= SEQUENCE (SIZE (0..5)) OF TASTE-Peek
TASTE-Peek-id ::= INTEGER (0..4294967295)
TASTE-Peek-id-list ::= SEQUENCE (SIZE (1..10)) OF TASTE-Peek-id
TASTE-Monitoring-value ::= CHOICE {
int-32 INTEGER (-2147483648 .. 2147483647) ,
int-64 INTEGER (-9223372036854775807 .. 9223372036854775807),
real-single REAL (-100000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000.0),
real-double REAL (-100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0),
octet-string OCTET STRING (SIZE (0..10))
}
-- Result: memory value
TASTE-Monitoring ::= SEQUENCE {
id TASTE-Peek-id,
values SEQUENCE (SIZE (1..10)) OF TASTE-Monitoring-value
}
TASTE-Monitoring-list ::= SEQUENCE (SIZE (0..5)) OF TASTE-Monitoring
TASTE-Poke-list ::= TASTE-Monitoring-list
empty-peek-list TASTE-Peek-list ::= {}
empty-poke-list TASTE-Poke-list ::= {}
-- Type to hold a maximum number of peek values (defined in a context parameter, thus patchable)
TASTE-Peek-limit ::= INTEGER (0..1000)
END
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- 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
TASTE-BasicTypes DEFINITIONS ::=
BEGIN
-- Set of TASTE predefined basic types
T-Int32 ::= INTEGER (-2147483648 .. 2147483647)
T-UInt32 ::= INTEGER (0 .. 4294967295)
T-Int8 ::= INTEGER (-128 .. 127)
T-UInt8 ::= INTEGER (0 .. 255)
T-Boolean ::= BOOLEAN
END
/* CIF Keep Specific Geode ASNFilename 'dataview-uniq.asn' */
USE Datamodel;
SYSTEM function2;
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL Hello (MyBool);
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL go_out (MyInteger);
CHANNEL c
FROM ENV TO function2 WITH Hello;
FROM function2 TO ENV WITH go_out;
ENDCHANNEL;
BLOCK function2;
SIGNALROUTE r
FROM ENV TO function2 WITH Hello;
FROM function2 TO ENV WITH go_out;
CONNECT c and r;
PROCESS function2:Generic_A;
ENDBLOCK;
ENDSYSTEM;
\ No newline at end of file
TASTE-MONITORING DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
TASTE-Peek ::= SEQUENCE {
base-address INTEGER (0..4294967295), -- 32bits type
offset INTEGER (-2147483648..2147483647),
base-type ENUMERATED { int-32, int-64, real-single, real-double, octet-string },
nb-of-elements INTEGER (1..10), -- nb-of-elements EXCEPT for octet-string (1 element)
sample-time INTEGER (0..15) -- in seconds
}
TASTE-Peek-list ::= SEQUENCE (SIZE (0..5)) OF TASTE-Peek
TASTE-Peek-id ::= INTEGER (0..4294967295)
TASTE-Peek-id-list ::= SEQUENCE (SIZE (1..10)) OF TASTE-Peek-id
TASTE-Monitoring-value ::= CHOICE {
int-32 INTEGER (-2147483648 .. 2147483647) ,
int-64 INTEGER (-9223372036854775807 .. 9223372036854775807),
real-single REAL (-100000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000.0),
real-double REAL (-100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0 .. 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0),
octet-string OCTET STRING (SIZE (0..10))
}
-- Result: memory value
TASTE-Monitoring ::= SEQUENCE {
id TASTE-Peek-id,
values SEQUENCE (SIZE (1..10)) OF TASTE-Monitoring-value
}
TASTE-Monitoring-list ::= SEQUENCE (SIZE (0..5)) OF TASTE-Monitoring
TASTE-Poke-list ::= TASTE-Monitoring-list
empty-peek-list TASTE-Peek-list ::= {}
empty-poke-list TASTE-Poke-list ::= {}
-- Type to hold a maximum number of peek values (defined in a context parameter, thus patchable)
TASTE-Peek-limit ::= INTEGER (0..1000)
END
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
-- 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
TASTE-BasicTypes DEFINITIONS ::=
BEGIN
-- Set of TASTE predefined basic types
T-Int32 ::= INTEGER (-2147483648 .. 2147483647)
T-UInt32 ::= INTEGER (0 .. 4294967295)
T-Int8 ::= INTEGER (-128 .. 127)
T-UInt8 ::= INTEGER (0 .. 255)
T-Boolean ::= BOOLEAN
END
/* CIF Keep Specific Geode ASNFilename 'dataview-uniq.asn' */
USE Datamodel;
SYSTEM function3;
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL Hello (MyBool);
/* CIF Keep Specific Geode PARAMNAMES a */
SIGNAL go_out (MyInteger);