Re: ASN.1 PER compile
Ferrer Guasch Vicent <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <[email protected]> |
> -----Original Message----- > From: [email protected] [mailto:[email protected]] 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 > <[email protected]> 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@V0:2/unsigned-unit:1,V1@Buf1/bitstring>> = Bytes1, > > > > {V1@V0,V1@Buf1} > > 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
S1AP.erl
(application/octet-stream, 743.7 KB) - not displayed