You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ESNACC for compiling multiple ASN source files to C code. For ease of understanding, I will explain the scenario here as succintly as possible:-
FileA.asn1 contains the following:-
FileA DEFINITIONS ::=
BEGIN
A ::= SEQUENCE
{
AContent [0] OCTET STRING (CONTAINING FileB.B)
}
END
FileB.asn1 contains the following:-
FileB DEFINITIONS ::=
BEGIN
B ::= SEQUENCE
{
BElem1 [0] INTEGER,
BElem2 [1] INTEGER
}
END
I used ESNACC to compile both files in one command. Upon analysing the C source files generated, I observed that the AContent field will be decoded as a constructed OCTET STRING (the data being received in the application guarantees that the field will be specified as constructed). This means that FileB does not come into the picture at all. I was hoping that AContent would be further decoded with a structure of FileB being filled, so that I can easily access the elements within. This does not seem to be the case.
I'm fairly new with ASN1, so please let me know if my understanding is wrong in any way.
Is ESNACC not capable of generating code for supporting CONTAINING keyword properly?
Are there other compilers that are able to do this?
Can this be done by using ESNACC in any way?
If this cannot be done using ESNACC, and I don't want to use any other compiler, how would I access the contents within AContent at runtime easily?
The text was updated successfully, but these errors were encountered:
Sorry for the late response. I don't believe this syntax would be correct. I think you can achieve this, however.
Something like:
FileA DEFINITIONS ::= BEGIN
IMPORT B from FileB;
A ::= SEQUENCE {
AContent [0] OCTET STRING (CONTAINING B)
}
END
Then I think you'll get a proper definition. Otherwise, you can always treat the object bits as containing B anyway (but it is programmatically enforced rather than being compiler enforced, in that case).
Hello,
I'm using ESNACC for compiling multiple ASN source files to C code. For ease of understanding, I will explain the scenario here as succintly as possible:-
FileA.asn1 contains the following:-
FileB.asn1 contains the following:-
I used ESNACC to compile both files in one command. Upon analysing the C source files generated, I observed that the
AContent
field will be decoded as a constructedOCTET STRING
(the data being received in the application guarantees that the field will be specified as constructed). This means thatFileB
does not come into the picture at all. I was hoping thatAContent
would be further decoded with a structure ofFileB
being filled, so that I can easily access the elements within. This does not seem to be the case.I'm fairly new with ASN1, so please let me know if my understanding is wrong in any way.
CONTAINING
keyword properly?AContent
at runtime easily?The text was updated successfully, but these errors were encountered: