Configure AUTOSAR Adaptive Service Interface Identifier
Service instance identifiers, service interface identifiers, and service versioning facilitate communication and interaction between software components in service-oriented architectures. A service interface defines the type of service, and a service instance defines where a specific service is running. The service interface identifier (also known as Service ID) identifies the interface of a service, and the service instance identifier identifies a specific instance of a service.
AUTOSAR Blockset allows you to
Configure the service interface identifier for a deployment object corresponding to the service interface. When you build the model, this information is written to the
SERVICE-INTERFACE-IDfield in the generated ARXML file.Define service versioning (major and minor) for the SOME/IP service interface deployment object. When you build the model, this information is written to the
SERVICE-INTERFACE-VERSIONfield.
Configure Service ID and Define Service Versioning
These steps show how to configure the Service ID of the SOME/IP deployment object
corresponding to a service port in the autosar_LaneGuidance
model.
Open the model.
open_system("autosar_LaneGuidance");Create an AUTOSAR properties object for the model.
apiObj = autosar.api.getAUTOSARProperties("autosar_LaneGuidance");Set the network binding for the model to SOME/IP.
apiObj.set("XmlOptions","NetworkBinding","SOME/IP");
Find the paths for the deployment objects corresponding to the SOME/IP network binding.
paths = apiObj.find('/','SomeipServiceInterfaceDeployment', ... 'PathType','FullyQualified')
Set a Service ID, major version, and minor version for the provided port or required port.
apiObj.set(paths{1},"ServiceInterfaceId",11); apiObj.set(paths{1},"MajorVersion",101); apiObj.set(paths{1},"MinorVersion",102);Save and build the model.
The model build process writes the specified service interface identifier to the
SERVICE-INTERFACE-ID field and service interface deployment
versions to the SERVICE-INTERFACE-VERSION field in the generated
autosar_LaneGuidance_ServiceInstanceManifest.arxml
See Also
autosar.api.getAUTOSARProperties | set