Commit 3b777f64 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add traffic light demo for bare stm32

without distributed node and without serial debug
parent 4e5bb3a6
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 => 8 kbyte APPLIES TO Stm32_Controller.controller_Button;
Stack_Size => 8 kbyte APPLIES TO Stm32_Controller.controller_Initialize;
Stack_Size => 8 kbyte APPLIES TO Stm32_Controller.controller_clock;
Stack_Size => 8 kbyte APPLIES TO Stm32_Controller.stm32_controller_timer_manager_Tick;
Stack_Size => 8 kbyte APPLIES TO Stm32_Controller.watchdog_Kick_WD;
Stack_Size => 8 kbyte APPLIES TO Stm32_Controller.watchdog_pulse;
Stack_Size => 8kbyte APPLIES TO Stm32_Controller.stm32_debug_Poll_Button;
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_NonDistrib/DataView.asn:
--! InputASN1FileChecksum:ee46426c862c2136923e35b32818b60c:/home/taste/tool-src/kazoo/test/TrafficLight_stm32f407_NonDistrib/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_NonDistrib/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_NonDistrib/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_NonDistrib/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_NonDistrib/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 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;
END deploymentview::DV::Node1;
PACKAGE deploymentview::DV
PUBLIC
WITH interfaceview::IV::Controller;
WITH interfaceview::IV::stm32_debug;
WITH interfaceview::IV::watchdog;
WITH ocarina_processors_arm;
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_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";
};
IV_watchdog : SYSTEM interfaceview::IV::watchdog::watchdog.others {
Taste::FunctionName => "watchdog";
};
stm32_controller : PROCESS deploymentview::DV::Node1::stm32_controller.others {
Taste::coordinates => "92545 69482 130440 82832";
Deployment::Port_Number => 0;
};
stm32f407_discovery_gnat2017 : PROCESSOR ocarina_processors_arm::stm32f407_discovery.gnat2017 {
Taste::coordinates => "87808 62141 135177 85510";
};
PROPERTIES
Taste::APLC_Binding => (reference (stm32_controller)) APPLIES TO IV_Controller;
Taste::APLC_Binding => (reference (stm32_controller)) APPLIES TO IV_stm32_debug;
Taste::APLC_Binding => (reference (stm32_controller)) APPLIES TO IV_watchdog;
Actual_Processor_Binding => (reference (stm32f407_discovery_gnat2017)) APPLIES TO stm32_controller;
END Node1.others;
SYSTEM deploymentview
END deploymentview;
SYSTEM IMPLEMENTATION deploymentview.others
SUBCOMPONENTS
Node1 : SYSTEM Node1.others {
Taste::coordinates => "81887 51653 141098 104092";
};
interfaceview : SYSTEM interfaceview::IV::interfaceview.others;
END deploymentview.others;
PROPERTIES
Taste::coordinates => "0 0 297000 210000";
Taste::version => "2.3";
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::Controller
PUBLIC
WITH interfaceview::IV::stm32_debug;
WITH interfaceview::IV::watchdog;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
SUBPROGRAM PI_Initialize
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Initialize;
SUBPROGRAM IMPLEMENTATION PI_Initialize.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Initialize.others;
SUBPROGRAM PI_Button
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_Button;
SUBPROGRAM IMPLEMENTATION PI_Button.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_Button.others;
SUBPROGRAM RI_Green_On
END RI_Green_On;
SUBPROGRAM IMPLEMENTATION RI_Green_On.others
END RI_Green_On.others;
SUBPROGRAM RI_Orange_On
END RI_Orange_On;
SUBPROGRAM IMPLEMENTATION RI_Orange_On.others
END RI_Orange_On.others;
SUBPROGRAM RI_Red_On
END RI_Red_On;
SUBPROGRAM IMPLEMENTATION RI_Red_On.others
END RI_Red_On.others;
SUBPROGRAM RI_Blue_On
END RI_Blue_On;
SUBPROGRAM IMPLEMENTATION RI_Blue_On.others
END RI_Blue_On.others;
SUBPROGRAM RI_Blue_Off
END RI_Blue_Off;
SUBPROGRAM IMPLEMENTATION RI_Blue_Off.others
END RI_Blue_Off.others;