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 --*****************************************************************************
9 IO-based-message DEFINITIONS
15 --Types to be used in IO definitions
18 field2 OCTET STRING OPTIONAL
21 MyEnum ::= ENUMERATED { first, second, third, fourth, fifth }
25 &id INTEGER UNIQUE, -- id to distinguish the different IO instances
26 &OpenTypeField -- Open type field
28 WITH SYNTAX { ID &id TYPE &OpenTypeField }
30 -- Defining the information objects
31 myIo1 MY-CLASS ::= { ID 1 TYPE MySeq } -- defining the type MySeq for the open type field,
32 -- instances of the object shall contain a value of this type
34 myIo2 MY-CLASS ::= { ID 2 TYPE MyEnum }
36 myIo3 MY-CLASS ::= { ID 3 TYPE INTEGER }
38 myIo4 MY-CLASS ::= { ID 4 TYPE NULL }
40 -- Defining IO set to be used in message contraction
42 MyIOSet MY-CLASS ::= { myIo1 | myIo2 | myIo3 | myIo4 }
44 -- and now finally constructing the type
46 MyMessage ::= SEQUENCE {
47 id MY-CLASS.&id ({MyIOSet}), -- integer field, values constrained to one of
48 -- the value defined for an IO, member of the set
49 content MY-CLASS.&OpenTypeField ({MyIOSet} {@id})
50 -- open type field constrainedto the types defined for
51 -- the objects in the set; this is handled as an implicit
52 -- union by Titan and should be an anytype, i.e. using the
53 -- names of the types to select the given type.
57 a-message-id1-lower MyMessage ::= {
59 content mySeq : { field1 23, field2 '1234'H }
62 a-message-id2-lower MyMessage ::= {
64 content myEnum : third
67 a-message-id3-lower MyMessage ::= {
72 a-message-id4-lower MyMessage ::= {
77 -- Not supported values
78 a-message-id1-upper MyMessage ::= {
80 content MySeq : { field1 23, field2 '1234'H }
83 a-message-id2-upper MyMessage ::= {
85 content MyEnum : third
88 a-message-id3-upper MyMessage ::= {
93 a-message-id4-lower MyMessage ::= {