dv1.asn 1.29 KB
Newer Older
Maxime Perrotin's avatar
Maxime Perrotin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
TASTE-Dataview DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;

MyData ::= SEQUENCE(SIZE(1..10)) OF SEQUENCE {
   a SEQUENCE (SIZE(10)) OF INTEGER (0..255),
   b ENUMERATED { enum-one, enum-two }
}

Type-SingleInt ::= T-UInt8
Type-SingleBool ::= T-Boolean
Type-SingleReal ::= REAL (-5.0 .. 5.0)
Type-SingleEnum ::= ENUMERATED { enum-one(4), enum-two(2) }
Type-SingleString ::= OCTET STRING (SIZE(0..20))

Type-SingleChoice ::= CHOICE {
Maxime Perrotin's avatar
Maxime Perrotin committed
17
   choice-A Type-SingleInt,
18
19
   choice-B Type-SingleBool,
   choice-C ENUMERATED {enum-ONE, enum-TWO, enum-THREE}
Maxime Perrotin's avatar
Maxime Perrotin committed
20
}
Maxime Perrotin's avatar
Maxime Perrotin committed
21
22
23
24

Type-SimpleSeq ::= SEQUENCE {
   item-a Type-SingleInt,
   item-b Type-SingleBool,
Maxime Perrotin's avatar
Maxime Perrotin committed
25
   item-C Type-SingleEnum,
Maxime Perrotin's avatar
Maxime Perrotin committed
26
27
28
   item-d Type-SingleString
}

Maxime Perrotin's avatar
Maxime Perrotin committed
29
Type-SingleSeqOf ::= SEQUENCE (SIZE (0..5)) OF INTEGER (0..255)
30
31
Type-TinySeqOf ::= SEQUENCE (SIZE (2)) OF BOOLEAN
Type-TinySeqOf2::= SEQUENCE (SIZE (0..2)) OF INTEGER (0..5)
Maxime Perrotin's avatar
Maxime Perrotin committed
32

Maxime Perrotin's avatar
Maxime Perrotin committed
33
34
35
Type-Seq ::= SEQUENCE {
   item-a Type-SingleReal,
   item-b Type-SingleChoice,
Maxime Perrotin's avatar
Maxime Perrotin committed
36
   item-C MyData,
Maxime Perrotin's avatar
Maxime Perrotin committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
   item-d Type-SingleString
}

END

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