DataView.asn 1.01 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
TASTE-Dataview DEFINITIONS ::=
BEGIN

MyComplexType ::= SEQUENCE {
	a SEQUENCE { x INTEGER(0..255), y MyInteger }
}

MyComplexSeqOf ::= SEQUENCE(SIZE(2)) OF SEQUENCE { x INTEGER (0..255) }

MyComplexChoice ::= CHOICE { a SEQUENCE { x INTEGER (0..255) } }

EnableDisable ::= ENUMERATED {scrubon, scruboff}

MyRefSeqOf ::= SEQUENCE { seqof MySeqOf }

-- A few simple types to start with ASN.1
MyInteger   ::= INTEGER (-255..255)

MyReal	    ::= REAL (-10.0 .. 1000.0)

MyEnum	    ::= ENUMERATED { hello, world, howareyou }

MySeq	    ::= SEQUENCE {
		    a MyInteger,
		    b ENUMERATED { taste(1), welcomes(2), you(3) }
}

MyChoice    ::= CHOICE {
		    a BOOLEAN,
		    b MySeq
}

MySeqOf	    ::= SEQUENCE (SIZE (2)) OF MyEnum
MyPossiblyEmptySeqOf ::= SEQUENCE(SIZE(0..2)) OF INTEGER (1..2)

MySeqWithEmbeddedSeqOf ::= SEQUENCE {
    a SEQUENCE(SIZE(0..2)) OF BOOLEAN
}


MyOctStr    ::= OCTET STRING (SIZE (3))

-- Include an embedded choice
MyChoice2 ::= CHOICE {
    a BOOLEAN,
    b CHOICE {
	c BOOLEAN,
	d MyInteger
    }
}

END