What is CommonAPI C++?
CommonAPI C++ is a C++ framework for interprocess and network communication. The basic objective is not to provide a new mechanism for interprocess or network communication (IPC), but to define a high-level C ++ API, which can be used for different mechanisms. The benefit for C ++ developers should be that they are relieved from details of proprietary or little-known communication frameworks or protocols. On the other hand, of course, a certain learning curve must be mastered. To make this curve as smooth as possible there exist some documents (for a first introduction see e.g. http://docs.projects.genivi.org/ipc.common-api-tools/3.1.3/). This wiki intends to illuminate some aspects even closer as it is possible in the user guide. Even if the content at the beginning should still be a bit thin, I'm trying to answer over time as many questions as possible that might come up in the context of CommonAPI, so do not hesitate to write comments or ask questions in the comment fields of the wiki pages. If you really suspect a bug, please create a ticket at http://bugs.genivi.org/ (the product is CommonAPI for IPC).
What are the basic features of CommonAPI C++?
CommonAPI C++ is strongly related to the interface description language Franca IDL (see https://github.com/franca/franca). The basic procedure is that you define an interface for your service with the platform- and programming-language-independent Franca IDL. Then you generate proxy- and stub-code with the CommonAPI code generator (CommonAPI-Tools). After that implement the stub functions by using the function bodies as they are generated and then implement the client by calling these functions by using the generated proxy. To get executable applications (client and service) generate IPC framework specific code (glue-code) with the binding specific code generator (at the moment there is one for D-Bus and for SOME/IP, see details in the provided documentation). At the end compile it together with the provided runtime libraries (for CommonAPI itself and again a binding specific library, for details see again the provided documentation).
The basic features are:
- Interface description with the easy to learn, human-readable FrancaIDL.
- Support of Franca features as inheritance, polymorphic structs, unions.
- Code generation for clear and not too complex C++ code.
- Actual support for D-Bus (http://www.freedesktop.org/wiki/Software/dbus/) and SOME/IP (see http://some-ip.com/).
- High performant implementation by using C++ templates (runtime-performance).
- Highly configurable for the integration on different platforms (e.g. main-loop support, support of Franca deployment files).
- Multithreading support (thread-safe).
Where do I find the documentation and source code?
|Central project directory for all genivi repositories.|
|CommonAPI runtime repository with the source code to build the runtime library.|
|CommonAPI tools repository with the source code (java/xtend eclipse plug-ins) for the CommonAPI code generator.|
|CommonAPI D-Bus runtime repository with the source code to build the runtime library of the D-Bus binding.|
|CommonAPI D-Bus tools repository with the source code (java/xtend eclipse plug-ins) for the CommonAPI D-Bus code generator which is needed to generate D-Bus specific source code (D-Bus glue-code).|
|CommonAPI SOME/IP runtime repository with the source code to build the runtime library of the SOME/IP binding.|
|CommonAPI SOME/IP tools repository with the source code (java/xtend eclipse plug-ins) for the CommonAPI SOME/IP code generator which is needed to generate SOME/IP specific source code (SOME/IP glue-code).|
|vsomeip repository. It contains the source code of the SOME/IP core framework ("SOME/IP stack").|
|GENIVI documentation link for available software projects.|
(Current) Common API C
|Base documentation of CommonAPI (CommonAPI specification, CommonAPI user guide, test documenation).|
|D-Bus specific documentation (user guide including the description of the windows installation).|
|SOME/IP specific documentation.|
|User guide for vsomeip.|
|http://docs.projects.genivi.org/ipc.common-api-runtime/||Doxygen generated documentation of CommonAPI C++ source code.|
|http://docs.projects.genivi.org/ipc.common-api-dbus-runtime/||Doxygen generated documentation of CommonAPI C++ D-Bus source code.|
|http://docs.projects.genivi.org/ipc.common-api.cpp-someip-runtime/||Doxygen generated documentation of CommonAPI C++ SOME/IP source code.|
|http://docs.projects.genivi.org/yamaica-update-site/||Documentation directory for yamaica tooling and for CommonAPI code generators (executables). yamaica is an integration project of eclipse plug-ins in the Franca context. For some reasons this directory also contains sub-directories with the code generator executables and with eclipse update-sites for the code generators.|
|http://docs.projects.genivi.org/yamaica-update-site/yamaica/updatesite/||Eclipse update site for the yamaica tooling.|
|http://docs.projects.genivi.org/yamaica-update-site/CommonAPI/generator/||CommonAPI code generator executables.|
|http://docs.projects.genivi.org/yamaica-update-site/CommonAPI/runtime/||CommonAPI source code as tarball.|
|http://docs.projects.genivi.org/yamaica-update-site/CommonAPI/updatesite/||Eclipse update site for the CommonAPI code generators.|
|http://bugs.genivi.org/describecomponents.cgi?product=Common%20API%20for%20IPC||Bugzilla ticket system for CommonAPI.|
|http://projects.genivi.org/commonapi/||CommonAPI GENIVI project home page.|
What means what? (Glossary)
|Application||This term is used for executable programs on the target platform which can work as service and/or as client.|
|Binding||A binding in the CommonAPI context is the software which adapts the CommonAPI standard API to IPC framework specific functionalities. The binding consists of a specific runtime library and a specific code generator.|
|Client||A client application uses the functionality of services by calling functions or subscribing to attributes. An application can be client and service at the same time.|
|Glue-code||CommonAPI applications are based on generated code. There is the generated code of CommonAPI itself and binding specific generated code. The latter is also called glue-code in the CommonAPI context.|
|Runtime||All CommonAPI applications need a common, interface independent functionality for creating proxies, loading IPC specific libraries and so on. This functionality is provided by the CommonAPI runtime library.|
|Service||A service offers a certain functionality which is accessible by interface functions.|