DataView.asn 605 Bytes
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
TASTE-Dataview DEFINITIONS ::=
BEGIN

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

MyReal	    ::= REAL (0.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

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

-- You can also declare variables (they will be visible in C, Ada and RTDS)
myVar	    MySeqOf	::= { hello, world }
myVar2	    MyChoice	::= a:TRUE

END