
Recall first from ARA and the functional cluster concept
- ARA stands for AUTOSAR Runtime for Adaptive Applications.
- AUTOSAR Foundation provides shared specifications that platform specifications can reference.
- A functional cluster groups related platform functionality, with specifications and design artifacts that guide vendor implementations.
The shared types in ara::core
4 min readNow that a functional cluster is defined, this lesson answers which ara::core types every application uses and what each of the platform's clusters is for.
Consider opening an application's configured persistent storage. The application needs to name the configured resource, determine whether the open operation succeeded, and preserve enough error information to decide what to do if it failed. AUTOSAR's Specification of Adaptive Platform Core defines common types for these needs, while the Specification of Persistency defines operations specific to storage. When reading an interface, identify the common types first. Then read the cluster's specification to find what success means and which failures the operation can report.
Result<T> represents the outcome of an operation that can either succeed with a value of type T or fail with an error. Its default error type is ara::core::ErrorCode. Result<void> can represent success without a payload or failure with an error. Read the outcome before accessing the value. For a storage open, success gives the caller access to the opened storage, while failure gives the caller an error to handle. The cluster specification defines the meaning of that error and any circumstances under which a retry makes sense.
ErrorCode associates a numeric error value with an error domain and can carry supplemental data. The domain defines how to interpret the value. Two domains can use the same number for different failures, so preserve the domain along with the value when passing an error on for later interpretation. On Ubuntu, a failing Linux library call may direct you to read errno, as described in errno(3). An ARA operation returning Result carries its error in that returned object. Read the return contract of the API you called before deciding where to get the error.
InstanceSpecifier identifies an element in the AUTOSAR model using a short-name path. In the storage example, it identifies the application's modeled port for accessing persistent storage. A short-name path follows the names of elements in the model hierarchy. Slashes can appear in it, so it may look familiar to a Linux programmer. The model gives those names their meaning. Linux file path lookup follows the rules in path_resolution(7) when a program asks the operating system to resolve a pathname. A cluster API that takes an InstanceSpecifier expects the modeled reference described by that API.
String holds an owned, variable-length sequence of characters. Use it for text when the interface calls for an owning string, such as an application-supplied label. The individual API specifies what text it accepts, including any encoding or naming restrictions. InstanceSpecifier has a more specific meaning. When an API asks for one, the caller needs the short-name path of the appropriate modeled element.
Array<T, N> and Vector<T> hold sequences of values of a single element type. An Array has a fixed element count, N, known at compile time. It suits a record whose format always has the same number of entries. A Vector has a size that can vary at runtime. It suits a collection whose length depends on what the application receives or discovers. Choose based on the interface contract. A fixed count belongs in the type when it is an invariant of the data.
Optional<T> holds either a T or no value. Use it when absence is a valid state, such as a configuration record whose display label may be omitted. An absent label and a present but empty string are distinct states. If a read can fail and a successful read can also yield an absent label, a conceptual type such as Result<Optional<String>> represents both decisions. First ask whether the read succeeded. On success, ask whether the label was present.
Variant holds a value from a specified set of alternative types. For example, an interface could define a payload that can hold either a single reading or a vector of readings. The caller uses the active alternative to determine how to interpret the payload. Both alternatives can represent valid data. For concrete declarations, use the Core specification and headers for the project's target release, since the availability and definitions of types can vary by release.
Responsibilities of the functional clusters
3 min readStart with the action the application or platform needs to perform. Publishing a service, recording a diagnostic fault, and supervising a running process each require a different interface. The table uses the ara:: labels for this module's cluster list. Check the target release for the formal cluster names, available interfaces, and exact namespaces. Some capabilities are exposed through modeled services or platform configuration, and the presence of a label here does not imply a public C++ API under that namespace in every release. RESTful Communication is a historical entry: the R24-11 design document has no REST chapter, so check whether your release still specifies it.
| Label | Functional cluster and purpose |
|---|---|
ara::com |
Communication Management lets applications offer, discover, and use service instances through methods, events, and fields. |
ara::exec |
Execution Management starts and stops configured application processes and receives execution-state reports from them. |
ara::per |
Persistency provides application storage through key-value and file storage interfaces. |
ara::log |
Log and Trace records application messages with severity levels and logging context. |
ara::diag |
Diagnostics supports diagnostic services and fault reporting, including reporting monitor results used for diagnostic trouble codes. |
ara::phm |
Platform Health Management supervises configured execution behavior, such as checkpoint progress, and supports reactions to supervision failures. |
ara::sm |
State Management coordinates platform operating states and requests the corresponding execution state changes. |
ara::ucm |
Update and Configuration Management manages the processing, installation, and activation of software packages. |
ara::crypto |
Cryptography provides cryptographic operations and controlled access to cryptographic keys and other objects. |
ara::iam |
Identity and Access Management controls whether an identified application is authorized to use a protected resource or service. |
ara::tsync |
Time Synchronization provides access to synchronized time bases and information about their synchronization. |
ara::nm |
Network Management coordinates network availability, including keeping a network awake while it is needed and allowing it to sleep afterward. |
ara::rest |
RESTful Communication, in releases that specify it (not in the R24-11 design document), supports resource-oriented requests and responses through REST interfaces. |
A sensor application shows why several of these responsibilities can apply to the same event. The application can publish a sensor reading through Communication Management and obtain a synchronized timestamp through Time Synchronization. If it records a failure to obtain data, Log and Trace supplies the application log. If it must report a monitored fault for a diagnostic tester to retrieve, Diagnostics supplies the diagnostic behavior. Platform Health Management can separately supervise whether the application reaches a configured checkpoint as expected. Each interface has a different consumer and a different reason to receive information.
Process startup also involves distinct actions. State Management handles a change in the requested operating state. Execution Management applies the corresponding process execution changes and receives reports from application processes. Platform Health Management can supervise configured behavior after execution begins. When looking for an API, ask whether your task is to request an operating-state change, report execution state, or report progress to a configured supervision checkpoint.
The same distinction applies to data. Persistency handles application data intended to survive a restart. Update and Configuration Management handles the software packages deployed to the platform. Identity and Access Management governs authorization to use protected capabilities. Cryptography supplies operations such as signature verification. An update workflow can involve both authorization and cryptography, with each requirement belonging to the specification that defines the behavior in question.
Reading a software specification
3 min readAn AUTOSAR Software Specification, the document that defines software behavior and interfaces for a given area has a table of contents and individual requirements. Start with the Adaptive Platform Specification of Execution Management. Record the release shown on the PDF's cover. A requirement identifier or a section number is easiest to verify when everyone reviewing your notes knows which edition you used.
Scan the whole table of contents. Give each top-level section a short description, then expand the functional and API sections by one level where their headings allow it. An introduction gives context. Terminology defines how the document uses names. Dependencies tell you which other documents or capabilities affect the specification. Functional sections describe behavior, while API sections describe interfaces and types. Some sections have no API area. Mark them as context, terminology, dependencies, or another descriptive category. For an execution-state reporting heading, use an area such as application execution-state reporting. For process startup behavior, use process lifecycle. Keep the printed section titles and numbers in your notes so another reader can find them.
Next, open the actual text for a few mapped sections. Record each selected requirement's printed identifier, its subject, the required or permitted action, and any conditions. A normative shall requires the named subject to perform the action. A shall not prohibits it. If the clause applies only under a stated condition, record it as mandatory when that condition holds. A should expresses a recommendation and a may expresses permission. Mark explanatory prose and examples as informative when they carry no normative obligation. Use the document's own conventions and read any shared conditions that govern the clause.
For example, when a requirement addresses Execution Management, record the obligation against the platform implementation. A requirement addressing an application goes against the application. A condition can narrow the applicability to a particular configuration or event. This distinction matters when reviewing an API section that lists a callable interface. A requirement to provide an interface and a requirement for an application to call that interface are separate claims, each of which needs supporting text. A heading alone establishes neither claim.
The next lesson, The machine and the ARA-only boundary, explains what an Adaptive Machine represents and where the application-facing ARA interfaces sit. The cluster responsibilities here tell you which interface to look for when you examine that boundary.
Key takeaways
- Result carries an operation outcome, and ErrorCode identifies an error within an error domain.
- InstanceSpecifier identifies a model element by its short-name path.
- Execution Management controls process execution, State Management coordinates operating states, and Platform Health Management supervises configured behavior.
- A table of contents locates relevant text, and the wording and scope of each requirement establish its obligation.
Reflect
- Explain to a colleague, in two sentences: distinguish operation failure, normal absence, and alternative payloads using Result, Optional, and Variant.
- Which objective are you least sure about? Re-read that section, then do its exercise in the practice pack.
- What surprised you when you ran the commands yourself?
On a real board
Repeat the key commands on your Raspberry Pi or lab board over SSH or the serial console. Note anything that behaves differently from your PC, such as missing tools, a BusyBox shell or a read-only filesystem.
References and further reading
- Man pageerrno(3): error numbers
- Man pagepath_resolution(7): how Linux resolves a pathname
- SpecificationAUTOSAR AP R24-11: Specification of Execution Management
Official documentation first. Links checked when the lesson was published.