├── .gitignore ├── LICENSE.txt ├── README.md ├── babel.config.js ├── dist └── arxmlviewer_setup_win_x64.exe ├── package-lock.json ├── package.json ├── public ├── gif │ ├── drag-drop.gif │ ├── simple-search.gif │ └── simple-usage.gif ├── index.html └── test │ ├── TestApp.arxml │ └── example.arxml ├── src ├── App.vue ├── assets │ ├── chevron-down.svg │ ├── chevron-right.svg │ └── icon.png ├── background.js ├── components │ ├── arxmlnode.vue │ ├── dropzone.vue │ ├── searcharea.vue │ ├── searchform.vue │ └── searchresultstable.vue ├── func.js ├── main.js └── store │ └── index.js └── vue.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | 4 | # local env files 5 | .env.local 6 | .env.*.local 7 | 8 | # Log files 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | *.code-workspace 23 | 24 | #Electron-builder output 25 | /dist_electron -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Mahmut Aksakalli 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # arxml-app 2 |

3 | 4 |

5 | This tool aims to visualize ARXML files in human readable form with easy search operations. 6 | 7 | ## Features 8 | * open ARXML files up to 500MB 9 | * Drag-drop file operations 10 | * Multiple file support 11 | 12 | ![multiple-file](./public/gif/drag-drop.gif) 13 | 14 | * Easy usage 15 | 16 | ![simple-usage](./public/gif/simple-usage.gif) 17 | 18 | * Advanced search functionalities 19 | 20 | ![](./public/gif/simple-search.gif) 21 | 22 | ## Executables 23 | * [win_x64_setup](./dist/arxmlviewer_setup_win_x64.exe) 24 | 25 | ## Development 26 | * [ElectronJS](https://www.electronjs.org/) 27 | * creates Desktop applications 28 | * handles file operations 29 | * [VueJS](https://vuejs.org/) 30 | * [fast-xml-parser](https://www.npmjs.com/package/fast-xml-parser) 31 | * Parse XML to JS/JSON 32 | * [traverse](https://www.npmjs.com/package/traverse) 33 | * Traverse and transform objects by visiting every node on a recursive walk. 34 | 35 | ## Project setup 36 | ``` 37 | npm install 38 | ``` 39 | 40 | ### Compiles and hot-reloads for development 41 | ``` 42 | npm run electron:serve 43 | ``` 44 | 45 | ### Compiles and minifies for production 46 | ``` 47 | npm run electron:build 48 | ``` 49 | 50 | ### Customize configuration 51 | See [Configuration Reference](https://cli.vuejs.org/config/). 52 | 53 | ## Upcoming Features 54 | * ARXML file support > 500MB 55 | * ECU view to visualize SWCs, runnables and port connections 56 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /dist/arxmlviewer_setup_win_x64.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmut-aksakalli/arxml-viewer/af943cf1c33f361260aa8a5d95fd46c52e2d5789/dist/arxmlviewer_setup_win_x64.exe -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "arxml-app", 3 | "version": "0.1.0", 4 | "description": "ARXML viewer", 5 | "private": true, 6 | "scripts": { 7 | "serve": "vue-cli-service serve", 8 | "build": "vue-cli-service build", 9 | "electron:build": "vue-cli-service electron:build", 10 | "electron:serve": "vue-cli-service electron:serve", 11 | "postinstall": "electron-builder install-app-deps", 12 | "postuninstall": "electron-builder install-app-deps" 13 | }, 14 | "author": "mafumuttOS", 15 | "license": "ISC", 16 | "main": "background.js", 17 | "dependencies": { 18 | "core-js": "^3.6.5", 19 | "electron-find": "^1.0.6", 20 | "fast-xml-parser": "^3.17.5", 21 | "jsonpath-plus": "^4.0.0", 22 | "sax": "^1.2.4", 23 | "saxpath": "^0.6.5", 24 | "traverse": "^0.6.6", 25 | "vue": "^2.6.11", 26 | "vuex": "^3.4.0" 27 | }, 28 | "devDependencies": { 29 | "@vue/cli-plugin-babel": "~4.5.0", 30 | "@vue/cli-plugin-vuex": "~4.5.0", 31 | "@vue/cli-service": "~4.5.0", 32 | "electron": "^11.0.0", 33 | "electron-devtools-installer": "^3.1.0", 34 | "node-sass": "^4.12.0", 35 | "sass-loader": "^8.0.2", 36 | "vue-cli-plugin-electron-builder": "~2.0.0-rc.6", 37 | "vue-template-compiler": "^2.6.11" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /public/gif/drag-drop.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmut-aksakalli/arxml-viewer/af943cf1c33f361260aa8a5d95fd46c52e2d5789/public/gif/drag-drop.gif -------------------------------------------------------------------------------- /public/gif/simple-search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmut-aksakalli/arxml-viewer/af943cf1c33f361260aa8a5d95fd46c52e2d5789/public/gif/simple-search.gif -------------------------------------------------------------------------------- /public/gif/simple-usage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmut-aksakalli/arxml-viewer/af943cf1c33f361260aa8a5d95fd46c52e2d5789/public/gif/simple-usage.gif -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | arxml viewer 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /public/test/TestApp.arxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BaseTypes 6 | 7 | 8 | float32 9 | FIXED_LENGTH 10 | 32 11 | NONE 12 | 32 13 | float 14 | 15 | 16 | float64 17 | FIXED_LENGTH 18 | 64 19 | NONE 20 | 64 21 | double 22 | 23 | 24 | sint16 25 | FIXED_LENGTH 26 | 16 27 | NONE 28 | 16 29 | short 30 | 31 | 32 | sint32 33 | FIXED_LENGTH 34 | 32 35 | NONE 36 | 32 37 | int 38 | 39 | 40 | sint8 41 | FIXED_LENGTH 42 | 8 43 | NONE 44 | 8 45 | signed char 46 | 47 | 48 | uint16 49 | FIXED_LENGTH 50 | 16 51 | NONE 52 | 16 53 | unsigned short 54 | 55 | 56 | uint32 57 | FIXED_LENGTH 58 | 32 59 | NONE 60 | 32 61 | unsigned int 62 | 63 | 64 | uint8 65 | FIXED_LENGTH 66 | 8 67 | NONE 68 | 8 69 | unsigned char 70 | 71 | 72 | void 73 | FIXED_LENGTH 74 | 32 75 | VOID 76 | void 77 | 78 | 79 | 80 | 81 | ImplDataTypes 82 | 83 | 84 | MultiStateBtnType 85 | TYPE_REFERENCE 86 | 87 | 88 | 89 | /ImplDataTypes/uint8 90 | 91 | 92 | 93 | RTE 94 | 95 | 96 | boolean 97 | VALUE 98 | 99 | 100 | 101 | /BaseTypes/uint8 102 | 103 | 104 | 105 | BSW 106 | 107 | 108 | float32 109 | VALUE 110 | 111 | 112 | 113 | /BaseTypes/float32 114 | 115 | 116 | 117 | BSW 118 | 119 | 120 | float64 121 | VALUE 122 | 123 | 124 | 125 | /BaseTypes/float64 126 | 127 | 128 | 129 | BSW 130 | 131 | 132 | sint16 133 | VALUE 134 | 135 | 136 | 137 | /BaseTypes/sint16 138 | 139 | 140 | 141 | BSW 142 | 143 | 144 | sint32 145 | VALUE 146 | 147 | 148 | 149 | /BaseTypes/sint32 150 | 151 | 152 | 153 | BSW 154 | 155 | 156 | sint8 157 | VALUE 158 | 159 | 160 | 161 | /BaseTypes/sint8 162 | 163 | 164 | 165 | BSW 166 | 167 | 168 | uint16 169 | VALUE 170 | 171 | 172 | 173 | /BaseTypes/uint16 174 | 175 | 176 | 177 | BSW 178 | 179 | 180 | uint32 181 | VALUE 182 | 183 | 184 | 185 | /BaseTypes/uint32 186 | 187 | 188 | 189 | BSW 190 | 191 | 192 | uint8 193 | VALUE 194 | 195 | 196 | 197 | /BaseTypes/uint8 198 | 199 | 200 | 201 | BSW 202 | 203 | 204 | void 205 | VALUE 206 | 207 | 208 | 209 | /BaseTypes/void 210 | 211 | 212 | 213 | BSW 214 | 215 | 216 | 217 | 218 | MappingSets 219 | 220 | 221 | MappingSet 222 | 223 | 224 | 225 | 226 | PortInterfaces 227 | 228 | 229 | ClientServer 230 | 231 | 232 | ModeSwitch 233 | 234 | 235 | SenderReceiver 236 | 237 | 238 | SrIf_SeatCtrlBtns 239 | false 240 | 241 | 242 | DE_HeightBtnState 243 | /ImplDataTypes/MultiStateBtnType 244 | 245 | 246 | DE_InclinceBtnState 247 | /ImplDataTypes/MultiStateBtnType 248 | 249 | 250 | DE_SlideBtnState 251 | /ImplDataTypes/MultiStateBtnType 252 | 253 | 254 | 255 | 256 | SrIf_SeatCtrlData 257 | false 258 | 259 | 260 | DE_Height 261 | /ImplDataTypes/uint8 262 | 263 | 264 | DE_Incline 265 | /ImplDataTypes/uint8 266 | 267 | 268 | DE_Slide 269 | /ImplDataTypes/uint8 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | SoftwareComponents 279 | 280 | 281 | HMI 282 | 283 | 284 | ppSeatCtrlBtn 285 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns 286 | 287 | 288 | rpSeatCtrlData 289 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlData 290 | 291 | 292 | 293 | 294 | Ibhv_HMI 295 | 296 | /MappingSets/MappingSet 297 | 298 | 299 | 300 | TE_HMI_MainFunction_100ms 301 | /SoftwareComponents/HMI/Ibhv_HMI/HMI_MainFunction 302 | 0.1 303 | 304 | 305 | NO-SUPPORT 306 | 307 | 308 | HMI_MainFunction 309 | 0.0 310 | false 311 | 312 | 313 | DRP_rpSeatCtrlData_DE_Height 314 | 315 | 316 | /SoftwareComponents/HMI/rpSeatCtrlData 317 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlData/DE_Height 318 | 319 | 320 | 321 | 322 | DRP_rpSeatCtrlData_DE_Incline 323 | 324 | 325 | /SoftwareComponents/HMI/rpSeatCtrlData 326 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlData/DE_Incline 327 | 328 | 329 | 330 | 331 | DRP_rpSeatCtrlData_DE_Slide 332 | 333 | 334 | /SoftwareComponents/HMI/rpSeatCtrlData 335 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlData/DE_Slide 336 | 337 | 338 | 339 | 340 | 341 | 342 | DSP_ppSeatCtrlBtn_DE_HeightBtnState 343 | 344 | 345 | /SoftwareComponents/HMI/ppSeatCtrlBtn 346 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_HeightBtnState 347 | 348 | 349 | 350 | 351 | DSP_ppSeatCtrlBtn_DE_InclinceBtnState 352 | 353 | 354 | /SoftwareComponents/HMI/ppSeatCtrlBtn 355 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_InclinceBtnState 356 | 357 | 358 | 359 | 360 | DSP_ppSeatCtrlBtn_DE_SlideBtnState 361 | 362 | 363 | /SoftwareComponents/HMI/ppSeatCtrlBtn 364 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_SlideBtnState 365 | 366 | 367 | 368 | 369 | HMI_MainFunction 370 | 371 | 372 | false 373 | 374 | 375 | 376 | 377 | Impl_HMI 378 | 379 | 380 | Code 381 | 382 | 383 | SWC.c 384 | SWSRC 385 | 386 | 387 | 388 | 389 | C 390 | 391 | ResourceConsumption 392 | 393 | 1.0.0 394 | 255 395 | /SoftwareComponents/HMI/Ibhv_HMI 396 | 397 | 398 | Impl_SeatManger 399 | 400 | 401 | Code 402 | 403 | 404 | SWC.c 405 | SWSRC 406 | 407 | 408 | 409 | 410 | C 411 | 412 | ResourceConsumption 413 | 414 | 1.0.0 415 | 255 416 | /SoftwareComponents/SeatManger/Ibhv_SeatManger 417 | 418 | 419 | SeatManger 420 | 421 | 422 | rpSeatCtrlBtn 423 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns 424 | 425 | 426 | 427 | 428 | Ibhv_SeatManger 429 | 430 | /MappingSets/MappingSet 431 | 432 | 433 | 434 | DRE_rpSeatCtrlBtn_DE_HeightBtnState 435 | /SoftwareComponents/SeatManger/Ibhv_SeatManger/SeatManger_SetHeight 436 | 437 | /SoftwareComponents/SeatManger/rpSeatCtrlBtn 438 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_HeightBtnState 439 | 440 | 441 | 442 | DRE_rpSeatCtrlBtn_DE_InclinceBtnState 443 | /SoftwareComponents/SeatManger/Ibhv_SeatManger/SeatManger_SetIncline 444 | 445 | /SoftwareComponents/SeatManger/rpSeatCtrlBtn 446 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_InclinceBtnState 447 | 448 | 449 | 450 | DRE_rpSeatCtrlBtn_DE_SlideBtnState 451 | /SoftwareComponents/SeatManger/Ibhv_SeatManger/SeatManger_SetSlide 452 | 453 | /SoftwareComponents/SeatManger/rpSeatCtrlBtn 454 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_SlideBtnState 455 | 456 | 457 | 458 | NO-SUPPORT 459 | 460 | 461 | SeatManger_SetHeight 462 | 0.0 463 | false 464 | 465 | 466 | DRP_rpSeatCtrlBtn_DE_HeightBtnState 467 | 468 | 469 | /SoftwareComponents/SeatManger/rpSeatCtrlBtn 470 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_HeightBtnState 471 | 472 | 473 | 474 | 475 | SeatManger_SetHeight 476 | 477 | 478 | SeatManger_SetIncline 479 | 0.0 480 | false 481 | 482 | 483 | DRP_rpSeatCtrlBtn_DE_InclinceBtnState 484 | 485 | 486 | /SoftwareComponents/SeatManger/rpSeatCtrlBtn 487 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_InclinceBtnState 488 | 489 | 490 | 491 | 492 | SeatManger_SetIncline 493 | 494 | 495 | SeatManger_SetSlide 496 | 0.0 497 | false 498 | 499 | 500 | DRP_rpSeatCtrlBtn_DE_SlideBtnState 501 | 502 | 503 | /SoftwareComponents/SeatManger/rpSeatCtrlBtn 504 | /PortInterfaces/SenderReceiver/SrIf_SeatCtrlBtns/DE_SlideBtnState 505 | 506 | 507 | 508 | 509 | SeatManger_SetSlide 510 | 511 | 512 | false 513 | 514 | 515 | 516 | 517 | 518 | 519 | Compositions 520 | 521 | 522 | TestAppComposition 523 | 524 | 525 | HMI 526 | /SoftwareComponents/HMI 527 | 528 | 529 | SeatManger 530 | /SoftwareComponents/SeatManger 531 | 532 | 533 | 534 | 535 | HMI_ppSeatCtrlBtn_SeatManger_rpSeatCtrlBtn 536 | 537 | /Compositions/TestAppComposition/HMI 538 | /SoftwareComponents/HMI/ppSeatCtrlBtn 539 | 540 | 541 | /Compositions/TestAppComposition/SeatManger 542 | /SoftwareComponents/SeatManger/rpSeatCtrlBtn 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | -------------------------------------------------------------------------------- /public/test/example.arxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | pkg 8 | 9 | 10 | tst002 11 | 12 | 13 | swc001 14 | 15 | 16 | in 17 | 18 | 19 | /pkg/interfaces/iRcv/e1 20 | NONE 21 | false 22 | 60.0 23 | false 24 | false 25 | NONE 26 | 27 | 28 | DefaultInitValue_e1 29 | /pkg/types/constants/C42 30 | 31 | 32 | 33 | 34 | /pkg/interfaces/iRcv/e2 35 | NONE 36 | false 37 | 60.0 38 | false 39 | false 40 | NONE 41 | 42 | 43 | DefaultInitValu_76a35ae5448e6270 44 | /pkg/types/constants/C0p89 45 | 46 | 47 | 48 | 49 | /pkg/interfaces/iRcv/e3 50 | NONE 51 | false 52 | 60.0 53 | false 54 | false 55 | NONE 56 | 57 | 58 | init 59 | /pkg/types/constants/ZERO 60 | 61 | 62 | 63 | 64 | /pkg/interfaces/iRcv/e4 65 | NONE 66 | false 67 | 60.0 68 | false 69 | false 70 | NONE 71 | 72 | 73 | DefaultInitValu_0147db48be8e2d8b 74 | /pkg/types/constants/CInit_array2 75 | 76 | 77 | 78 | 79 | /pkg/interfaces/iRcv/e5 80 | NONE 81 | false 82 | 60.0 83 | false 84 | false 85 | NONE 86 | 87 | 88 | DefaultInitValue_struc001 89 | /pkg/types/constants/CInit_struc001 90 | 91 | 92 | 93 | 94 | /pkg/interfaces/iRcv/e6 95 | NONE 96 | false 97 | 60.0 98 | false 99 | false 100 | NONE 101 | 102 | 103 | DefaultInitValue_Enum001 104 | /pkg/types/constants/RED 105 | 106 | 107 | 108 | 109 | /pkg/interfaces/iRcv 110 | 111 | 112 | out 113 | /pkg/interfaces/iSend 114 | 115 | 116 | pport 117 | /pkg/interfaces/iOperations 118 | 119 | 120 | rport 121 | /pkg/interfaces/iServer 122 | 123 | 124 | rmode 125 | /pkg/interfaces/iEcuMode 126 | 127 | 128 | 129 | 130 | bhv001 131 | 132 | /pkg/types/mapping/pkgDataTypeMappingsSet 133 | 134 | 135 | 136 | onesec 137 | /pkg/tst002/swc001/bhv001/step 138 | 0.1 139 | 140 | 141 | call_foo 142 | /pkg/tst002/swc001/bhv001/foo 143 | 144 | /pkg/tst002/swc001/pport 145 | /pkg/interfaces/iOperations/foo 146 | 147 | 148 | 149 | on_init 150 | /pkg/tst002/swc001/bhv001/init 151 | ON-ENTRY 152 | 153 | 154 | /pkg/tst002/swc001/rmode 155 | /pkg/interfaces/iEcuMode/currentMode 156 | /pkg/interfaces/EcuMode/Init 157 | 158 | 159 | 160 | 161 | NO-SUPPORT 162 | 163 | 164 | pim_one 165 | 166 | Int_n320to320 167 | /pkg/types/app/Int_n320to320 168 | 169 | 170 | 171 | 172 | init 173 | 0.0 174 | false 175 | init 176 | 177 | 178 | step 179 | 0.0 180 | false 181 | 182 | 183 | IN_input_e1 184 | 185 | 186 | /pkg/tst002/swc001/in 187 | /pkg/interfaces/iRcv/e1 188 | 189 | 190 | 191 | 192 | IN_input_e2 193 | 194 | 195 | /pkg/tst002/swc001/in 196 | /pkg/interfaces/iRcv/e2 197 | 198 | 199 | 200 | 201 | IN_input_e3 202 | 203 | 204 | /pkg/tst002/swc001/in 205 | /pkg/interfaces/iRcv/e3 206 | 207 | 208 | 209 | 210 | IN_input_e4 211 | 212 | 213 | /pkg/tst002/swc001/in 214 | /pkg/interfaces/iRcv/e4 215 | 216 | 217 | 218 | 219 | IN_input_e5 220 | 221 | 222 | /pkg/tst002/swc001/in 223 | /pkg/interfaces/iRcv/e5 224 | 225 | 226 | 227 | 228 | IN_input_e6 229 | 230 | 231 | /pkg/tst002/swc001/in 232 | /pkg/interfaces/iRcv/e6 233 | 234 | 235 | 236 | 237 | 238 | 239 | OUT_output_e1 240 | 241 | 242 | /pkg/tst002/swc001/out 243 | /pkg/interfaces/iSend/e1 244 | 245 | 246 | 247 | 248 | OUT_output_e2 249 | 250 | 251 | /pkg/tst002/swc001/out 252 | /pkg/interfaces/iSend/e2 253 | 254 | 255 | 256 | 257 | OUT_output_e3 258 | 259 | 260 | /pkg/tst002/swc001/out 261 | /pkg/interfaces/iSend/e3 262 | 263 | 264 | 265 | 266 | OUT_output_e4 267 | 268 | 269 | /pkg/tst002/swc001/out 270 | /pkg/interfaces/iSend/e4 271 | 272 | 273 | 274 | 275 | OUT_output_e5 276 | 277 | 278 | /pkg/tst002/swc001/out 279 | /pkg/interfaces/iSend/e5 280 | 281 | 282 | 283 | 284 | OUT_output_e6 285 | 286 | 287 | /pkg/tst002/swc001/out 288 | /pkg/interfaces/iSend/e6 289 | 290 | 291 | 292 | 293 | step 294 | 295 | 296 | foo 297 | NON-REENTRANTREENTRANCY-LEVEL@3/org.artop.aal.autosar4111.0 298 | 299 | true 300 | 301 | 302 | asyncCallBar 303 | 304 | 305 | /pkg/tst002/swc001/rport 306 | /pkg/interfaces/iServer/bar 307 | 308 | 0.1 309 | 310 | 311 | foo 312 | 313 | 314 | true 315 | 316 | 317 | 318 | 319 | swc002 320 | 321 | 322 | bhv 323 | 324 | 325 | twosec 326 | /pkg/tst002/swc002/bhv/step 327 | 0.2 328 | 329 | 330 | 331 | 332 | step 333 | 0.0 334 | false 335 | step 336 | 337 | 338 | true 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 35 | 36 | 83 | -------------------------------------------------------------------------------- /src/assets/chevron-down.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/chevron-right.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahmut-aksakalli/arxml-viewer/af943cf1c33f361260aa8a5d95fd46c52e2d5789/src/assets/icon.png -------------------------------------------------------------------------------- /src/background.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const {globalShortcut , ipcMain, Menu, MenuItem} = require('electron'); 4 | const { readFileSync, writeFile, readFile,createReadStream,statSync} = require('fs') // used to read files 5 | let parser = require('fast-xml-parser'); 6 | //let j2xParser = require("fast-xml-parser").j2xParser; 7 | const path = require('path'); 8 | var saxpath = require('saxpath'); 9 | var sax = require('sax'); 10 | 11 | import { app, protocol, BrowserWindow } from 'electron' 12 | import { createProtocol } from 'vue-cli-plugin-electron-builder/lib' 13 | import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer' 14 | const isDevelopment = process.env.NODE_ENV !== 'production' 15 | 16 | // Scheme must be registered before the app is ready 17 | protocol.registerSchemesAsPrivileged([ 18 | { scheme: 'app', privileges: { secure: true, standard: true } } 19 | ]) 20 | 21 | async function createWindow() { 22 | // Create the browser window. 23 | const win = new BrowserWindow({ 24 | show: false, 25 | minWidth : 700, 26 | minHeight: 600, 27 | icon: path.join(__static, '../src/assets/icon.png'), 28 | webPreferences: { 29 | nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION, 30 | enableRemoteModule: true 31 | } 32 | }); 33 | 34 | win.maximize(); 35 | win.show(); 36 | 37 | if (process.env.WEBPACK_DEV_SERVER_URL) { 38 | // Load the url of the dev server if in development mode 39 | await win.loadURL(process.env.WEBPACK_DEV_SERVER_URL) 40 | if (!process.env.IS_TEST) win.webContents.openDevTools() 41 | } else { 42 | createProtocol('app') 43 | // Load the index.html when not in development 44 | win.loadURL('app://./index.html') 45 | } 46 | 47 | win.on('focus', () => { 48 | globalShortcut.register('CommandOrControl+F', () => win.webContents.send('on-find')) 49 | }) 50 | win.on('blur', () => { 51 | globalShortcut.unregister('CommandOrControl+F') 52 | }) 53 | } 54 | 55 | // function to read from a json file 56 | function readAndParseXML (file_path,fileRequestEvent) { 57 | 58 | const parserOptions = { 59 | attributeNamePrefix : "@_", 60 | ignoreAttributes : false, 61 | ignoreNameSpace: false, 62 | parseNodeValue : false, 63 | parseAttributeValue : false 64 | }; 65 | const revparserOptions = { 66 | attributeNamePrefix : "@_", 67 | ignoreAttributes : false, 68 | ignoreNameSpace: false, 69 | format:true, 70 | supressEmptyNode: true, 71 | indentBy: "\t" 72 | }; 73 | try{ 74 | let stats = statSync(file_path); 75 | let fileSizeInMB = stats.size / (1024*1024); 76 | 77 | if(fileSizeInMB < 510){ 78 | 79 | const RootJson = parser.parse( 80 | readFileSync(file_path, 'utf8'), 81 | parserOptions); 82 | 83 | fileRequestEvent.returnValue = JSON.stringify(RootJson); 84 | } 85 | else { 86 | let fileStream = createReadStream(file_path); 87 | let saxParser = sax.createStream(true); 88 | let streamer = new saxpath.SaXPath(saxParser, '/AUTOSAR/AR-PACKAGES/AR-PACKAGE'); 89 | let streamJSON = {"AUTOSAR": { 90 | "AR-PACKAGES": { 91 | "AR-PACKAGE":[] 92 | } 93 | } 94 | }; 95 | 96 | streamer.on('match', function(arpackageXML) { 97 | 98 | let arpackageJSON = parser.parse(arpackageXML,parserOptions); 99 | streamJSON['AUTOSAR']['AR-PACKAGES']['AR-PACKAGE'].push(arpackageJSON['AR-PACKAGE']); 100 | }); 101 | 102 | streamer.on('end', function() { 103 | fileRequestEvent.returnValue = JSON.stringify(streamJSON); 104 | }); 105 | 106 | fileStream.pipe(saxParser); 107 | } 108 | 109 | 110 | } catch(err){ 111 | console.log(err.message); 112 | fileRequestEvent.returnValue = '{"FILE-READ-ERROR":"true"}'; 113 | } 114 | } 115 | 116 | // event listener for file open request 117 | ipcMain.on('file-open-request', (event, arg) => { 118 | readAndParseXML(arg,event) 119 | }) 120 | 121 | // Quit when all windows are closed. 122 | app.on('window-all-closed', () => { 123 | // On macOS it is common for applications and their menu bar 124 | // to stay active until the user quits explicitly with Cmd + Q 125 | if (process.platform !== 'darwin') { 126 | app.quit() 127 | } 128 | }) 129 | 130 | app.on('activate', () => { 131 | // On macOS it's common to re-create a window in the app when the 132 | // dock icon is clicked and there are no other windows open. 133 | if (BrowserWindow.getAllWindows().length === 0) createWindow() 134 | }) 135 | 136 | // This method will be called when Electron has finished 137 | // initialization and is ready to create browser windows. 138 | // Some APIs can only be used after this event occurs. 139 | app.on('ready', async () => { 140 | if (isDevelopment && !process.env.IS_TEST) { 141 | // Install Vue Devtools 142 | try { 143 | await installExtension(VUEJS_DEVTOOLS) 144 | } catch (e) { 145 | console.error('Vue Devtools failed to install:', e.toString()) 146 | } 147 | } 148 | createWindow() 149 | }) 150 | 151 | // Exit cleanly on request from parent process in development mode. 152 | if (isDevelopment) { 153 | if (process.platform === 'win32') { 154 | process.on('message', (data) => { 155 | if (data === 'graceful-exit') { 156 | app.quit() 157 | } 158 | }) 159 | } else { 160 | process.on('SIGTERM', () => { 161 | app.quit() 162 | }) 163 | } 164 | } 165 | -------------------------------------------------------------------------------- /src/components/arxmlnode.vue: -------------------------------------------------------------------------------- 1 | 43 | 44 | 117 | 118 | -------------------------------------------------------------------------------- /src/components/dropzone.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 61 | 62 | -------------------------------------------------------------------------------- /src/components/searcharea.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 69 | 70 | -------------------------------------------------------------------------------- /src/components/searchform.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 130 | 131 | -------------------------------------------------------------------------------- /src/components/searchresultstable.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 26 | 27 | -------------------------------------------------------------------------------- /src/func.js: -------------------------------------------------------------------------------- 1 | const {JSONPath} = require('jsonpath-plus'); 2 | const traverse = require('traverse'); 3 | 4 | exports.getShortNameFromJsonObject = (node) => 5 | { 6 | let shortname = ''; 7 | let result; 8 | 9 | // is it traverse object or not 10 | if(node.hasOwnProperty('keys')) 11 | { 12 | if(-1 !== node.keys.indexOf('SHORT-NAME')) 13 | shortname = node.node['SHORT-NAME']; 14 | } 15 | else 16 | { 17 | // if it's primitive type, then use value directly 18 | if ('string' === typeof(node) || 'number' === typeof(node) || 'boolean' === typeof(node)) { 19 | shortname = node.toString(); 20 | 21 | }else{ 22 | 23 | result = JSONPath({path: '$.SHORT-NAME', json: node}); 24 | if(0 !== result.length){ 25 | shortname = result[0]; 26 | }else{ 27 | result = JSONPath({path: '$.#text', json: node}); 28 | if(0 !== result.length){ 29 | shortname = result[0]; 30 | } 31 | } 32 | } 33 | } 34 | 35 | return shortname; 36 | } 37 | 38 | exports.getArPathFromTraverseObject = (node) => { 39 | let ar_path = ''; 40 | 41 | for (let i=0; i { 50 | let xpath = ''; 51 | 52 | xpath = xpath + JSONPath.toPointer(target_path); 53 | xpath = xpath.replace(/\//g,'.'); 54 | xpath = xpath.replace(/(?<=\d+)\./g,'].'); 55 | xpath = xpath.replace(/\.(?=\d+)/g,'['); 56 | 57 | return xpath; 58 | } 59 | 60 | exports.getTraverseObjectFromArPath = (obj, arpath) => { 61 | let result = null; 62 | let path_arr = []; 63 | let target_node = obj; 64 | let search_arr = arpath.split('/'); 65 | 66 | for( let i = 1; i < search_arr.length; i++){ 67 | let search_flag = false; 68 | traverse(target_node).forEach(function () { 69 | 70 | if("SHORT-NAME" === this.key) 71 | if(search_arr[i] === this.node){ 72 | for (const sub_path of this.parent.path){ 73 | if("parent" !== sub_path && "node" !== sub_path) 74 | path_arr.push(sub_path); 75 | } 76 | target_node = this; 77 | search_flag = true; 78 | this.stop(); 79 | } 80 | 81 | }); 82 | 83 | if(false === search_flag) 84 | break; 85 | if((i+1) === search_arr.length){ 86 | xpath = module.exports.getXPathFromTraversePathArr(path_arr); 87 | result = {"xpath": xpath, "traverseObj": target_node} 88 | } 89 | } 90 | 91 | return result; 92 | } -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | import func from './func.js' 5 | 6 | const {ipcRenderer} = require('electron'); 7 | const FindInPage = require('electron-find').FindInPage; 8 | 9 | 10 | /** 11 | * EVENT DESCRIPTION : main listener for DOMContentLoaded event 12 | */ 13 | document.addEventListener('DOMContentLoaded', (event) => { 14 | let findInPage = new FindInPage(require('electron').remote.getCurrentWebContents()); 15 | 16 | ipcRenderer.on('on-find', (e, args) => { 17 | findInPage.openFindWindow() 18 | }); 19 | }); 20 | 21 | Vue.config.productionTip = false 22 | Vue.prototype.$func = func; 23 | 24 | new Vue({ 25 | store, 26 | render: h => h(App) 27 | }).$mount('#app') 28 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | 4 | const {ipcRenderer} = require('electron'); 5 | 6 | Vue.use(Vuex) 7 | 8 | export default new Vuex.Store({ 9 | state: { 10 | arxmlFiles :[] 11 | }, 12 | 13 | getters: { 14 | allArxmlFiles : state => state.arxmlFiles, 15 | arxmlFilesCount: state => state.arxmlFiles.length, 16 | hasArxmlFile : (state) => (file_path) => { 17 | return state.arxmlFiles.findIndex(arxmlFile => arxmlFile.path == file_path); 18 | } 19 | }, 20 | 21 | actions: { 22 | async addArxmlFile({ commit }, file_path) { 23 | let response = ipcRenderer.sendSync('file-open-request', file_path); 24 | 25 | if(JSON.stringify({}) !== response) { 26 | response = JSON.parse(response); 27 | 28 | if (!response.hasOwnProperty("FILE-READ-ERROR")) 29 | commit('setArxmlFiles', {'path': file_path, 'data' : response}); 30 | } 31 | }, 32 | async removeArxmlFile({ commit }, file_index) { 33 | if(0 <= file_index) 34 | commit('removeArxmlFile', file_index); 35 | } 36 | }, 37 | 38 | mutations: { 39 | setArxmlFiles: (state, arxmlFile) => state.arxmlFiles.push(arxmlFile), 40 | removeArxmlFile: (state, index) => state.arxmlFiles.splice(index,1) 41 | } 42 | }) 43 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | configureWebpack: { 3 | devtool: 'source-map' 4 | }, 5 | pluginOptions: { 6 | electronBuilder: { 7 | nodeIntegration: true, 8 | builderOptions: { 9 | productName: "arxmlviewer", 10 | icon:"src/assets/icon.png", 11 | artifactName: "${productName}_setup.${ext}" 12 | 13 | } 14 | } 15 | } 16 | } --------------------------------------------------------------------------------