I am afraid I have to disappoint you. This is a particularly example of what is
commonly known as a referential constraint. We had discussions a few years ago
on adding full referential constraint functionality to ASN.1, but we did no
progress it, and there is currently no formal support for this sort of thing.
The best you can do is to use a USER-DEFINED constraint, which will cause most
encoders/decoders to call the application at run-time to determine if the
constraint is satisfied.
John L
Guillaume Martin wrote:
Hi,
I'd like to express constrained values such the following, where "c" has
the same value as "a".
The problem is the value of "a" is unkown until the runtime.
A ::= INTEGER( 1 | 2 )
MySequence ::= SEQUENCE {
a A,
b INTEGER,
c A(a)
}
Is it possible and is it the right way to do ?
Thanks.
Guillaume Martin
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1
--
Prof John Larmouth
Larmouth T&PDS Ltd
(Training and Protocol Development Services Ltd)
1 Blueberry Road
Bowdon [EMAIL PROTECTED]
Cheshire WA14 3LS
England
Tel: +44 161 928 1605 Fax: +44 161 928 8069
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1