DEENESPTFRRUARHIKOZHNL
ADAPTIVE Modul: com Rolle: heuristic Konfidenz: 80%

SNIP_ADAPTIVE_STD_FIGURE_Figure_6_15

Quelle: ARAComAPI.pdf (Seite 1) • Ziel-Anforderung: SWS_CORE_00361

Wortlaut

Figure 6.15: Synchronous method call sample In a nutshell: A synchronous call (from the viewpoint of the application developer) to a service method, simply consists of the ()-operator call-syntax with a subsequent blocking get() call on the returned future. There are other ways for the user to get a notification from the Communication Management implementation as soon as the method result is available beside resuming execution from a blocking call to get(): • The variants of ‘wait’ , which the ara::com::Future has taken over from std::future. They basically provide the functionality of a blocking wait for the fulfillment of the future. • Registering a callback method via then(). This is one of the extensions to the std::future according to proposal N3857. The plain parameterless wait() variant has the same blocking semantics like get() — i.e. blocks till the future has a valid result (value or exception). The variants of ‘wait’, where you either give a duration ( wait_for()) or a target point in time (wait_until()) will return either if the future has a valid result or in case the timeout/deadline restriction has been met — therefore they both return FutureStatus to allow distinction between those cases. The last possibility to get notification of the result of the future (valid or exception) is by registering a callback method via then(). This is one of the extensions to the std::future according to proposal N3857, which is shown in the following example: 1 2 using namespace ara::com; 3 47 of 90 — AUTOSAR CONFIDENTIAL — Document ID 846: AUTOSAR_EXP_ARAComAPI

Versionen & Provenienz · Zugeordnete Anforderungen

Diese Angaben zeigt der Versions-Explorer.

Begründung & Zuweisungs-Evidenz

FutureStatus return distinction for wait variants.

Dokumenten-Herkunft & Rückverfolgbarkeit

Spezifikations-Dokument ARAComAPI.pdf
Dokumentseite Seite 1
Ziel-Modul com (adaptive)
Ziel-Anforderung SWS_CORE_00361
Semantische Rolle heuristic
Automatisierungs-Konfidenz 0.80