Skip to content

ETSI ITS DENM ReferenceDenms extension flag problem #290

@MemoTrap

Description

@MemoTrap

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.

ITS DENM v1.2.2.asn.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions