TASTE-BasicTypes DEFINITIONS ::= BEGIN -- Set of TASTE predefined basic types T-Int32 ::= INTEGER (-2147483648 .. 2147483647) T-UInt32 ::= INTEGER (0 .. 4294967295) T-Int8 ::= INTEGER (-128 .. 127) T-UInt8 ::= INTEGER (0 .. 255) T-Boolean ::= BOOLEAN END TASTE-Dataview DEFINITIONS ::= BEGIN IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes; TASTE-Boolean ::= BOOLEAN MyInt ::= INTEGER (0..255) MySeqOf ::= SEQUENCE (SIZE (0..2)) OF BOOLEAN MySeq ::= SEQUENCE { foo BOOLEAN, bar BOOLEAN OPTIONAL } MyChoice ::= CHOICE { hop BOOLEAN } Seq-With-Optional ::= SEQUENCE { a BOOLEAN, b BOOLEAN OPTIONAL, c INTEGER (0..255) OPTIONAL, d MyInt OPTIONAL, e SEQUENCE (SIZE (2)) OF MyInt OPTIONAL, f MySeq, g SEQUENCE { huhu BOOLEAN OPTIONAL, b BOOLEAN }, h MySeqOf, ii CHOICE { x BOOLEAN, y BOOLEAN } OPTIONAL, jj CHOICE { uiop BOOLEAN }, k MyChoice } -- ASN.1 Type definitions must start with an uppercase -- Field names in records (SEQUENCE) must start with a lowercase -- Underscores are not allowed: use dash (hyphen) -- Simple types: -- MyInteger ::= INTEGER (0..255) -- MyReal ::= REAL (0.0 .. 1000.0) -- MyBool ::= BOOLEAN -- MyEnum ::= ENUMERATED { hello, world, how-are-you } -- Complex types: -- MySeq ::= SEQUENCE { -- input-data MyInteger, -- output-data MyInteger, -- validity ENUMERATED { valid, invalid } -- } -- -- MyChoice ::= CHOICE { -- a BOOLEAN, -- b MySeq -- } -- -- MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum -- -- MyOctStr ::= OCTET STRING (SIZE (3)) -- -- -- You can also declare constants -- myVar MySeqOf ::= { hello, world } END