Properties and Data Types

Two AADL elements – properties and data are used throughout the app.

Properties

The MDCF Architect uses a number of properties to configure the real-time (RT) and Quality of Service (QoS) and a small number of other settings. Most of these properties can be set either as app-wide defaults using the default name and all can be specified on a per-element basis using the override name (which will override the default value, if present).

Thread Properties

period
The task’s period. Ignored for sporadic tasks.
Default Name:Default_Thread_Period
Override Name:Timing_Properties::Period
Type:Time
Applies To:thread
Example:50 ms
deadline
The amount of time that can lapse between the task’s dispatch and completion.
Default name:Default_Thread_Deadline
Override Name:Timing_Properties::Deadline
Type:Time
Applies To:thread
Example:50 ms
wcet
A task’s worst case execution time is the most time it will take to complete after dispatch.
Default name:Default_Thread_WCET
Override Name:MAP_Properties::Worst_Case_Execution_Time
Type:Time
Applies To:thread
Example:5 ms
dispatch
Either sporadic or periodic. Periodic tasks are dispatched once per period, while sporadic tasks are dispatched when a message arrives on their associated port.
Default name:Default_Thread_Dispatch
Override Name:Thread_Properties::Dispatch_Protocol
Type:sporadic or periodic
Applies To:thread
Example:periodic

Port Properties

output-rate
The most and least frequently that this port will broadcast a message. Note that this is ignored on thread ports and incoming process implementation ports.
Default name:Default_Output_Rate
Override Name:MAP_Properties::Output_Rate
Type:Time range
Applies To:port
Example:100 ms .. 300 ms
exchange-name
The name of the exchange that this port is a part of. Note that this is ignored on all non-device ports. This property is essentially a tag created by the code generator that produces the device interface to the binding algorithm that operates on the generated Java code. It is not intended to be user-modifiable.
Default name:N/A
Override Name:MAP_Properties::Exchange_Name
Type:AADLString
Applies To:port
Example:"spo2_per"

Port Connection Properties

channel-delay
The maximum time that a message on this connection can spend on the network. Note that this is ignored on port connections which are attached to process implementations.
Default name:Default_Channel_Delay
Override Name:MAP_Properties::Channel_Delay
Type:Time
Applies To:port connection
Example:100 ms

Process Properties

process-type
Whether this process is a logic or display component.
Default name:N/A
Override Name:MAP_Properties::Process_Type
Type:Either logic or display
Applies To:process
Example:display

Device Properties

component-type
The role this component plays in the system, one of sensor, controller, actuator, or controlled process.
Default name:N/A
Override Name:MAP_Properties::Component_Type
Type:one of sensor, controller, actuator, or controlled process
Applies To:Any subcomponent of a system: ie, a device, process, or abstract
Example:controller

Data Properties

Data Subcomponent Properties

process-variable

This variable is used to mark data subcomponents as “process variables,” ie part of a component’s “process model” (see SAFE or System Theoretic Process Analysis (STPA) documentation for a full explanation of this concept). It’s optional, and assumed to be false if not present.

Default name:N / A
Override Name:MAP_Error_Properties::Process_Variable
Type:AADLBoolean
Applies To:data subcomponent
Example:true

Data Declaration Properties

data-representation
The representation of this datatype.
Default name:N/A
Override Name:Data_Model::Data_Representation
Type:Boolean, Integer, or Float
Applies To:data
Example:Integer

Note

Declaring a data representation of Float will translate to a Double, as they are “generally the default choice” for decimal values (source)

measurement-unit

This is an optional property that lets you specify the unit for a data type.

Default name:N/A
Override Name:Data_Model::Measurement_Unit
Type:AADLString
Applies To:data
Example:"Percent"
real-range

This is an optional property that lets you specify the range for a data type that has a data-representation of Float.

Default name:N/A
Override Name:Data_Model::Real_Range
Type:Range of AADLReal
Applies To:data
Example:0.0 .. 100.0
integer-range

This is an optional property that lets you specify the range for a data type that has a data-representation of Integer.

Default name:N/A
Override Name:Data_Model::Integer_Range
Type:Range of AADLInteger
Applies To:data
Example:0 .. 100

Example Property Set

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
property set PulseOx_Forwarding_Properties is

	Default_Thread_Time : constant Time => 50 ms;
	
	Default_Output_Rate : Time_Range => 100 ms .. 300 ms applies to (port);
	Default_Thread_Dispatch : Supported_Dispatch_Protocols => Sporadic applies to (thread);
	Default_Thread_Period : Time => PulseOx_Forwarding_Properties::Default_Thread_Time applies to (thread);
	Default_Thread_Deadline : Time => PulseOx_Forwarding_Properties::Default_Thread_Time applies to (thread);
	Default_Thread_WCET : Time => 5 ms applies to (thread);
	Default_Channel_Delay : Time => 100 ms applies to ({PCA_Shutoff} ** port connection);

end PulseOx_Forwarding_Properties;

Data Types

The MDCF Architect enables developers to name data types and set their data representation.

data
Properties:

Example Data Type

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
package PulseOx_Forwarding_Types
public
with Data_Model;

	data SpO2
	properties
		Data_Model::Data_Representation => Float;
		Data_Model::Real_Range => 0.0 .. 100.0;
		Data_Model::Measurement_Unit => "Percent";
	end SpO2;
	
end PulseOx_Forwarding_Types;