Skip to content

Feature Request for: IDL and code generation infrastructure #1164

@dejanpan

Description

@dejanpan

IDL and code generation infrastructure

Abstract

A runtime solution that shall be able to communicate over SOME/IP and DDS needs the capability to read in ARXML and OMG IDL, which are the description formats used to describe network communication to other nodes based on these protocols. Additionally, the de/serialization of messages is needed to convert internal messages into the respective network formats of SOME/IP and DDS-RTPS. Besides the serialization, E2E protection is needed. 

This feature request is about an infrastructure that allows reading in IDL and generating serialization code. The infrastructure shall be able to deal with IDL and code generators needed for SOME/IP and DDS, and be designed in a way that further extensions are possible. 

Motivation

As of today, there is no (to us known) infrastructure in S-CORE that allows for processing IDLs and generating serialization code. The motivation is to close this gap, as this functionality is essential for a middleware stack. 

More specifically:

  • To communicate between processes/network you need to serialize types (CDR or SOME/IP)
  • Writing this by hand is tedious and error-prone, so you want to generate date types+serialization
  • Existing data types and information is stored in ARXMLs (at least for automotive), you don't want to convert them to another format => should be able to read ARXMLs
  • The separation into Frontends that import descriptions, intermediary models that represent these descriptions and Backends that transform the intermediary models into code allows us to easily add more Frontends and Backends without changing existing code

Rationale

The design is based on frontends to read in IDL, a type model that can represent all the possible types in ARXML and OMG IDL and backends to generate the serialization code for SOME/IP serialization in different AUTOSAR flavors and the DDS-RTPS serialization. The design is made modular to allow for future extensions with additional frontends and backends. Frontends and backends were separated to allow for a mix and match. 

Image

Specification

The following existing requirements are addressed by this feature request:

  1. Extensible External Communication
  2. Safe Communication
  3. Supported network protocols
    • The software platform shall support the following automotive network protocols:
      • SOME/IP
      • DDS
  4. IDL Support

Backwards Compatibility

not needed as there is nothing related today 

Security Impact

Assuming that we can trust the IDLs that are used to describe the messages exchanged by activities, the only threat would be an attack based on the sending of serialized messages that are composed in a way to exploit a vulnerability in the code generated for de-serialization. This is to be checked with an appropriate Fuzz testing. 

Safety Impact

This features improves safety as it provided E2E checking capabilities for network communication. It provides the functionality needed for the "Safe Communication" requirement.

The code generators will be tool-qualified according to ISO 26262.

License Impact

No impact - Apache License 2.0

How to Teach This

There will be extensive documentation that describes how to use and extend the framework. 

Rejected Ideas

tbd

Open Issues

tbd

Footnotes

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Draft

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions