asn1ct:value/1 bug(s)?
Anders Nygren
anders.nygren@REDACTED
Wed Sep 9 18:12:04 CEST 2009
Hi
In the past, (R12B1 or something like that), I have been able to use
asn1ct:value/1 to generate random data according to an ASN.1 spec.
But it seems to not work anymore in R13B02.
Error 1:
In MAP-MS-DataTypes.asn there is
RAB-Id ::= INTEGER (1..maxNrOfRABs)
maxNrOfRABs INTEGER ::= 255
50> asn1ct:value('MAP-MS-DataTypes-v6','RAB-Id').
{error,
{{case_clause,
{1,
{'Externalvaluereference',736,'MAP-MS-DataTypes-v6',
maxNrOfRABs}}},
[{asn1ct_value,c_random,2},
{asn1ct,value,2},
{erl_eval,do_apply,5},
{shell,exprs,6},
{shell,eval_exprs,6},
{shell,eval_loop,3}]}}
Error 2:
In some cases it returns ok, but with errors in nested elements of the
result.
51> asn1ct:value('MAP-MS-DataTypes-v6','InsertSubscriberDataRes').
{ok,{'InsertSubscriberDataRes',
[{asn1_error,
{not_found,{'MAP-MS-DataTypes-v6','Ext-TeleserviceCode'}}}],
[{asn1_error,
{not_found,
{'MAP-MS-DataTypes-v6','Ext-BearerServiceCode'}}}],
{asn1_error,{not_found,{'MAP-MS-DataTypes-v6','SS-List'}}},
[1,0,1,1,1,0,1,1,1,0,1,1,1,0,1],
asn1_EMPTY,
[1],
{asn1_error,
{not_found,{'MAP-MS-DataTypes-v6','ExtensionContainer'}}},
undefined,
[1,0,1,1,1,0,1]}}
Error 3?:
Also in MAP-MS-DataTypes.asn
T-BcsmTriggerDetectionPoint ::= ENUMERATED {
termAttemptAuthorized (12),
... ,
tBusy (13),
tNoAnswer (14)}
52> asn1ct:value('MAP-MS-DataTypes-v6','T-BcsmTriggerDetectionPoint').
{ok,asn1_EMPTY}
Is asn1_EMPTY really a valid value for this type?
/Anders
More information about the erlang-bugs
mailing list