DanielT / a2ltool

A tool to edit, merge and update a2l files
Apache License 2.0
46 stars 15 forks source link

a2ltool can't parse XCP settings in the test .a2l-file (attached). #22

Closed truecarfield closed 5 months ago

truecarfield commented 5 months ago

Hello,

a2ltool can't parse XCP settings in the test .a2l-file (attached). Here is the console output:

>>> ./a2ltool.exe --check --show-xcp ./TestXcpServer.a2l

XCP settings in ./TestXcpServer.a2l:
No XCP settings found in module TestXcpServer

Consistency check complete. No problems found.

Bests

TestXcpServer.zip

DanielT commented 5 months ago

Your file does not contain any XCP settings. It only has an A2ML block, which defines the layout for IF_DATA blocks. The file needs to have "/begin IF_DATA XCP ..."

DanielT commented 5 months ago

Actually, I just saw that you have that at the beginning of the file. It might just be an ordering issue. I will have to debug that when I have more time.

truecarfield commented 5 months ago

Actually, I just saw that you have that at the beginning of the file. It might just be an ordering issue. I will have to debug that when I have more time.

Thx for the quick reply, looking forward to your update :)

DanielT commented 5 months ago

I know what's going on now: parsing of your XCP settings fails, because the data model doesn't contain the option TIME_CORRELATION_PROPERTIES, or the OPTIONAL_LEVEL1_CMD GET_VERSION. If you comment out those two lines, you should see:

  XCP on UDP/IP
    address: 127.0.0.1
Port: 5555

I'll have to try and find out what these things are - I've never seen either of them before.

truecarfield commented 5 months ago

I know what's going on now: parsing of your XCP settings fails, because the data model doesn't contain the option TIME_CORRELATION_PROPERTIES, or the OPTIONAL_LEVEL1_CMD GET_VERSION. If you comment out those two lines, you should see:

  XCP on UDP/IP
    address: 127.0.0.1
Port: 5555

I'll have to try and find out what these things are - I've never seen either of them before.

Hello,

thanks again. The two options comes originally from here: https://github.com/vectorgrp/XCPlite/blob/master/C_Demo/CANape/C_Demo.a2l

bests

DanielT commented 5 months ago

I just updated the built-in XCP definition with the elements from XCP version 1.4 Now your file works without changes.