DEENESPTFRRUARHIKOZHNL

struct ara::com::FindServiceHandle

[SWS_CM_00303] Upstream: RS_CM_00102

struct FindServiceHandle {...};

The exact definition of ara::com::FindServiceHandle is Communication Management implementation specific. ara::com::FindServiceHandle satisfies the [equalitycomparable] and [lessthancomparable] requirements as per [30] to allow storing and managing ara::com::FindServiceHandles by the application.

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/service/find_service_handle.h"
Forwarding-Header#include "ara/com/com_fwd.h"
Scopenamespace ara::com

User GuideAI-GENERATED

Serves as a control token for managing and terminating an ongoing asynchronous background search for service instances.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: eb9ee1985b4b Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves as a control token for managing and terminating an ongoing asynchronous background search for service instances.

The structure ara::com::FindServiceHandle serves as a unique control token for controlling service monitoring running in the background (AUTOSAR_AP_EXP_ARAComAPI p. 34). Because the default constructor is deleted ([SWS_CM_00353]), the handle is created exclusively by StartFindService and, after receipt of asynchronous status callbacks, enables terminating the search specifically via StopFindService (AUTOSAR_AP_EXP_ARAComAPI p. 30). Supported comparison operators also ensure the storable management of multiple search requests in standard containers ([SWS_CM_11526], [SWS_CM_11527]).

Context

The structure ara::com::FindServiceHandle functions in module com of the Adaptive Platform as a unique identifier and control token for an asynchronous, continuous service search. While a synchronous query via FindService determines matching service instances on a one-off basis and returns handle containers directly, StartFindService initiates permanent monitoring of service availability in the background (AUTOSAR_AP_EXP_ARAComAPI p. 34). Typically, the application instance, the type-specific proxy class (for example RadarServiceProxy), and a user-defined callback function of type FindServiceHandler are involved in this process (AUTOSAR_AP_EXP_ARAComAPI p. 30). The concrete internal representation of ara::com::FindServiceHandle is designed specifically for the implementation of the respective Communication Management, but provides standardized C++ interfaces for handling.

Lifecycle

The lifecycle of a ara::com::FindServiceHandle is tightly coupled to the active search process in Communication Management:

  • Creation: The default constructor is explicitly deleted ([SWS_CM_00353]). An application thus cannot create handle instances uninitialized or arbitrarily. Instead, a valid handle is generated exclusively as the payload of a ara::core::Result by the static method StartFindService (AUTOSAR_AP_EXP_ARAComAPI p. 30).
  • Management and ownership: A handle supports assignment via the copy assignment operator [SWS_CM_11528]. To enable the application to store and organize multiple search requests in standard containers (such as ordered sets or associative maps), the type satisfies the C++ concepts [equalitycomparable] and [lessthancomparable] via the operators operator== ([SWS_CM_11526]) and operator< ([SWS_CM_11527]).
  • Termination and destruction: The handle retains its validity as long as background monitoring is active. Terminating the search is carried out by passing the handle to StopFindService (AUTOSAR_AP_EXP_ARAComAPI p. 30, AUTOSAR_AP_EXP_ARAComAPI p. 34). After this call, the handle no longer represents an ongoing search process.

Usage Path

The regular sequence comprises registering the search request, continuously receiving availability updates, and orderly stopping the monitoring process:

  1. Search start: The application registers a FindServiceHandler via StartFindService to be informed about newly available or discontinued service instances (AUTOSAR_AP_EXP_ARAComAPI p. 30, AUTOSAR_AP_EXP_ARAComAPI p. 34).
  2. Handle receipt: Upon a successful start, the call returns an ara::core::Result with the FindServiceHandle (AUTOSAR_AP_EXP_ARAComAPI p. 30), which the application retains for later control calls.
  3. Asynchronous notification: Communication Management executes the background search and invokes the provided handler upon status changes (AUTOSAR_AP_EXP_ARAComAPI p. 34).
  4. Search stop: As soon as the instances have been found or monitoring is no longer required, the application passes the handle to StopFindService (AUTOSAR_AP_EXP_ARAComAPI p. 30, AUTOSAR_AP_EXP_ARAComAPI p. 34).
Sequence of asynchronous service search with FindServiceHandleApplikationProxyFindServiceHandlerStartFindService(handler)Result<FindServiceHandle>Use Case: Background monitoring activeNotification about instancesUse Case: Termination of monitoringStopFindService(handle)

Sequence diagram: Typical sequence of asynchronous service discovery from registration via notifications to termination via FindServiceHandle. Sources: AUTOSAR_AP_EXP_ARAComAPI p. 30, AUTOSAR_AP_EXP_ARAComAPI p. 34.

Error Scenarios

When using ara::com::FindServiceHandle, the following system-specific boundary conditions must be observed:

  • Failed search start: If technical bindings are not available or the service deployment configuration is faulty (AUTOSAR_AP_EXP_ARAComAPI p. 34), StartFindService fails. In this case, the returned ara::core::Result does not contain a valid handle, but an error code (AUTOSAR_AP_EXP_ARAComAPI p. 30).
  • Exception safety: The implemented comparison and assignment operators operator== ([SWS_CM_11526]), operator< ([SWS_CM_11527]), and operator= ([SWS_CM_11528]) are explicitly declared in the specification as not exception safe (not exception safe).
  • Multiple stops: A repeated call to StopFindService with the same handle is presumed to have no effect or lead to a runtime error, since the underlying monitoring activity has already been removed. Question Q-f44130c33fa1caea (open)

This guide is based on the AUTOSAR specification for the Adaptive Platform (Release R25-11). The interfaces and behaviors presented are based on the referenced SWS requirements and API descriptions.

Member map

Constructors and destructor

1

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__com__FindServiceHandle138 «struct» FindServiceHandle + FindServiceHandle() + operator=() + operator<() + operator==()

Detail view

Select an entry in the outline.

Constructors and destructor

Default constructor deletion

FindServiceHandle ()=delete;

Operators

operator< function

LessThan operator as per [lessthancomparable] in [30]

bool operator< (const FindServiceHandle &other) const;
operator= function

Copy assignment constructor

FindServiceHandle & operator= (const FindServiceHandle &other);
operator== function

Equality operator as per [equalitycomparable] in [30]

bool operator== (const FindServiceHandle &other) const;

Method documentation

function FindServiceHandle [SWS_CM_00353] Upstream: RS_AP_00146

FindServiceHandle ()=delete;

Default constructor deletion

Header-Datei#include "ara/com/service/find_service_handle.h"
Scopestruct ara::com::FindServiceHandle

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_00353
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_00353@rel:R25-11#b1f430d1
Content hash
b1f430d1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_00353
Status: valid/unmigrated Version: rel:R25-11#8a450052 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_00353@rel:R25-11#8a450052
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#b1f430d12026-09-30
  • R23-11rel:R23-11#604163032026-10-14
  • R24-11rel:R24-11#8a4500522026-10-14
  • R25-11rel:R25-11#8a4500522026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator< [SWS_CM_11527]

bool operator< (const FindServiceHandle &other) const;

LessThan operator as per [lessthancomparable] in [30]

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/service/find_service_handle.h"
Scopestruct ara::com::FindServiceHandle
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherOther ara::com::FindServiceHandle to compare

Rückgabewert

TypBeschreibung
boolTRUE if other is less than *this, FALSE otherwise.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_11527
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11527@rel:R25-11#9b3fc18e
Content hash
9b3fc18e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11527
Status: valid/unmigrated Version: rel:R25-11#b1ec1ec0 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_11527@rel:R25-11#b1ec1ec0
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#9b3fc18e2026-09-30
  • R24-11rel:R24-11#2bb55cbe2026-10-14
  • R25-11rel:R25-11#b1ec1ec02026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_CM_11528]

FindServiceHandle & operator= (const FindServiceHandle &other);

Copy assignment constructor

Header-Datei#include "ara/com/service/find_service_handle.h"
Scopestruct ara::com::FindServiceHandle
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherOther ara::com::FindServiceHandle to copy

Rückgabewert

TypBeschreibung
FindServiceHandle &New ara::com::FindServiceHandle

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_11528
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11528@rel:R25-11#414d7a6c
Content hash
414d7a6c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11528
Status: valid/unmigrated Version: rel:R25-11#847556b4 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_11528@rel:R25-11#847556b4
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#414d7a6c2026-09-30
  • R24-11rel:R24-11#f73bf3482026-10-14
  • R25-11rel:R25-11#847556b42026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator== [SWS_CM_11526]

bool operator== (const FindServiceHandle &other) const;

Equality operator as per [equalitycomparable] in [30]

Literaturverzeichnis SWS CommunicationManagement: [30] ISO/IEC 14882:2014, Information technology – Programming languages – C++ – www.iso.org

Header-Datei#include "ara/com/service/find_service_handle.h"
Scopestruct ara::com::FindServiceHandle
Exception-Sicherheitnot exception safe

Parameter (in)

ParameterBeschreibung
otherOther ara::com::FindServiceHandle to compare

Rückgabewert

TypBeschreibung
boolTRUE if other is equal to *this, FALSE otherwise.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CM_11526
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CM_11526@rel:R25-11#d9c8643c
Content hash
d9c8643c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_11526
Status: valid/unmigrated Version: rel:R25-11#d2ea98ee Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CM_11526@rel:R25-11#d2ea98ee
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#d9c8643c2026-09-30
  • R24-11rel:R24-11#491d93d72026-10-14
  • R25-11rel:R25-11#d2ea98ee2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill