Asn.1 Question
Behdad Forghani
behdad.forghani@REDACTED
Thu Jul 2 20:01:03 CEST 2009
Hi,
I compiled LTE ASN.1 S1-AP specification with asn1ct. When I try to
decode a message, I get the error:
exception error: no match of right hand side value.
The line that produces the error is:
{Tmpterm1, Bytes3} = ?RT_PER:decode_open_type(Bytes2, [])
It seems to me the decoder is calling decode_open_type and passing an
empty list as the second parameter.
Tmpterm1, Bytes3 and Bytes2 are unbound. Is my analysis correct? Sorry,
I am very new to Erlang.
Is this a bug in Asn.1 compiler?
Is this the correct forum to ask this question?
I really appreciate if any help you can give me. I am just getting my
feet wet on Erlang.
I am using OTP R13B01.
The detailed error is:
** exception error: no match of right hand side value
<<0,0,3,0,8,0,3,0,0,0,0,67,0,6,5,37,245,64,0,1,0,26,0,12,
11>>
in function asn1rt_per_bin:getoctets_as_bin/2
in call from 'S1AP-PDU-Descriptions':dec_InitiatingMessage/2
called as 'S1AP-PDU-Descriptions':dec_InitiatingMessage({3,
<<0,12,64,36,
0,0,3,0,8,
0,3,0,0,0,
0,67,0,6,5,
37,245,64,
0,1,0,26,
...>>},
telltype)
in call from 'S1AP-PDU-Descriptions':'dec_S1AP-PDU'/2
in call from 'S1AP-PDU-Descriptions':decode_disp/2
The function is:
dec_InitiatingMessage'(Bytes,_) ->
%% attribute number 1 with type procedureCode
{Term1,Bytes1} = ?RT_PER:decode_integer(Bytes,[{'ValueRange',{0,255}}]),
%% attribute number 2 with type criticality
{Term2,Bytes2} =
?RT_PER:decode_enumerated(Bytes1,[{'ValueRange',{0,2}}],{reject,ignore,notify}),
%% attribute number 3 with type InitiatingMessage
{Tmpterm1, Bytes3} = ?RT_PER:decode_open_type(Bytes2, []),
Regards,
Behdad
More information about the erlang-questions
mailing list