MeGaCo PropertyParm formatting question

Peter-Henry Mander <>
Wed Aug 21 12:12:19 CEST 2002

Hello everyone,

I've learnt and been using Erlang over the last couple of weeks to build 
a Gateway Emulator for testing purposes. So far it's been a successful 
project, with good results in staggeringly little time. But now I'm 
stuck and need some help, and I hope you'll forgive me if the answer is 

I'm having trouble when trying to construct a PropertyParm record. Up to 
now, all I needed to do was understand the ASN.1 specs and simply 
transfer that into records, and it all worked. Maybe I've misunderstood 
the ASN.1 for PropertyParm, or got the wrong idea about the 
corresponding record in Erlang.

Here's the ASN.1:
PropertyParm ::= SEQUENCE
         name                    PkgdName,
         value                   SEQUENCE OF OCTET STRING,
         extraInfo               CHOICE
                 relation        Relation,
                 range           BOOLEAN,
                 sublist         BOOLEAN
         } OPTIONAL,

And here's the offending code:
	PropParm = #'PropertyParm'{
		name = Name,
		value = Values,
	extraInfo = {sublist, true}
	extraInfo = {range, true}
	extraInfo = {relation, greaterThan}

My understanding is this:
Without extraInfo (since it's optional) using:

Name = "aName"
Value = "aValue"

should work, which it does. But when extraInfo = {range, true} I should 
supply exactly two values, so I assume that I should use:

Name = "aName"
Value = ["lower", "upper"]

but it doesn't work, and I get:


So what do I need to do for each case of extraInfo?


More information about the erlang-questions mailing list