virtual-vehicle / vehicle_captain_its_lib_c_cxx

Library for ETSI V2X messages
https://github.com/virtual-vehicle/vehicle_captain
BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

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

Closed MrMushroom closed 2 months ago

MrMushroom commented 1 year ago

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

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 commented 2 months ago

fixed by switching the parser generator