HAMR-oriented AADL modeling templates, to be used by cutting/pasting from this file into the AADL textual model editor. Author: John Hatcliff Last Modified: February 27, 2021 -- =========================================================================================================== -- -- M y P a c k a g e Package -- -- -- -- -- =========================================================================================================== package MyPackage public with Base_Types, -- needed when using AADL base types Data_Model, -- needed when defining new types OtherAppPackage1, OtherAppPackageN; -- using other packages in your application -- package content goes here end MyPackage; -- =========================================================================================================== -- -- M y S y s t e m System -- -- -- -- -- =========================================================================================================== system MySystem features -- ==== INPUTS ==== -- myInPort : in data port MyInType; -- myInEventPort : in event port; -- myInEventDataPort : in event data port MyInType; -- ==== OUTPUTS ==== -- myOutPort : out data port MyOutType; -- ==== FLOWS ==== -- ==== PROPERTIES ==== end MySystem; system implementation MySystem.i subcomponents -- myCompInstanceName : process MyComp.i connections -- myConnName: port MyCompSource.outPortName -> MyCompDest.inPortName; end MySystem.i; -- =========================================================================================================== -- -- M y P r o c e s s Process -- -- -- -- -- =========================================================================================================== process MyProcess features -- ==== INPUTS ==== -- myInPort : in data port MyInType; -- myInEventPort : in event port; -- myInEventDataPort : in event data port MyInType; -- ==== OUTPUTS ==== -- myOutPort : out data port MyOutType; -- ==== FLOWS ==== -- ==== PROPERTIES ==== end MyProcess; process implementation MyProcess.i subcomponents -- myCompInstanceName : thread MyComp.i connections -- myConnName: port MyCompSource.outPortName -> MyCompDest.inPortName; end MyProcess.i; -- =========================================================================================================== -- -- M y T h r e a d Thread -- -- -- -- -- =========================================================================================================== thread MyThread features -- ==== INPUTS ==== -- myInDataPort : in data port MyInType; -- myInEventPort : in event port; -- myInEventDataPort : in event data port MyInType; -- ==== OUTPUTS ==== -- myOutPort : out data port MyOutType; -- ==== FLOWS ==== -- ==== PROPERTIES ==== properties Dispatch_Protocol => Periodic; -- Dispatch_Protocol => Sporadic; Period => 1000ms; end MyThread; thread implementation MyThread.i -- typically, HAMR thread components have no information specified in their implementation, -- which indicates (a) no further architecture model (the thread is a leaf node in the architecture) -- and (b) the thread implementation will be realized at the programming language level. end MyThread.i; -- ---------------------------------------------------------------------------------- -- -- M y S t r u c t Data Type -- -- -- -- ---------------------------------------------------------------------------------- data MyStruct properties -- Indicate that the data type will be a struct (record) -- For structs, use of the type must refer to the data component implementation (e.g., MyStruct.i), -- which defines the fields and associated types of the struct. Data_Model::Data_Representation => Struct; end Message; data implementation MyStruct.i subcomponents -- define fields. -- Types of fields can be from Base Types or from other user defined types -- myfield1: data Base_Types::Integer_32; -- myfield2: data MyPackage::MyDataComponentTypeName; end MyStruct.i;