1 --*****************************************************************************
2 -- Copyright (c) 2000-2015 Ericsson Telecom AB
3 -- All rights reserved. This program and the accompanying materials
4 -- are made available under the terms of the Eclipse Public License v1.0
5 -- which accompanies this distribution, and is available at
6 -- http://www.eclipse.org/legal/epl-v10.html
7 --*****************************************************************************
19 -- Type definitions --
20 ----------------------
23 SeqOfInt ::= SEQUENCE OF INTEGER
26 SeqProduct ::= SEQUENCE {
29 id OCTET STRING OPTIONAL,
37 hexadecimal OCTET STRING
40 -- Choice containing all string types
41 AnyString ::= CHOICE {
42 generalstr GeneralString,
43 numericstr NumericString,
45 printablestr PrintableString,
46 universalstr UniversalString,
48 graphicstr GraphicString,
50 teletexstr TeletexString,
51 videotexstr VideotexString,
52 visiblestr VisibleString
55 -- Sequence of strings
56 ManyStrings ::= SEQUENCE OF AnyString
58 -- Set containing all of the above
61 numbers SET OF Number,
65 Priority ::= ENUMERATED { low, normal, medium, high, urgent }
67 Conditionality ::= ENUMERATED { optional, conditional, mandatory }
69 ProtocolElem-ID ::= INTEGER (0..65535)
72 PROTOCOL-ELEMS ::= CLASS
74 &id ProtocolElem-ID UNIQUE,
77 &conditionality Conditionality
84 CONDITIONALITY &conditionality
88 ProtocolElem-Field {PROTOCOL-ELEMS : ElemsSetParam} ::= SEQUENCE
90 id PROTOCOL-ELEMS.&id ({ElemsSetParam}),
91 priority PROTOCOL-ELEMS.&priority ({ElemsSetParam}{@id}),
92 val PROTOCOL-ELEMS.&Value ({ElemsSetParam}{@id})
96 -- Information objects
97 ies-Set-Element-1 PROTOCOL-ELEMS ::=
102 CONDITIONALITY mandatory
105 ies-Set-Element-2 PROTOCOL-ELEMS ::=
110 CONDITIONALITY optional
112 -- Information Object Set
113 Elems-Set PROTOCOL-ELEMS ::= { ies-Set-Element-1 | ies-Set-Element-2 }
117 ProtocolElem-Field1 ::= ProtocolElem-Field {{Elems-Set}}
119 ProtocolElem-Field2 ::= ProtocolElem-Field {{ies-Set-Element-2 }}
121 -- Choice containing NULL
128 -- Sequence containing an object identifier and an ANY type
131 id OBJECT IDENTIFIER,
135 -- Sequence containing an optional NULL field
138 theNull NULL OPTIONAL
141 -- Renaming basic ASN.1 types for use in TTCN-3
144 AsnVisibleString ::= VisibleString
148 -- Values and their encoding --
149 -------------------------------
152 c-ints SeqOfInt ::= { 1, 3, 6 }
154 c-ints-str VisibleString ::= "[1,3,6]"
157 c-product SeqProduct ::= {
164 c-product-str VisibleString ::= "{""name"":""TV"",""price"":250.000000,""id"":""1D65"",""available"":true}"
167 c-number Number ::= binary : '1100'B
169 c-number-str VisibleString ::= "{""binary"":""1100""}"
172 c-strings ManyStrings ::= {
173 generalstr : "General String <o",
174 numericstr : "1 457 664",
175 utf8str : "Doesn't actually contain non-ASCII characters",
176 printablestr : "hello",
177 universalstr : "not so universal, apparently",
179 ia5str : "one two three",
180 teletexstr : "Let's just bug out and call it even, OK?!",
181 videotexstr : "abc123;.",
182 visiblestr : "invisible"
185 c-strings-str VisibleString ::= "[{""generalstr"":""General String <o""},{""numericstr"":""1 457 664""},{""utf8str"":""Doesn't actually contain non-ASCII characters""},{""printablestr"":""hello""},{""universalstr"":""not so universal, apparently""},{""bmpstr"":""abc""},{""ia5str"":""one two three""},{""teletexstr"":""Let's just bug out and call it even, OK?!""},{""videotexstr"":""abc123;.""},{""visiblestr"":""invisible""}]"
188 c-set-val ComplexSet ::= {
195 hexadecimal : '16678D'H,
199 printablestr : "first",
204 c-set-val-str VisibleString ::= "{""product"":{""name"":""Headset"",""price"":28.500000,""available"":false},""numbers"":[{""hexadecimal"":""16678D""},{""decimal"":12}],""strings"":[{""printablestr"":""first""},{""numericstr"":""2""}]}"
208 id { joint-iso-itu-t remote-operations(4) informationObjects(5) version1(0) },
212 c-obj-str VisibleString ::= "{""id"":""2.4.5.0"",""data"":""DEADBEEF""}"
215 c-null HasNull ::= { theNull NULL }
216 c-not-null HasNull ::= {}
218 c-null-str VisibleString ::= "{""theNull"":null}"
219 c-not-null-str VisibleString ::= "{}"