I've been twiddling around with asn1c to use it as part of my degree project which is related to the european variant of Car2X Communication.
At this stage, I can encode and decode messages with the methods you provided in the asn1c support code.
Xer_fprint and asn_fprint are working just fine,however, I'm unable to extract certain values from the decoded buffer manually.
For most of the values stored therein, this is pretty straight forward. Unfortunately, I did not accomplish to extract the values from the "vehicleCommonParameters" sequence from the snipped below:
I've been twiddling around with asn1c to use it as part of my degree project which is related to the european variant of Car2X Communication.
At this stage, I can encode and decode messages with the methods you provided in the asn1c support code.
Xer_fprint and asn_fprint are working just fine,however, I'm unable to extract certain values from the decoded buffer manually.
For most of the values stored therein, this is pretty straight forward. Unfortunately, I did not accomplish to extract the values from the "vehicleCommonParameters" sequence from the snipped below:
Decoding the message, I ended up with a data structure and a buffer in memory constructed like this:
Having a look into your data structure, my last attempt to access the OCTETString value in "text" was as follows
However, this did not do the trick. Any idea, how I can access data stored in multiple sequences like this?
I'm using asn1c V.0.9.22 with GNU G++ 4.6.2.
Instead of tValue use tValue, tValue, etc, up to protocolMsg.choice.coopAwareness.vehicleCommonParameters.list.length.
Good advice, cheers!
Just one hint - there is no attribute "length"; there is just the "size" attribute which rather gives the byte boundaries in bits.
Eg. this list carries exactly 40 elements. "size", unfortunately, returns 64 though. Might this be a bug?
Oh, hang on. My fault. "length" still does not exist, but "count" does - and my IDE's autocomplete just screwed it up….
Sorry about that.