Commit 2e59a0a4 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Support databases, demonstrate with test case

parent ac5c7eae
......@@ -81,10 +81,17 @@ build/deploymentview_final/Makefile: build/main.aadl ${DATAVIEW_AADLV2} ../Concu
@@-- ConcurrencyView_Properties is normally always present (even if empty) as
@@-- it is generated by the GUIs... Just in case it is not there, create it.
# Optionally hold thread priorities, offeset, stack size. Create if not present
# Optionally hold thread priorities, offset, stack size. Create if not present
../ConcurrencyView_Properties.aadl:
touch $@
@@-- SQL Database: can be created by taste-create-database
@@-- Add a dependency to make sure that if is is modified, the GUIs
@@-- Using it are properly updated
# Optionally manage SQL Database (run taste-create-database to enable)
sql_db/DV.py:
mkdir -p sql_db && touch $@
# Create dataview-uniq.asn by concatenating all asn1 input files
${DATAVIEW_UNIQ}: ${ASN1_FILES}
mkdir -p ${PROJECT_CACHE} && mkdir -p ${DATAVIEW_PATH}
......@@ -161,6 +168,7 @@ dataview/C/built: ${DATAVIEW_UNIQ} ${DATAVIEW_ACN} ${CP_FILES}
@_LOWER:Function_Names_@/GUI/wrappers/aadl2glueC_built
@@END_IF@@
@@END_TABLE@@
sql_db/DV.py
@@END_INLINE@@
mkdir -p $(dir $@)
asn2dataModel -o $(dir $@) -toPython ${DATAVIEW_UNIQ} @@-- Ignore context parameters for python interface
......@@ -172,7 +180,7 @@ dataview/C/built: ${DATAVIEW_UNIQ} ${DATAVIEW_ACN} ${CP_FILES}
cd @_LOWER:Function_Names_@/GUI/wrappers/python && \
gcc -g -fPIC -c `python-config --cflags` gui_api.c ../../src/queue_manager.c timeInMS.c debug_messages.c -I. -I../../src && \
gcc -g -shared -o PythonAccess.so gui_api.o queue_manager.o timeInMS.o debug_messages.o `python-config --ldflags` -lrt
mkdir -p binaries/@_LOWER:Function_Names_@_GUI
mkdir -p binaries/@_LOWER:Function_Names_@_GUI
cp -f @_LOWER:Function_Names_@/GUI/wrappers/python/* binaries/@_LOWER:Function_Names_@_GUI
cp -f @_LOWER:Function_Names_@/GUI/wrappers/*.py binaries/@_LOWER:Function_Names_@_GUI
cp -f @_LOWER:Function_Names_@/GUI/wrappers/*.ui binaries/@_LOWER:Function_Names_@_GUI
......@@ -182,9 +190,10 @@ dataview/C/built: ${DATAVIEW_UNIQ} ${DATAVIEW_ACN} ${CP_FILES}
cp $(shell taste-config --prefix)/bin/taste-gnuplot-streams binaries/@_LOWER:Function_Names_@_GUI/driveGnuPlotsStreams.pl
cp $(shell taste-config --prefix)/share/peekpoke/peekpoke.py binaries/@_LOWER:Function_Names_@_GUI
cp $(shell taste-config --prefix)/share/peekpoke/PeekPoke.glade binaries/@_LOWER:Function_Names_@_GUI
@@END_IF@@
@@-- End of PeekPoke-specifics
@@END_IF@@
@@END_IF@@ @@-- End of PeekPoke-specifics
@@-- Add symbolic link to the SQL Database interface for the GUIs, if needed
if [ -f sql_db/db.info ]; then cd binaries/@_LOWER:Function_Names_@_GUI && ln -fs ../../sql_db; fi
@@END_IF@@ @@-- End of GUI-specifics
@@END_TABLE@@
touch $@
@@ELSE@@
......
--------------------------------------------------------
--! File generated by asn2aadl v2.2-r327f5c8: DO NOT EDIT !
--------------------------------------------------------
--! MadeInFastMode:True:
--! InputASN1FileChecksum:97e8530de98c4334dded0bf80c572148:/home/taste/tool-src/kazoo/test/Demo_Database/DataView.asn:
--! InputASN1FileChecksum:ee8a7e01f29874c0d50f437d5abb9599:/home/taste/tool-inst/share/taste-types/taste-types.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 Action_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_Database/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "Action-T";
TASTE::Position_In_File => [ line => 5 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aCHOICE;
END Action_T;
DATA IMPLEMENTATION Action_T.impl
END Action_T.impl;
DATA Action_T_Buffer_Max
END Action_T_Buffer_Max;
DATA IMPLEMENTATION Action_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Action_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Action_T_Buffer_Max.impl;
DATA Action_T_Buffer
END Action_T_Buffer;
DATA IMPLEMENTATION Action_T_Buffer.impl
-- Buffer to hold a marshalled data of type Action_T
SUBCOMPONENTS
Buffer : data Action_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END Action_T_Buffer.impl;
DATA Destination_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_Database/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "Destination-T";
TASTE::Position_In_File => [ line => 13 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aENUMERATED;
END Destination_T;
DATA IMPLEMENTATION Destination_T.impl
END Destination_T.impl;
DATA Destination_T_Buffer_Max
END Destination_T_Buffer_Max;
DATA IMPLEMENTATION Destination_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Destination_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Destination_T_Buffer_Max.impl;
DATA Destination_T_Buffer
END Destination_T_Buffer;
DATA IMPLEMENTATION Destination_T_Buffer.impl
-- Buffer to hold a marshalled data of type Destination_T
SUBCOMPONENTS
Buffer : data Destination_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END Destination_T_Buffer.impl;
DATA Display_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_Database/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "Display-T";
TASTE::Position_In_File => [ line => 3 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSTRING;
END Display_T;
DATA IMPLEMENTATION Display_T.impl
END Display_T.impl;
DATA Display_T_Buffer_Max
END Display_T_Buffer_Max;
DATA IMPLEMENTATION Display_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Display_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Display_T_Buffer_Max.impl;
DATA Display_T_Buffer
END Display_T_Buffer;
DATA IMPLEMENTATION Display_T_Buffer.impl
-- Buffer to hold a marshalled data of type Display_T
SUBCOMPONENTS
Buffer : data Display_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END Display_T_Buffer.impl;
DATA HK_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_Database/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "HK-T";
TASTE::Position_In_File => [ line => 23 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END HK_T;
DATA IMPLEMENTATION HK_T.impl
END HK_T.impl;
DATA HK_T_Buffer_Max
END HK_T_Buffer_Max;
DATA IMPLEMENTATION HK_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type HK_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END HK_T_Buffer_Max.impl;
DATA HK_T_Buffer
END HK_T_Buffer;
DATA IMPLEMENTATION HK_T_Buffer.impl
-- Buffer to hold a marshalled data of type HK_T
SUBCOMPONENTS
Buffer : data HK_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END HK_T_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_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;
DATA TC_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_Database/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "TC-T";
TASTE::Position_In_File => [ line => 15 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END TC_T;
DATA IMPLEMENTATION TC_T.impl
END TC_T.impl;
DATA TC_T_Buffer_Max
END TC_T_Buffer_Max;
DATA IMPLEMENTATION TC_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TC_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END TC_T_Buffer_Max.impl;
DATA TC_T_Buffer
END TC_T_Buffer;
DATA IMPLEMENTATION TC_T_Buffer.impl
-- Buffer to hold a marshalled data of type TC_T
SUBCOMPONENTS
Buffer : data TC_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TC_T_Buffer.impl;
DATA TM_T
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/Demo_Database/DataView.asn");
TASTE::Ada_Package_Name => "DataView";
Deployment::ASN1_Module_Name => "DataView";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "TM-T";
TASTE::Position_In_File => [ line => 3 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSTRING;
END TM_T;
DATA IMPLEMENTATION TM_T.impl
END TM_T.impl;
DATA TM_T_Buffer_Max
END TM_T_Buffer_Max;
DATA IMPLEMENTATION TM_T_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TM_T
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END TM_T_Buffer_Max.impl;
DATA TM_T_Buffer
END TM_T_Buffer;
DATA IMPLEMENTATION TM_T_Buffer.impl
-- Buffer to hold a marshalled data of type TM_T
SUBCOMPONENTS
Buffer : data TM_T_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TM_T_Buffer.impl;
SYSTEM Taste_DataView
END Taste_DataView;
SYSTEM IMPLEMENTATION Taste_DataView.others
SUBCOMPONENTS
Action_T : DATA Action_T.impl;
Destination_T : DATA Destination_T.impl;
Display_T : DATA Display_T.impl;
HK_T : DATA HK_T.impl;
T_Boolean : DATA T_Boolean.impl;
T_Int32 : DATA T_Int32.impl;
T_Int8 : DATA T_Int8.impl;
T_UInt32 : DATA T_UInt32.impl;
T_UInt8 : DATA T_UInt8.impl;
TC_T : DATA TC_T.impl;
TM_T : DATA TM_T.impl;
END Taste_DataView.others;
end DataView;
DataView DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Display-T ::= OCTET STRING (SIZE (1..255))
Action-T ::= CHOICE
{
--display INTEGER (0..255),
display Display-T,
other-action INTEGER (0..1),
housekeeping Destination-T
}
Destination-T ::= ENUMERATED { displayer(0), other-dest(1) }
TC-T ::= SEQUENCE
{
destination Destination-T,
action Action-T DEFAULT display:'48656C6C6F'H
}
TM-T ::= Display-T
HK-T ::= SEQUENCE {
value-to-plot INTEGER (0..16535) DEFAULT 42,
destination Destination-T
}
END
---------------------------------------------------
-- AADL2.0
-- TASTE
-- (c)Ellidiss Technologies
--
---------------------------------------------------
PACKAGE deploymentview::DV::Node1
PUBLIC
WITH Taste;
WITH Deployment;
WITH TASTE_DV_Properties;
PROCESS mypartition
END mypartition;
PROCESS IMPLEMENTATION mypartition.others
END mypartition.others;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
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_mygui : SYSTEM interfaceview::IV::mygui.others {
Taste::coordinates => "1036 964 1318 1257";
Taste::FunctionName => "mygui";
};
IV_router : SYSTEM interfaceview::IV::router.others {
Taste::coordinates => "1462 985 1842 1257";