-
Notifications
You must be signed in to change notification settings - Fork 593
Description
I am working with asn1c for half a year meanwhile. It's an excellent tool. Many thanks for it.
I may have found a generator bug now. The (ETSI ITS) DENM ASN.1 spec (attached) has a definition:
ReferenceDenms ::= SEQUENCE SIZE (1..8, ...) OF ActionID
It carries the extension marker. ActionID is a sequence of two elements, a complex type. In this combination it appears to be the only one of this kind in the entire DENM ASN.1 spec (and the imported ITS Common spec, included as integrated part in the attachment here).
In the C code produced by the asn1c generator for PER constraints I get
asn_per_constraints_t asn_PER_type_ReferenceDenms_constr_1 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */,
0, 0 /* No PER value map */
};
I encoded with asn1c UPER and I tried to decode with http://asn1-playground.oss.com/ without success. ReferenceDenms (RoadworksContainer in AlacarteContainer) and everything hereafter is out of sync and asn1-playground reports an error.
I then manually added the extension flag:
asn_per_constraints_t asn_PER_type_ReferenceDenms_constr_1 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 1, 8 } /* (SIZE(1..8)) */,
0, 0 /* No PER value map */
};
And now it all works, asn1-playground is happy.