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 -- Defining IO set to be used in message contraction
40 MyIOSet MY-CLASS ::= { myIo1 | myIo2 | myIo3 }
42 -- and now finally constructing the type
44 MyMessage ::= SEQUENCE {
45 id MY-CLASS.&id ({MyIOSet}), -- integer field, values constrained to one of
46 -- the value defined for an IO, member of the set
47 content MY-CLASS.&OpenTypeField ({MyIOSet} {@id})
48 -- open type field constrainedto the types defined for
49 -- the objects in the set; this is handled as an implicit
50 -- union by Titan and should be an anytype, i.e. using the
51 -- names of the types to select the given type.
55 a-message-id1-lower MyMessage ::= {
57 content mySeq : { field1 23, field2 '1234'H }
60 a-message-id2-lower MyMessage ::= {
62 content myEnum : third
65 a-message-id3-lower MyMessage ::= {
70 -- Not supported values
71 a-message-id1-upper MyMessage ::= {
73 content MySeq : { field1 23, field2 '1234'H }
76 a-message-id2-upper MyMessage ::= {
78 content MyEnum : third
81 a-message-id3-upper MyMessage ::= {