Commit ab979250 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add STM32 test case for traffic light

parent 959eb450
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";
Stack_Size => 5 kbyte APPLIES TO Stm32_Controller.controller_Button;
Stack_Size => 5 kbyte APPLIES TO Stm32_Controller.controller_Initialize;
Stack_Size => 5 kbyte APPLIES TO Stm32_Controller.controller_clock;
Stack_Size => 5 kbyte APPLIES TO Stm32_Controller.stm32_controller_timer_manager_Tick;
Stack_Size => 5kbyte APPLIES TO X86_User.user_Color;
Stack_Size => 5kbyte APPLIES TO X86_User.user_Info_User;
Stack_Size => 5kbyte APPLIES TO X86_User.user_Poll;
END DeploymentView.final;
END Process_Package_proxy;
--------------------------------------------------------
--! File generated by asn2aadl v2.2-r327f5c8: DO NOT EDIT !
--------------------------------------------------------
--! MadeInFastMode:True:
--! InputASN1FileChecksum:ab9d290c8d36e7745075bc55a61d8ddc:/home/taste/tool-src/kazoo/test/TrafficLight_stm32f407/DataView.asn:
--! InputASN1FileChecksum:ee46426c862c2136923e35b32818b60c:/home/taste/tool-src/kazoo/test/TrafficLight_stm32f407/dataview-stm32.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 Command
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/TrafficLight_stm32f407/DataView.asn");
TASTE::Ada_Package_Name => "TRAFFICLIGHT_BASIC_DATAVIEW";
Deployment::ASN1_Module_Name => "TRAFFICLIGHT-BASIC-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "Command";
TASTE::Position_In_File => [ line => 9 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aENUMERATED;
END Command;
DATA IMPLEMENTATION Command.impl
END Command.impl;
DATA Command_Buffer_Max
END Command_Buffer_Max;
DATA IMPLEMENTATION Command_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Command
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Command_Buffer_Max.impl;
DATA Command_Buffer
END Command_Buffer;
DATA IMPLEMENTATION Command_Buffer.impl
-- Buffer to hold a marshalled data of type Command
SUBCOMPONENTS
Buffer : data Command_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END Command_Buffer.impl;
DATA Debug_PrintableString
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/TrafficLight_stm32f407/dataview-stm32.asn");
TASTE::Ada_Package_Name => "STM32_Dataview";
Deployment::ASN1_Module_Name => "STM32-Dataview";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "Debug-PrintableString";
TASTE::Position_In_File => [ line => 4 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSTRING;
END Debug_PrintableString;
DATA IMPLEMENTATION Debug_PrintableString.impl
END Debug_PrintableString.impl;
DATA Debug_PrintableString_Buffer_Max
END Debug_PrintableString_Buffer_Max;
DATA IMPLEMENTATION Debug_PrintableString_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Debug_PrintableString
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Debug_PrintableString_Buffer_Max.impl;
DATA Debug_PrintableString_Buffer
END Debug_PrintableString_Buffer;
DATA IMPLEMENTATION Debug_PrintableString_Buffer.impl
-- Buffer to hold a marshalled data of type Debug_PrintableString
SUBCOMPONENTS
Buffer : data Debug_PrintableString_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END Debug_PrintableString_Buffer.impl;
DATA P_Light
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/TrafficLight_stm32f407/DataView.asn");
TASTE::Ada_Package_Name => "TRAFFICLIGHT_BASIC_DATAVIEW";
Deployment::ASN1_Module_Name => "TRAFFICLIGHT-BASIC-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "P-Light";
TASTE::Position_In_File => [ line => 7 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aENUMERATED;
END P_Light;
DATA IMPLEMENTATION P_Light.impl
END P_Light.impl;
DATA P_Light_Buffer_Max
END P_Light_Buffer_Max;
DATA IMPLEMENTATION P_Light_Buffer_Max.impl
-- Buffer to hold a marshalled data of type P_Light
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END P_Light_Buffer_Max.impl;
DATA P_Light_Buffer
END P_Light_Buffer;
DATA IMPLEMENTATION P_Light_Buffer.impl
-- Buffer to hold a marshalled data of type P_Light
SUBCOMPONENTS
Buffer : data P_Light_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END P_Light_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 TL_Color
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-src/kazoo/test/TrafficLight_stm32f407/DataView.asn");
TASTE::Ada_Package_Name => "TRAFFICLIGHT_BASIC_DATAVIEW";
Deployment::ASN1_Module_Name => "TRAFFICLIGHT-BASIC-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "TL-Color";
TASTE::Position_In_File => [ line => 5 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aENUMERATED;
END TL_Color;
DATA IMPLEMENTATION TL_Color.impl
END TL_Color.impl;
DATA TL_Color_Buffer_Max
END TL_Color_Buffer_Max;
DATA IMPLEMENTATION TL_Color_Buffer_Max.impl
-- Buffer to hold a marshalled data of type TL_Color
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END TL_Color_Buffer_Max.impl;
DATA TL_Color_Buffer
END TL_Color_Buffer;
DATA IMPLEMENTATION TL_Color_Buffer.impl
-- Buffer to hold a marshalled data of type TL_Color
SUBCOMPONENTS
Buffer : data TL_Color_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END TL_Color_Buffer.impl;
SYSTEM Taste_DataView
END Taste_DataView;
SYSTEM IMPLEMENTATION Taste_DataView.others
SUBCOMPONENTS
Command : DATA Command.impl;
Debug_PrintableString : DATA Debug_PrintableString.impl;
P_Light : DATA P_Light.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;
TL_Color : DATA TL_Color.impl;
END Taste_DataView.others;
end DataView;
TRAFFICLIGHT-BASIC-DATAVIEW DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
TL-Color ::= ENUMERATED { red, orange, green}
P-Light ::= ENUMERATED { go, wait }
Command ::= ENUMERATED { request-passage }
END
---------------------------------------------------
-- AADL2.2
-- 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;
WITH deploymentview::DV;
WITH Memory_Properties;
WITH ARINC653;
PROCESS stm32_controller
END stm32_controller;
PROCESS IMPLEMENTATION stm32_controller.others
END stm32_controller.others;
DEVICE STM32F4_serial_pohiada
EXTENDS ocarina_drivers::STM32F4_serial
FEATURES
link : REFINED TO REQUIRES BUS ACCESS ocarina_buses::serial.generic {
Taste::coordinates => "111178 98108";
};
PROPERTIES
Taste::Interface_Coordinates => "123886 116060" APPLIES TO link;
Deployment::Help => "Write your ASN.1 configuration here";
Deployment::Configuration => "{devname ""/dev/ttyUSB0"", speed b115200, bits 8}";
Deployment::Config => "/home/taste/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/drivers/configuration/serial.asn";
Deployment::Version => "0.1beta";
END STM32F4_serial_pohiada;
DEVICE IMPLEMENTATION STM32F4_serial_pohiada.others
EXTENDS ocarina_drivers::STM32F4_serial.pohiada
END STM32F4_serial_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;
WITH deploymentview::DV;
WITH Memory_Properties;
WITH ARINC653;
PROCESS x86_user
END x86_user;
PROCESS IMPLEMENTATION x86_user.others
END x86_user.others;
DEVICE generic_serial_pohiada
EXTENDS ocarina_drivers::generic_serial
FEATURES
link : REFINED TO REQUIRES BUS ACCESS ocarina_buses::serial.generic {
Taste::coordinates => "169286 98265";
};
PROPERTIES
Taste::Interface_Coordinates => "167507 116060" APPLIES TO link;
Deployment::Help => "Write your ASN.1 configuration here";
Deployment::Configuration => "{devname ""/dev/ttyUSB0"", speed b115200, bits 8}";
Deployment::Config => "/home/taste/tool-inst/include/ocarina/runtime/polyorb-hi-c/src/drivers/configuration/serial.asn";
Deployment::Version => "0.1beta";
END generic_serial_pohiada;
DEVICE IMPLEMENTATION generic_serial_pohiada.others
EXTENDS ocarina_drivers::generic_serial.pohiada
END generic_serial_pohiada.others;
END deploymentview::DV::Node2;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Controller;
WITH interfaceview::IV::stm32_debug;
WITH ocarina_processors_arm;
WITH deploymentview::DV::Node1;
WITH interfaceview::IV::User;
WITH ocarina_processors_x86;
WITH deploymentview::DV::Node2;
WITH ocarina_buses;
WITH Taste;
WITH Deployment;
WITH interfaceview::IV;
WITH TASTE_DV_Properties;
SYSTEM Node1
FEATURES
STM32F4_serial_pohiada_serial_generic : REQUIRES BUS ACCESS ocarina_buses::serial.generic;
END Node1;
SYSTEM IMPLEMENTATION Node1.others
SUBCOMPONENTS
IV_Controller : SYSTEM interfaceview::IV::Controller::Controller.others {
Taste::FunctionName => "Controller";
};
IV_stm32_debug : SYSTEM interfaceview::IV::stm32_debug::stm32_debug.others {
Taste::FunctionName => "stm32_debug";
};
stm32_controller : PROCESS deploymentview::DV::Node1::stm32_controller.others {
Taste::coordinates => "93490 69482 131385 82832";
Deployment::Port_Number => 0;
};
stm32f407_discovery_gnat2017 : PROCESSOR ocarina_processors_arm::stm32f407_discovery.gnat2017 {
Taste::coordinates => "88753 62141 136122 85510";
};
STM32F4_serial_pohiada : DEVICE deploymentview::DV::Node1::STM32F4_serial_pohiada.others {
Taste::coordinates => "100785 89289 123619 98108";
};
CONNECTIONS
STM32F4_serial_pohiada_serial_generic_link : BUS ACCESS STM32F4_serial_pohiada_serial_generic -> STM32F4_serial_pohiada.link;
PROPERTIES
Taste::APLC_Binding => (reference (stm32_controller)) APPLIES TO IV_Controller;
Taste::APLC_Binding => (reference (stm32_controller)) APPLIES TO IV_stm32_debug;
Actual_Processor_Binding => (reference (stm32f407_discovery_gnat2017)) APPLIES TO stm32_controller;
Actual_Processor_Binding => (reference (stm32f407_discovery_gnat2017)) APPLIES TO STM32F4_serial_pohiada;
END Node1.others;
SYSTEM Node2
FEATURES
generic_serial_pohiada_serial_generic : REQUIRES BUS ACCESS ocarina_buses::serial.generic;
END Node2;
SYSTEM IMPLEMENTATION Node2.others
SUBCOMPONENTS
IV_User : SYSTEM interfaceview::IV::User::User.others {
Taste::FunctionName => "User";
};
x86_user : PROCESS deploymentview::DV::Node2::x86_user.others {
Taste::coordinates => "160222 68515 191264 82990";
Deployment::Port_Number => 0;
};
x86_linux : PROCESSOR ocarina_processors_x86::x86.linux {
Taste::coordinates => "156342 61636 195144 87084";
};
generic_serial_pohiada : DEVICE deploymentview::DV::Node2::generic_serial_pohiada.others {
Taste::coordinates => "162987 88816 188341 98265";
};
CONNECTIONS
generic_serial_pohiada_serial_generic_link : BUS ACCESS generic_serial_pohiada_serial_generic -> generic_serial_pohiada.link;
PROPERTIES
Taste::APLC_Binding => (reference (x86_user)) APPLIES TO IV_User;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO x86_user;
Actual_Processor_Binding => (reference (x86_linux)) APPLIES TO generic_serial_pohiada;
END Node2.others;
SYSTEM deploymentview