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

SEQUENCESIZE(1..128, ...) creates invalid decoder/encoder #3

Open
MrMushroom opened this issue Apr 18, 2023 · 0 comments
Open

SEQUENCESIZE(1..128, ...) creates invalid decoder/encoder #3

MrMushroom opened this issue Apr 18, 2023 · 0 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@MrMushroom
Copy link
Collaborator

Issue

A defintion of SEQUENCESIZE(1..128, ...) can not be decoded/encoded (see CPM v2.1.1)[https://github.com/virtual-vehicle/vehicle_captain_its_asn1_specifications/blob/master/experimental/CPM-PDU-Descriptions.asn].

Setup

Generator: https://github.com/brchiu/asn1c.git (velichkov_s1ap_plus_option_group_plus_adding_trailing_ull)

Problem Description

Encoding of such a datatype leads into a bitshift of one to the left of the first decoded value after the start of the sequence (when compared to Wireshark as reference decoder).

Decoding of a valid CPM results into a bitshift to the right of the first decoded value after the start of the sequence (when compared to Wireshark as reference decoder).

Likely Cause

The additional "..." seems to be important and needs to be respected by the decoder/encoder. But this seems not be implemented into the Generator

Unsuccessful Workarounds

  • removing the "..." in the asn1 definition will not fix the problem. The newly generated code is exactly the same. Hence this issue is most likely part of the core components of the generator.

Possible Solutions

none

Status

If you want to use specifications of that type, we suggest to use another Generator for the messages. Thank you though for trying to opt for this FOSS!

@MrMushroom MrMushroom added bug Something isn't working wontfix This will not be worked on labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant