6.4 Devices
A device component represents an execution platform component that interfaces with the external environment.  A device may exhibit complex behavior that requires a nontrivial interface to application software systems.  Devices may internally have a processor, memory and software that is not explicitly modeled.  If the device has associated software such as device drivers that must reside in a memory and execute on a processor external to the device, this can be specified through appropriate property values for the device.
A device interacts with both execution platform components and application software components. A device has physical connections to processors via a bus.  This models software executing on a processor accessing the physical device.  A device also has logical connections to application software components. Those logical connections are represented by connection declarations between device ports and application software component ports.  For any logical connection between a device and a thread executing application source text, there must be a physical connection in the execution platform. 
A device can be viewed to be a primary part of the application system. In this case, it is natural to place the device together with the application software components.  The physical connection to processors must follow the system hierarchy. 
A device may be viewed to be primarily part of the execution platform. In this case, it is placed in proximity of other execution platform components. The logical connections have to follow the system hierarchy to connect to application software components.
Examples of devices are sensors and actuators that interface with the external physical world, or standalone systems (such as a GPS) that interface with an application system.
Legality Rules
Category
Type
Implementation
device
Features
    • port
    • port group
    • server subprogram
    • requires bus access
Flow specifications: yes
Properties: yes
Subcomponents:
    • None
Subprogram calls: no
Connections: no
Flows: yes
Modes: yes
Properties: yes

A device type can contain port, port group, server subprogram, requires bus access declarations, flow specifications, as well as property associations.
A device component implementation must not contain a subcomponents subclause, connections subclause, or subprogram calls subclause. 
A device implementation can contain a modes subclause, a flows subclause, and property associations. 
Standard Properties
-- Hardware description properties
Hardware_Description_Source_Text: inherit list of aadlstring
Hardware_Source_Language: Supported_Hardware_Source_Languages
-- Properties specifying device driver software that must be
-- executed by a processor
Source_Text: inherit list of aadlstring
Source_Language: Supported_Source_Languages
Source_Code_Size: Size
Source_Data_Size: Size
Source_Stack_Size: Size
-- Properties specifying the thread properties for device software
-- executing on a processor
Device_Dispatch_Protocol: Supported_Dispatch_Protocols => Aperiodic
Period: inherit Time
Compute_Execution_Time: Time_Range
Deadline: Time => inherit value(Period)
-- Properties specifying constraints for processor and memory binding
Allowed_Memory_Binding_Class:
   inherit list of classifier (memory, system, processor)
Allowed_Memory_Binding: inherit list of reference (memory, system, processor)
Allowed_Processor_Binding_Class:
   inherit list of classifier (processor, system)
Allowed_Processor_Binding: inherit list of reference (processor, system)
Semantics
A device component represents an execution platform component that provides an interface with the external environment.  It can exhibit complex behaviors that require a nontrivial interface to application software systems via ports and subprogram features. This functionality may be fully embedded in the device hardware, or it may be provided by device-specific software.  This software must reside as a binary image on memory components and is executed on a processor component. The executing processor that has access to the device must be connected to the device via a bus.  The memory storing the binary image must be accessible to the processor.
A device is accessible from a processor if the device is connected via a shared bus component and the Allowed_Connection_Protocol property value for that bus includes Device_Access.
A device declaration can include flow specifications that indicate that a device is a flow source, a flow sink, or a flow path exists through a device.
Device components can have different property values under different operational modes.
Processing Requirements and Permissions
Execution of the device driver software may be considered to be part of the processor execution overhead or it may be treated as an explicitly declared thread with its own execution properties.