Commits (6)
......@@ -38,14 +38,16 @@ package body TASTE.Semantic_Check is
end if;
end loop;
-- Check that PIs have one IN parameter at most
if PI.Params.Length > 1 or (PI.Params.Length = 1 and
(for all Param of PI.Params => Param.Direction /= param_in))
then
raise Semantic_Error with
"In SDL function " & To_String (Each.Name) & ": all PIs "
& "shall be sporadic and/or have a single IN parameter "
& "(fix " & To_String (PI.Name) & ")";
end if;
-- Removed that check: sync interfaces with multiple params
-- are now supported
-- if PI.Params.Length > 1 or (PI.Params.Length = 1 and
-- (for all Param of PI.Params => Param.Direction /= param_in))
-- then
-- raise Semantic_Error with
-- "In SDL function " & To_String (Each.Name) & ": all PIs "
-- & "shall be sporadic and/or have a single IN parameter "
-- & "(fix " & To_String (PI.Name) & ")";
-- end if;
end loop;
end if;
end loop;
......
......@@ -42,35 +42,31 @@ system @_CAPITALIZE:Name_@;
@_Required_Interfaces'Indent_@
@@IF@@ @_EXIST:List_Of_ASync_PIs_@ or @_EXIST:List_Of_ASync_RIs_@
channel c
@@IF@@ @_EXIST:List_Of_ASync_PIs_@
@@IF@@ @_EXIST:List_Of_Sync_PIs_@
@@-- dont use @_List_Of_PIs_@ because it includes timers
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@, @_List_Of_Sync_PIs_@;
@@ELSE@@
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@;
@@END_IF@@
@@END_IF@@
@@IF@@ @_EXIST:List_Of_ASync_RIs_@
from @_CAPITALIZE:Name_@ to env with @_List_Of_ASync_RIs_@;
@@END_IF@@
endchannel;
@@END_IF@@
block @_CAPITALIZE:Name_@;
@@IF@@ @_EXIST:List_Of_ASync_PIs_@ or @_EXIST:List_Of_ASync_RIs_@
signalroute r
@@IF@@ @_EXIST:List_Of_ASync_PIs_@
@@IF@@ @_EXIST:List_Of_Sync_PIs_@
@@-- dont use @_List_Of_PIs_@ because it includes timers
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@, @_List_Of_Sync_PIs_@;
@@ELSE@@
from env to @_CAPITALIZE:Name_@ with @_List_Of_ASync_PIs_@;
@@END_IF@@
@@END_IF@@
@@IF@@ @_EXIST:List_Of_ASync_RIs_@
from @_CAPITALIZE:Name_@ to env with @_List_Of_ASync_RIs_@;
@@END_IF@@
connect c and r;
@@END_IF@@
@@IF@@ not @_Is_Type_@
@@IF@@ @_Instance_Of_@ = ""
......
......@@ -16,7 +16,7 @@
@@-- @_IF_Property_Names_@, _Values_@ : User-defined properties (vector tag)
@@IF@@ not @_Is_Timer_@
@@-- Declare a signal for all PIs, including (un)protected interfaces
@@IF@@ @_Direction_@ = PI or @_Kind_@ = SPORADIC_OPERATION
@@IF@@ @_Kind_@ = SPORADIC_OPERATION or @_Kind_@ = CYCLIC_OPERATION
@@IF@@ @_Param_Names'Length_@ > 0
/* CIF Keep Specific Geode PARAMNAMES @_Param_Names_@ */
signal @_Name_@ (@_REPLACE_ALL((-)/_):Param_Types_@);
......@@ -24,10 +24,17 @@ signal @_Name_@ (@_REPLACE_ALL((-)/_):Param_Types_@);
signal @_Name_@;
@@END_IF@@
@@ELSE@@
@@IF@@ @_Direction_@ = RI
procedure @_Name_@;
@@ELSE@@
-- Synchronous PI @_Name_@
-- You must create a procedure with this name
-- and copy the signature (the FPAR section) in a text box
exported procedure @_Name_@;
@@END_IF@@
@@IF@@ @_EXIST:Param_Names_@
fpar
@@INLINE( )(,\n )(;\n external;)@@
@@INLINE( )(,\n )(;\n)@@
@@TABLE@@
@@IF@@ @_Param_Directions_@ = "PARAM_IN"
in @_CAPITALIZE:Param_Names_@ @_REPLACE_ALL((-)/_):Param_Types_@
......@@ -36,8 +43,11 @@ procedure @_Name_@;
@@END_IF@@
@@END_TABLE@@
@@END_INLINE@@
@@ELSE@@
external;
@@END_IF@@
@@IF@@ @_Direction_@ = RI
external;
@@ELSE@@
referenced;
@@END_IF@@
@@END_IF@@
@@END_IF@@
DataView DEFINITIONS AUTOMATIC TAGS ::= BEGIN
T-INTEGER ::= INTEGER (0..255)
SomeType ::= IA5String (SIZE (0..100))
--T-BOOL ::= BOOLEAN
--
--T-ENUM ::= ENUMERATED { one(1), two(2), three(3) }
......
--------------------------------------------------------
--! File generated by asn2aadl v2.2-r416b8c8: DO NOT EDIT !
--! File generated by asn2aadl v2.2-r90f76d6: DO NOT EDIT !
--------------------------------------------------------
--! MadeInFastMode:True:
--! InputASN1FileChecksum:c4cca3f50df525b08cac54f4b04c5297:/home/taste/tool-src/kazoo/test/Demo_ContextParams/DataView.asn:
--! InputASN1FileChecksum:ee8a7e01f29874c0d50f437d5abb9599:/home/taste/tool-src/kazoo/test/common/taste-types.asn:
--! InputASN1FileChecksum:ff35cd78b1e82f09b63b209ab7cf7c34:/home/taste/tool-inst/share/taste-types/taste-types.asn:
--! InputASN1FileChecksum:c4cca3f50df525b08cac54f4b04c5297:DataView.asn:
--------------------------------------------------------
package DataView
......@@ -44,7 +44,7 @@ end Stream_Element_Buffer;
DATA T_Boolean
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/common/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);
......@@ -83,7 +83,7 @@ END T_Boolean_Buffer.impl;
DATA T_INTEGER
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_ContextParams/DataView.asn");
Source_Text => ("DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
......@@ -122,7 +122,7 @@ END T_INTEGER_Buffer.impl;
DATA T_Int32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/common/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);
......@@ -161,7 +161,7 @@ END T_Int32_Buffer.impl;
DATA T_Int8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/common/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);
......@@ -197,10 +197,49 @@ PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int8_Buffer.impl;
DATA T_Null_Record
PROPERTIES
-- name of the ASN.1 source file:
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);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Null-Record";
TASTE::Position_In_File => [ line => 16 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END T_Null_Record;
DATA IMPLEMENTATION T_Null_Record.impl
END T_Null_Record.impl;
DATA T_Null_Record_Buffer_Max
END T_Null_Record_Buffer_Max;
DATA IMPLEMENTATION T_Null_Record_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Null_Record
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Null_Record_Buffer_Max.impl;
DATA T_Null_Record_Buffer
END T_Null_Record_Buffer;
DATA IMPLEMENTATION T_Null_Record_Buffer.impl
-- Buffer to hold a marshalled data of type T_Null_Record
SUBCOMPONENTS
Buffer : data T_Null_Record_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Null_Record_Buffer.impl;
DATA T_SEQUENCE
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_ContextParams/DataView.asn");
Source_Text => ("DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
......@@ -239,7 +278,7 @@ END T_SEQUENCE_Buffer.impl;
DATA T_UInt32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/common/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);
......@@ -278,7 +317,7 @@ END T_UInt32_Buffer.impl;
DATA T_UInt8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/common/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);
......@@ -323,6 +362,7 @@ SUBCOMPONENTS
T_INTEGER : DATA T_INTEGER.impl;
T_Int32 : DATA T_Int32.impl;
T_Int8 : DATA T_Int8.impl;
T_Null_Record : DATA T_Null_Record.impl;
T_SEQUENCE : DATA T_SEQUENCE.impl;
T_UInt32 : DATA T_UInt32.impl;
T_UInt8 : DATA T_UInt8.impl;
......
--------------------------------------------------------
--! File generated by asn2aadl v2.2-r90f76d6: DO NOT EDIT !
--------------------------------------------------------
--! MadeInFastMode:True:
--! InputASN1FileChecksum:ff35cd78b1e82f09b63b209ab7cf7c34:/home/taste/tool-inst/share/taste-types/taste-types.asn:
--! InputASN1FileChecksum:ec6f2b740d43c7f83631422998be646c:DataView.acn:
--! InputASN1FileChecksum:46090a0d1a549db9f948c16879abe2b1:DataView.asn:
--------------------------------------------------------
package DataView
public
with Data_Model;
with Taste;
with Base_Types;
with Deployment;
DATA Simulink_Tunable_Parameter
PROPERTIES
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";
Type_Source_Name => "Timer";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Timer;
DATA Taste_directive
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Taste-directive";
Deployment::ASN1_Module_Name => "TASTE-Directives";
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 MyInteger
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_SYNC_SDL_DATAVIEW);
TASTE::Ada_Package_Name => "SYNC_SDL_DATAVIEW";
Deployment::ASN1_Module_Name => "SYNC-SDL-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "MyInteger";
TASTE::Position_In_File => [ line => 4 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END MyInteger;
DATA IMPLEMENTATION MyInteger.impl
END MyInteger.impl;
DATA MyInteger_Buffer_Max
END MyInteger_Buffer_Max;
DATA IMPLEMENTATION MyInteger_Buffer_Max.impl
-- Buffer to hold a marshalled data of type MyInteger
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END MyInteger_Buffer_Max.impl;
DATA MyInteger_Buffer
END MyInteger_Buffer;
DATA IMPLEMENTATION MyInteger_Buffer.impl
-- Buffer to hold a marshalled data of type MyInteger
SUBCOMPONENTS
Buffer : data MyInteger_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END MyInteger_Buffer.impl;
DATA T_Boolean
PROPERTIES
-- name of the ASN.1 source file:
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);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Boolean";
TASTE::Position_In_File => [ line => 14 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aBOOLEAN;
END T_Boolean;
DATA IMPLEMENTATION T_Boolean.impl
END T_Boolean.impl;
DATA T_Boolean_Buffer_Max
END T_Boolean_Buffer_Max;
DATA IMPLEMENTATION T_Boolean_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Boolean
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Boolean_Buffer_Max.impl;
DATA T_Boolean_Buffer
END T_Boolean_Buffer;
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_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Boolean_Buffer.impl;
DATA T_Int32
PROPERTIES
-- name of the ASN.1 source file:
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);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int32";
TASTE::Position_In_File => [ line => 6 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_Int32;
DATA IMPLEMENTATION T_Int32.impl
END T_Int32.impl;
DATA T_Int32_Buffer_Max
END T_Int32_Buffer_Max;
DATA IMPLEMENTATION T_Int32_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Int32
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int32_Buffer_Max.impl;
DATA T_Int32_Buffer
END T_Int32_Buffer;
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_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int32_Buffer.impl;
DATA T_Int8
PROPERTIES
-- name of the ASN.1 source file:
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);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int8";
TASTE::Position_In_File => [ line => 10 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_Int8;
DATA IMPLEMENTATION T_Int8.impl
END T_Int8.impl;
DATA T_Int8_Buffer_Max
END T_Int8_Buffer_Max;
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::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int8_Buffer_Max.impl;
DATA T_Int8_Buffer
END T_Int8_Buffer;
DATA IMPLEMENTATION T_Int8_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int8
SUBCOMPONENTS
Buffer : data T_Int8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int8_Buffer.impl;
DATA T_Null_Record
PROPERTIES
-- name of the ASN.1 source file:
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);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Null-Record";
TASTE::Position_In_File => [ line => 16 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END T_Null_Record;
DATA IMPLEMENTATION T_Null_Record.impl
END T_Null_Record.impl;
DATA T_Null_Record_Buffer_Max
END T_Null_Record_Buffer_Max;
DATA IMPLEMENTATION T_Null_Record_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Null_Record
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Null_Record_Buffer_Max.impl;
DATA T_Null_Record_Buffer
END T_Null_Record_Buffer;
DATA IMPLEMENTATION T_Null_Record_Buffer.impl
-- Buffer to hold a marshalled data of type T_Null_Record
SUBCOMPONENTS
Buffer : data T_Null_Record_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Null_Record_Buffer.impl;
DATA T_UInt32
PROPERTIES
-- name of the ASN.1 source file:
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);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt32";
TASTE::Position_In_File => [ line => 8 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt32;
DATA IMPLEMENTATION T_UInt32.impl
END T_UInt32.impl;
DATA T_UInt32_Buffer_Max
END T_UInt32_Buffer_Max;
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::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt32_Buffer_Max.impl;
DATA T_UInt32_Buffer
END T_UInt32_Buffer;
DATA IMPLEMENTATION T_UInt32_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt32
SUBCOMPONENTS
Buffer : data T_UInt32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt32_Buffer.impl;
DATA T_UInt8
PROPERTIES
-- name of the ASN.1 source file:
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);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt8";
TASTE::Position_In_File => [ line => 12 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt8;
DATA IMPLEMENTATION T_UInt8.impl
END T_UInt8.impl;
DATA T_UInt8_Buffer_Max
END T_UInt8_Buffer_Max;
DATA IMPLEMENTATION T_UInt8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt8
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt8_Buffer_Max.impl;
DATA T_UInt8_Buffer
END T_UInt8_Buffer;
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_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt8_Buffer.impl;
SYSTEM Taste_DataView
END Taste_DataView;
SYSTEM IMPLEMENTATION Taste_DataView.others
SUBCOMPONENTS
MyInteger : DATA MyInteger.impl;
T_Boolean : DATA T_Boolean.impl;
T_Int32 : DATA T_Int32.impl;
T_Int8 : DATA T_Int8.impl;
T_Null_Record : DATA T_Null_Record.impl;
T_UInt32 : DATA T_UInt32.impl;
T_UInt8 : DATA T_UInt8.impl;
END Taste_DataView.others;
DATA ACN_SYNC_SDL_DATAVIEW
PROPERTIES
Source_Text => ("DataView.acn");
Source_Language => (ACN);
END ACN_SYNC_SDL_DATAVIEW;
end DataView;
SYNC-SDL-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 TASTE wiki for documentation:
-- https://taste.tuxfamily.org/wiki/index.php?title=Main_Page
-- Example of custom encoding:
-- My-Integer [encoding pos-int, endianness big, size 16]
END
SYNC-SDL-DATAVIEW DEFINITIONS ::=
BEGIN
MyInteger ::= INTEGER (0 .. 10000)
-- 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)
-- For integers do not assume that small ranges will be translated to small
-- types in C or Ada (expect unsigned or signed 64 bits types with subtypes
-- for the range in Ada)
-- Simple types:
-- TASTE-Boolean ::= BOOLEAN
-- 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.2
-- TASTE type deploymentview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
WITH deploymentview::DV;
WITH Memory_Properties;
WITH ARINC653;
PROCESS demo
END demo;
PROCESS IMPLEMENTATION demo.others
END demo.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
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_Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::FunctionName => "Function2";
};
demo : PROCESS deploymentview::DV::Node1::demo.others {
Taste::coordinates => "99233 56345 127136 72325";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "95745 51779 130624 74608";
};
PROPERTIES
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_Function1;
Taste::APLC_Binding => (reference (demo)) APPLIES TO IV_Function2;
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 => "91385 45256 134984 77869";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.4";
Taste::interfaceView => "InterfaceView.aadl";
Taste::HWLibraries => ("/home/taste/tool-inst/share/ocarina/AADLv2/ocarina_components.aadl");
END deploymentview::DV;
---------------------------------------------------
-- AADL2.2
-- TASTE type interfaceview
--
-- generated code: do not edit
---------------------------------------------------
PACKAGE interfaceview::IV::Function1
PUBLIC
WITH interfaceview::IV::Function2;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_pulse
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_pulse;
SUBPROGRAM IMPLEMENTATION PI_pulse.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_pulse.others;
SUBPROGRAM RI_getData
FEATURES
p1 : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END RI_getData;
SUBPROGRAM IMPLEMENTATION RI_getData.others
END RI_getData.others;
SUBPROGRAM RI_setData
FEATURES
p1 : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
p2 : IN PARAMETER DataView::T_Boolean {
Taste::encoding => NATIVE;
};
END RI_setData;
SUBPROGRAM IMPLEMENTATION RI_setData.others
END RI_setData.others;
SYSTEM Function1
FEATURES
PI_pulse : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1::PI_pulse.others {
Taste::coordinates => "89902 47699";
Taste::RCMoperationKind => cyclic;
Taste::RCMperiod => 1000 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "pulse";
};
RI_getData : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_getData.others {
Taste::coordinates => "111963 48571";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "getData";
Taste::labelInheritance => "true";
};
RI_setData : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_setData.others {
Taste::coordinates => "111963 51187";
Taste::RCMoperationKind => any;
Taste::InterfaceName => "setData";
Taste::labelInheritance => "true";
};
PROPERTIES
Source_Language => (SDL);
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_getData
FEATURES
p1 : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END PI_getData;
SUBPROGRAM IMPLEMENTATION PI_getData.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_getData.others;
SUBPROGRAM PI_setData
FEATURES
p1 : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
p2 : IN PARAMETER DataView::T_Boolean {
Taste::encoding => NATIVE;
};
END PI_setData;
SUBPROGRAM IMPLEMENTATION PI_setData.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_setData.others;
SYSTEM Function2
FEATURES
PI_getData : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_getData.others {
Taste::coordinates => "131147 48134";
Taste::RCMoperationKind => protected;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "getData";
};
PI_setData : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function2::PI_setData.others {
Taste::coordinates => "131147 50750";
Taste::RCMoperationKind => protected;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "setData";
};
PROPERTIES
Source_Language => (SDL);
Taste::Active_Interfaces => any;
END Function2;
SYSTEM IMPLEMENTATION Function2.others
END Function2.others;
END interfaceview::IV::Function2;
PACKAGE interfaceview::IV
PUBLIC
WITH interfaceview::IV::Function1;
WITH interfaceview::IV::Function2;
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 => "89902 45955 111963 60081";
};
Function2 : SYSTEM interfaceview::IV::Function2::Function2.others {
Taste::coordinates => "131147 45518 151378 59557";
};
CONNECTIONS
Function1_RI_getData_Function2_PI_getData : SUBPROGRAM ACCESS Function2.PI_getData -> Function1.RI_getData {
Taste::coordinates => "111963 48571 122035 48571 122035 48134 131147 48134";
};
Function1_RI_setData_Function2_PI_setData : SUBPROGRAM ACCESS Function2.PI_setData -> Function1.RI_setData {
Taste::coordinates => "111963 51187 122035 51187 122035 50750 131147 50750";
};
END interfaceview.others;
PROPERTIES
Taste::dataView => ("DataView");
Taste::dataViewPath => ("DataView.aadl");
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.4";
END interfaceview::IV;
KAZOO?=kazoo
# Here you can specify custom compiler/linker flags, and add folders containing
# external code you want to compile and link for a specific partition.
# Use upper case for the partition name:
# export <PARTITIONNAME>_USER_CFLAGS=...
# export <PARTITIONNAME>_USER_LDFLAGS=...
# export <PARTITIONNAME>_EXTERNAL_SOURCE_PATH=
all: c
c: work/glue_built
$(MAKE) -C work
# Simulation target (experimental)
simu: InterfaceView.aadl DeploymentView.aadl DataView.aadl ConcurrencyView_Properties.aadl
$(KAZOO) -t SIMU --glue --gw
$(MAKE) -C work
skeletons:
$(MAKE) work/skeletons_built
work/skeletons_built: InterfaceView.aadl DataView.aadl
$(KAZOO) --gw -o work
$(MAKE) -C work dataview
touch $@
work/glue_built: InterfaceView.aadl DeploymentView.aadl DataView.aadl ConcurrencyView_Properties.aadl
$(KAZOO) -p --glue --gw -o work
touch $@
clean:
rm -rf work/build
rm -f work/glue_built work/skeletons_built
find work -type d -name "wrappers" -exec rm -rf {} +
find work -type d -name "*_GUI" -exec rm -rf {} +
.PHONY: clean skeletons c simu
/* CIF PROCESS (250, 150), (150, 75) */
process Function1;
/* CIF TEXT (664, 67), (267, 167) */
-- Text area for declarations and comments
dcl i MyInteger := 42;
/* CIF ENDTEXT */
/* CIF START (320, 10), (70, 35) */
START;
/* CIF PROCEDURECALL (299, 65), (111, 35) */
call setData(i, true);
/* CIF NEXTSTATE (320, 115), (70, 35) */
NEXTSTATE Wait;
/* CIF state (451, 10), (68, 35) */
state Wait;
/* CIF input (450, 65), (70, 35) */
input pulse;
/* CIF PROCEDURECALL (443, 120), (82, 35) */
call getData(i);
/* CIF PROCEDURECALL (378, 170), (212, 35) */
call writeln('[function1] got data:', i);
/* CIF task (450, 225), (70, 35) */
task i := i + 1;
/* CIF PROCEDURECALL (425, 275), (118, 35) */
call setData (i, false);
/* CIF NEXTSTATE (450, 330), (70, 35) */
NEXTSTATE wait;
endstate;
endprocess Function1;
\ No newline at end of file
/* CIF PROCESS (250, 150), (150, 75) */
process Function2;
/* CIF TEXT (427, 352), (267, 140) */
dcl val MyInteger := 0;
/* CIF ENDTEXT */
/* CIF procedure (793, 361), (77, 35) */
procedure setData;
/* CIF TEXT (412, 134), (267, 148) */
fpar
in P1 MyInteger,
in P2 T_Boolean;
/* CIF ENDTEXT */
/* CIF START (157, 86), (70, 35) */
START;
/* CIF PROCEDURECALL (2, 141), (378, 35) */
call writeln('procedure setData called with params: ', p1, ' - ', p2);
/* CIF task (156, 196), (71, 35) */
task val := p1;
/* CIF return (174, 246), (35, 35) */
return ;
endprocedure;
/* CIF procedure (541, 214), (75, 35) */
procedure getData;
/* CIF TEXT (412, 134), (267, 148) */
fpar
in/out P1 MyInteger;
/* CIF ENDTEXT */
/* CIF START (78, 72), (70, 35) */
START;
/* CIF task (77, 127), (71, 35) */
task p1 := val;
/* CIF return (95, 177), (35, 35) */
return ;
endprocedure;
/* CIF START (320, 10), (70, 35) */
START;
/* CIF NEXTSTATE (320, 60), (70, 35) */
NEXTSTATE Wait;
/* CIF state (450, 10), (70, 35) */
state Wait;
endstate;
endprocess Function2;
\ No newline at end of file