This is a collection of schemas in the Google FlatBuffers IDL for describing automotive network communications within a virtualized simulation environment.
Currently buffer representations of CAN, FlexRay, Ethernet and Encoded Signals at the level of a Communication Matrix definition are provided.
L- docs Documentation
L- schemas Schemas of the Standard
L- docker Supporting build environments
The schemas can be compiled using a containerized build toolchain as follows:
$ git clone https://github.com/boschglobal/automotive-bus-schema.git
$ cd automotive-bus-schema
# Build the toolchains (optional, builder containers are published on ghcr.io).
$ make builders
...
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
python-builder latest a5ef73ea66dc 16 minutes ago 858MB
flatc-builder latest f4bb83e2c0c9 18 minutes ago 324MB
# Build and package the schemas.
$ make
...
$ make dist
Distribution package files:
--------------------------
204K /vagrant/git/oss/automotive-bus-schema/dist/automotive-bus-schema.tar.gz
36K /vagrant/git/oss/automotive-bus-schema/dist/python/dist/automotive_bus_schema-devel-py3-none-any.whl
12K /vagrant/git/oss/automotive-bus-schema/dist/python/dist/automotive-bus-schema-devel.tar.gz
Alternatively, a build toolchain can be developed based on the Dockerfiles (Flatc/Flatcc, Python) used to generate the above containerized toolchain. For more information regarding compiling a FlatBuffers schema for your language, please refer first to the official page for supported languages. and compiler options listed here.
Note that for C language the flatcc compiler is recommended.
After compiling the output can be integrated in the simulation model code. Please refer to the FlatBuffers Tutorial for example usage of compiled code, e.g. how to read or write data structures defined in a schema.
This repository includes the following examples:
- cmake - An example of a CMake based project with the Signal Schema and MsgPack.
- streams - How to use the Stream Interface Frame Schema with FlatBuffers.
Schemas in this repository require:
- FlatBuffers v1.12.0 or v2.0.0 (or later).
- flatcc v0.6.0 (or later).
- msgpack-c v3.3.0 (or later).
Later versions may require testing.
Please refer to the CONTRIBUTING.md for a quick read-up about what to consider if you want to contribute.
Automotive Bus FlatBuffers Schema is open-sourced under the Apache-2.0 license. See the LICENSE and NOTICE for details.