|
1 | | -# ocs-domain-plugins |
| 1 | +# The Vector OCS Domain Plugins |
| 2 | +Welcome to the Vector OCS Domain Plugins repository. |
| 3 | + |
| 4 | +The source code published in this repository belongs to the One Click Startup Domain Plugins released in the |
| 5 | +MICROSAR Automation SDK. It gives full transparency regarding the implemented functionality of the OCS Domain Plugins. |
| 6 | +Furthermore, it allows the extension of the existing functionality. |
| 7 | + |
| 8 | +## Current Status of the OCS Domain Plugins |
| 9 | +| Plugin | Status Information | |
| 10 | +|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 11 | +| Communication | Legacy code to address features in the Communication Domain,<br>not optimized or refactored anyway | |
| 12 | +| Diagnostics | Hexagonal architecture to achieve unit testable code within the Diagnostic Domain,<br>including an example for testing the business logic | |
| 13 | +| EcuStateManagement | Class design to reflect the handling of root features, features and parameters within the BSW Management Domain. | |
| 14 | +| NvMemory | Class design for MCAL abstraction via object-oriented programming,<br> but limited to MICROSAR and AURIX2G specific BSW modules. | |
| 15 | +| RuntimeSystem | Class design to address dynamic scaling between SingleCore and MultiCore of the RuntimeSystem Domain,<br> depending on the OsPublishedInformation number of OsPhysicalCores. | |
| 16 | +| Security | 100% Kotlin based implementation of the Security Domain, including abstraction of the MDF specific APIs. | |
| 17 | +| Shared Library | Reusable helper functionalities. | |
| 18 | + |
| 19 | +## Getting Started |
| 20 | +The MICROSAR Automation SDK offers everything that is needed to build an OCS Custom App and the Domain Plugins. It |
| 21 | +can be downloaded from the Vector Download Center in the |
| 22 | +[DaVinci Team](https://www.vector.com/de/de/support-downloads/download-center/#product=%5B%2251284%22%5D&tab=1&pageSize=15&sort=date&order=desc) product category. |
| 23 | +Most important artifact which is required from the MICROSAR Automation SDK is the so called OCS Core. For more |
| 24 | +information we strongly recommend to read the contained documentation. |
| 25 | + |
| 26 | +### Preparation |
| 27 | +For simplification of the build setup we recommend as a first step to arrange the required files and folders as follows: |
| 28 | +``` |
| 29 | +├── BswPackage |
| 30 | +| └── MICROSAR_Classic_R31 |
| 31 | +| | └── Components |
| 32 | +| | └── DaVinciConfigurator |
| 33 | +| | └── ... |
| 34 | +| └── MICROSAR_Classic_R33 |
| 35 | +| | └── Components |
| 36 | +| | └── DaVinciConfigurator |
| 37 | +| | └── ... |
| 38 | +├── ocs-custom-app |
| 39 | +├── ocs-domain-plugins |
| 40 | +└── repository |
| 41 | +``` |
| 42 | +Within the BswPackage folder different MICROSAR Classic BSW Package releases can be stored. In this cases one for R31 |
| 43 | +and one for R33. The ocs-custom-app and the repository folder are both part of the MICROSAR Automation SDK. The |
| 44 | +ocs-domain-plugins directory contains the content of this repository. Arranging the folder in this way will simplify the |
| 45 | +customization of the gradle properties. |
| 46 | + |
| 47 | +### Customization of the Gradle properties |
| 48 | +Within the `ocs-domain-plugins` folder you can find the `gradle.properties` file: |
| 49 | +``` |
| 50 | +//localSipStore=path/to/sip/store/directory |
| 51 | +//localSip=path/to/used/sip/external |
| 52 | +ocsRepo=../repository |
| 53 | +
|
| 54 | +vOcsCore=1.5.0 |
| 55 | +vPluginsCommon=1.3.0 |
| 56 | +vOcsCom=1.6.0 |
| 57 | +vOcsDiag=1.6.0 |
| 58 | +vOcsNvM=1.6.0 |
| 59 | +vOcsEcuState=1.6.0 |
| 60 | +vOcsRuntime=1.6.0 |
| 61 | +vOcsSecurity=1.4.0 |
| 62 | +``` |
| 63 | +Based on the folder structure example above the explanation of the properties becomes easier. |
| 64 | +Adapt the properties as following: |
| 65 | +``` |
| 66 | +localSipStore=D:/dev/ocs/BswPackages |
| 67 | +localSip=MICROSAR_Classic_R31 |
| 68 | +ocsRepo=../repository |
| 69 | +
|
| 70 | +vOcsCore=1.5.0 |
| 71 | +vPluginsCommon=my-company-1.3.0 |
| 72 | +vOcsCom=my-company-1.6.0 |
| 73 | +vOcsDiag=my-company-1.6.0 |
| 74 | +vOcsNvM=my-company-1.6.0 |
| 75 | +vOcsEcuState=my-company-1.6.0 |
| 76 | +vOcsRuntime=my-company-1.6.0 |
| 77 | +vOcsSecurity=my-company-1.4.0 |
| 78 | +``` |
| 79 | +The `localSipStore` should point to the root directory of the BSW Packages while the `localSip` itself mentions a |
| 80 | +dedicated BSW Package against which the source code will be compiled. The gradle project of the `ocs-custom-app` and |
| 81 | +`ocs-domain-plugins` are prepared to handle the `ocsRepo` property as it is. If you want to adapt the storage location |
| 82 | +of the ocsRepo additional adaptions within the gradle projects are perhaps necessary. |
| 83 | + |
| 84 | +### Why should I use some company specific versions? |
| 85 | +We kindly ask you to adapt the version information mentioned in the `gradle.properties`. Reason for this is to ensure |
| 86 | +that the plugins you build by yourself can be distinguished from those delivered as pre-build artifacts in the MICROSAR |
| 87 | +Automation SDK. Here an example for the resulting files: |
| 88 | +```groovy |
| 89 | +ocs-communication-plugin-1.6.0.jar // without adaptions |
| 90 | +ocs-communication-plugin-my-company-1.6.0.jar // with adaptions |
| 91 | +``` |
| 92 | + |
| 93 | +### Build the OCS Domain Plugins |
| 94 | +Next step after adapting the `gradle.properties` file is to build the gradle project. For simplification the build will |
| 95 | +be described for the commandline terminal, but you can also use an IDE of your choice that supports gradle projects. |
| 96 | +Switch into the `ocs-domain-plugins` directory and call the `.\gradlew build` command: |
| 97 | +```batch |
| 98 | +D:\dev\ocs\ocs-domain-plugins>.\gradlew build |
| 99 | +``` |
| 100 | +The first build can take some time as additional gradle plugins are downloaded from the maven repository. You succeed when |
| 101 | +the build states: `BUILD SUCCESSFUL`. Otherwise, you need to figure out what went wrong. |
| 102 | + |
| 103 | +### Publish the OCS Domain Plugin jar files |
| 104 | +After successfully building the jar files the next step is to publish the files to you local maven repository. |
| 105 | +Publishing the OCS Domain Plugins to your local maven repository simplifies the handling of the ocs-custom-app gradle |
| 106 | +project. We will dive deeper into this part soon. For now, execute the following command: |
| 107 | +```batch |
| 108 | +D:\dev\ocs\ocs-domain-plugins>.\gradlew publishMavenPublicationToMavenLocalRepository |
| 109 | +``` |
| 110 | +Now, the important part. The maven local repository is not equal to the `repository` mentioned in the folder structure |
| 111 | +above. Reason for this is a simple conceptional decision that this `repository` contains the artifacts |
| 112 | +delivered by Vector. In most cases, local maven repository which is used for the publication can be found under you |
| 113 | +Windows user account, for example: |
| 114 | +```batch |
| 115 | +C:\Users\<your user account>\.m2\repository\com\vector\ocs\plugins\ocs-communication-plugin\my-company-1.6.0\ocs-communication-plugin-my-company-1.6.0.jar |
| 116 | +``` |
| 117 | + |
| 118 | +## Building an OCS Custom App |
| 119 | +### Customizing of the Gradle properties |
| 120 | +This step will look quite familiar to you. In the root folder of the `ocs-custom-app` you find the `gradle.properties` |
| 121 | +file: |
| 122 | +``` |
| 123 | +//localSipStore=path/to/sip/store/directory |
| 124 | +//localSip=path/to/used/sip/ |
| 125 | +ocsRepo=../repository |
| 126 | +
|
| 127 | +vOcsCore=2.0.0 |
| 128 | +vPluginsCommon=1.3.0 |
| 129 | +vOcsCom=1.6.0 |
| 130 | +vOcsDiag=1.6.0 |
| 131 | +vOcsNvM=1.6.0 |
| 132 | +vOcsEcuState=1.6.0 |
| 133 | +vOcsRuntime=1.6.0 |
| 134 | +vOcsSecurity=1.4.0 |
| 135 | +``` |
| 136 | +The `localSipStore`, `localSip` and `ocsRepo` should be configured in the same way as for the `ocs-domain-plugins`. |
| 137 | +If you keep the other version numbers as stated in the file you would build the OCS Custom App based on the Vector |
| 138 | +pre-build artifacts. In fact, you want to use the plugins you built by yourself, therefore you also need to adapt those |
| 139 | +properties, so that the result looks as follows: |
| 140 | +``` |
| 141 | +localSipStore=D:/dev/ocs/BswPackages |
| 142 | +localSip=MICROSAR_Classic_R31 |
| 143 | +ocsRepo=../repository |
| 144 | +
|
| 145 | +vOcsCore=1.5.0 |
| 146 | +vPluginsCommon=my-company-1.3.0 |
| 147 | +vOcsCom=my-company-1.6.0 |
| 148 | +vOcsDiag=my-company-1.6.0 |
| 149 | +vOcsNvM=my-company-1.6.0 |
| 150 | +vOcsEcuState=my-company-1.6.0 |
| 151 | +vOcsRuntime=my-company-1.6.0 |
| 152 | +vOcsSecurity=my-company-1.4.0 |
| 153 | +``` |
| 154 | +Please note that the gradle project of the OCS Custom App is prepared in a way that it handles the ocsRepo as well as |
| 155 | +the local maven repository. |
| 156 | + |
| 157 | +### Build the OCS Custom App |
| 158 | +The steps are equal to the OCS Domain Plugins. This time go to the `ocs-custom-app` directory and call the `.\gradlew build` command: |
| 159 | +```batch |
| 160 | +D:\dev\ocs\ocs-custom-app>.\gradlew build |
| 161 | +``` |
| 162 | +The first build can take some time as additional gradle plugins are downloaded from the maven repository. You succeed when |
| 163 | +the build states: `BUILD SUCCESSFUL`. Otherwise, you need to figure out what went wrong. |
| 164 | + |
| 165 | +### Executing the OCS Custom App |
| 166 | +Details regarding the execution can be found in the delivered documentation. |
| 167 | + |
| 168 | +## Dependencies |
| 169 | +To compile the source code of the OCS Domain Plugins additional tools are required. |
| 170 | +Beside the mentioned dependencies the shared gradle project may point to additional gradle plugins. |
| 171 | + |
| 172 | +| External Tool | Description | |
| 173 | +|---------------|-------------| |
| 174 | +| JAVA JDK | 1.8 | |
| 175 | +| Gradle | 7.4.2 | |
| 176 | + |
| 177 | +## Release Information |
| 178 | +| Release | Belongs to | Supports MICROSAR Classic Releases | |
| 179 | +|---------|--------------------------------|------------------------------------| |
| 180 | +| v1.6.0 | MICROSAR Automation SDK v1.5.0 | R31 - R34 | |
| 181 | + |
| 182 | +## Abbreviations |
| 183 | +| Abbreviation | Description | |
| 184 | +|--------------|-----------------------------------| |
| 185 | +| BSW | Basic Software | |
| 186 | +| MCAL | Microcontroller Abstraction Layer | |
| 187 | +| OCS | One Click Startup | |
0 commit comments