[erlang-bugs] ASN.1 PER compile

Ferrer Guasch Vicent vicent.ferrerguasch@REDACTED
Mon Oct 27 12:21:28 CET 2014


> -----Original Message-----
> From: bgustavsson@REDACTED [mailto:bgustavsson@REDACTED] On Behalf
> Of Björn Gustavsson
> Sent: 27. lokakuuta 2014 11:21
> To: Ferrer Guasch Vicent
> Cc: erlang-bugs
> Subject: Re: [erlang-bugs] ASN.1 PER compile
> 
> On Sun, Oct 26, 2014 at 7:05 PM, Vicent Ferrer Guasch
> <vicent.ferrerguasch@REDACTED> wrote:
> > Hello,
> >
> > I am trying to compile the last S1AP (3GPP 36.413) ASN specifications
> > using asn1ct:compile/2 , but the generated source file is incorrect. I
> > think compile/2 has a problem with the table constraints using per
> > encoding i.e.
> >
> 
> Do you get an actual compilation error from the BEAM compiler?
> If so, please show the error messages.
> 

I don't get any errors when compiling, the problem appears when using the generated module. That's why I thought the @ were a problem.
When I try to decode a S1Setup message I obtain this error:

	> 'S1AP':decode('S1AP-PDU',Str).         
	{error,{asn1,{case_clause,[0,17,0,48,0,0,4,0,59,0,8,0,66,
	                           244,112,0,0,6,224,0,60,64,10|...]}}}

The test function:

	> asn1ct:test('S1AP','S1AP-PDU').  
	{error,
	    {asn1,
	        {encode,
	            {{'S1AP','S1AP-PDU',
	                 {successfulOutcome,
	                     {'SuccessfulOutcome',240,notify,<<"\n\topen_type">>}}},
	             {error,{asn1,function_clause}}}}}}

> The S1AP are included in our test suites, but we might not have the very
> latest version.
> 
> >
> > The generated code contains @, an example.
> >
> > <<V1@REDACTED:2/unsigned-unit:1,V1@REDACTED/bitstring>> = Bytes1,
> >
> > {V1@REDACTED,V1@REDACTED}
> 
> That is not a problem. @ is allowed in variable names.

Some of the functions are not indented, is that normal? 

> 
> /Bjorn
> 
> --
> Björn Gustavsson, Erlang/OTP, Ericsson AB

Vicent Ferrer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: S1AP.erl
Type: application/octet-stream
Size: 1203683 bytes
Desc: S1AP.erl
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20141027/955f838e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: S1AP.hrl
Type: application/octet-stream
Size: 45163 bytes
Desc: S1AP.hrl
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20141027/955f838e/attachment-0001.obj>


More information about the erlang-bugs mailing list