Configure AUTOSAR Adaptive Service Instance Identification
You can configure service instance identification for service ports in an AUTOSAR adaptive component. When you build an adaptive software component model:
Exported ARXML files include a service instance manifest file, which describes port-to-service instance mapping.
Generated C++ code uses the configured service instance information in
ara::comfunction calls.
To configure service instance identification:
Open the AUTOSAR Dictionary and select XML Options. Set XML option Identify Service Instance Using to indicate the form in which to generate service instance information. Select
InstanceIdentifierorInstanceSpecifier. The form that you select is used to identify service instances in C++ code files.
Go to the required ports and provided ports views in the dictionary.
If you have selected Instance Specifier to identify the service instance, Instance Specifier for a port is automatically generated.
If you have selected Instance Identifier to identify the service instance, examine the Instance Identifier for the port in AUTOSAR Dictionary. You can enter a value or accept the existing value.

Building the model generates the service instance manifest file
.
The manifest file describes service interface deployments, service instances, and
service instance to port mapping for the adaptive component.model_ServiceInstanceManifest.arxml
In the generated C++ code, ara::com function calls use the
configured service instance information. For example, if you selected the
InstanceIdentifier form, and set Instance
Identifier to 1 for a required port, the generated function calls use
that configuration.
// Model initialize function
void autosar_LaneGuidanceModelClass::initialize()
{
{
ara::com::ServiceHandleContainer< company::chassis::required::proxy::
RequiredInterfaceProxy::HandleType > handles;
...
handles = company::chassis::required::proxy::RequiredInterfaceProxy::
FindService(ara::com::InstanceIdentifier(ara::core::StringView("1")));
...