Advertisements
The following post is for the https://lionet.info/asn1c/ (repository: https://github.com/vlm/asn1c/)
When trying to link an ASN.1
structure that uses a SET OF
, with support for Unaligned Packed Encoding Rules (UPER
), we get the following error: undefined reference to 'SET_OF_encode_uper'
.
Unfortunately, there is currently no solution for this problem, so we replaced the SET OF
with a SEQUENCE OF
.
The
SEQUENCE OF
type is the list (array) of simple or constructed types. TheSET OF
type models the bag of structures. It resembles theSEQUENCE OF
type, but the order is not important: i.e. the elements may arrive in the order which is not necessarily the same as the in-memory order on the remote machines.
Original (problematic) code
Elements ::= SEQUENCE { property INTEGER, objects SET OF object }
Updated (working) code
Elements ::= SEQUENCE { property INTEGER, objects SEQUENCE OF object }