Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CPM (TS102894-2v211) to Vanetza #199

Closed
wants to merge 0 commits into from

Conversation

diogopjesus
Copy link

@diogopjesus diogopjesus commented Sep 14, 2023

This is a possible solution to add the new CPM format as described in TS102894-2v211.
"its2" might be changed to a more appropriate name.
This is a straightforward solution to keep multiple versions of the Common Data Dictionary (CDD) and Collective Perception Message (CPM), without changing the previously generated code from older versions.

@diogopjesus diogopjesus changed the title Add CPM (TS102894-2v211) Add CPM (TS102894-2v211) to Vanetza Sep 14, 2023
@riebl
Copy link
Owner

riebl commented Sep 17, 2023

I like the idea of having an "its2" ASN.1 target with all the message formats of ITS release 2. Unfortunately, the "classic" CAM and DENM are not yet updated, i.e. their latest release still refers to CDD 2 whereas the latest CDD is 3.1.
I had no closer look at the CDD changes yet, but I would expect them to be backward-compatible; otherwise, the whole ASN.1 story gets absurd.
Since one cannot mix "its" and "its2" in a single executable, I would like "its2" to behave as drop-in replacement of "its". At least CAMs and DENMs should be supported by "its2", ideally also MAPEM, SPATEM, RTCMEM etc.

@diogopjesus
Copy link
Author

Hi @riebl,
The problem with the CDD changes is that some fields with the same name are currently declared in multiple asn1 files, like the Basic Container on the currently available CAM and on the newest CDD. This fields would be renamed with a prefix attached to its original name when generating code from these two asn1 files to the same directory. We would have CAM-PDU-Descriptions_BasicContainer.h and ITS-Container_BasicContainer.h inside its.

@riebl
Copy link
Owner

riebl commented Oct 5, 2023

I have just noticed that you have also slightly patched the original CPM ASN.1 source, haven't you?

Edit: I have tried the most recent version of @mouse07410's asn1c (mouse07410/asn1c@75cc775) but it also fails with ASN.1 grammar parse error near [...]/vanetza/asn1/TS103324v211-CPM-PDU-Descriptions.asn:11 (token "WITH"): syntax error. This is quite a pity: Either patch the original ASN.1 sources just as @diogopjesus did or we need to enhance asn1c.

@v0-e
Copy link
Contributor

v0-e commented Oct 26, 2023

Edit: I have tried the most recent version of @mouse07410's asn1c (mouse07410/asn1c@75cc775) but it also fails with ASN.1 grammar parse error near [...]/vanetza/asn1/TS103324v211-CPM-PDU-Descriptions.asn:11 (token "WITH"): syntax error. This is quite a pity: Either patch the original ASN.1 sources just as @diogopjesus did or we need to enhance asn1c.

This fork seems to be able to parse the original CPM ASN.1 source.

@riebl
Copy link
Owner

riebl commented Oct 29, 2023

Thanks for your hint @v0-e, I will give it a try!

@mouse07410
Copy link

mouse07410 commented Nov 1, 2023

@v0-e would you care to submit a PR to add the missing capability here?

@riebl
Copy link
Owner

riebl commented Nov 30, 2023

See #209 for the follow-up PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants