Main Content

Configure AUTOSAR Adaptive Service Instance Identification

You can configure service instance identification for required and provided 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::com function calls.

To configure service instance identification:

  1. 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 InstanceIdentifier or InstanceSpecifier. The form that you select is used to identify service instances in generated Proxy and Skeleton functions.

  2. Go to the required ports and provided ports views in the dictionary. Select each listed port to display its Manifest attributes. For each port, based on the service instance form you selected in XML options, examine the value for Instance Specifier or Instance Identifier.You can enter a value or accept an existing value.

Building the model generates the service instance manifest file model_ServiceInstanceManifest.arxml. The manifest file describes service interface deployments, service instance to port mapping, and service interfaces for the adaptive component.

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("1"));
...

Related Examples

More About