--/////////////////////////////////////////////////////////////////////////////
-- Copyright (c) 2000-2021 Ericsson Telecom AB
-- All rights reserved. This program and the accompanying materials
-- are made available under the terms of the Eclipse Public License v2.0
-- which accompanies this distribution, and is available at
-- https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
--
-- Contributors:
--   Balasko, Jeno
--   Kulcsar, Endre
--   Raduly, Csaba
--   Szabados, Kristof
--
--/////////////////////////////////////////////////////////////////////////////
Test332A --Note that only &TypeField and &fixedTypeValueField are supported in May

DEFINITIONS

AUTOMATIC TAGS

::=
BEGIN

ASN1-Type1 ::= INTEGER

ASN1-Type2 ::= BOOLEAN

ASN1-Type3 ::= BIT STRING

ASN1-Type4 ::= OCTET STRING



-- an object class example
MY-CLASS-1 ::= CLASS
{
&TypeField OPTIONAL,
&fixedTypeValueField   ASN1-Type1   UNIQUE OPTIONAL

-- The following are not supported:
--&variableTypeValueField         &TypeField   OPTIONAL,
--&FixedTypeValueSetField         ASN1-Type2,
--&VariableTypeValueSetField      &TypeField   OPTIONAL,
--&objectField                    OBJECTCLASS1 OPTIONAL,
--&ObjectSetField                 OBJECTCLASS1 OPTIONAL
}
WITH SYNTAX
{
 [FIELDA &TypeField]
 [FIELDB   &fixedTypeValueField]
}


myObject1 MY-CLASS-1 ::= {FIELDA ASN1-Type2 FIELDB 5}


myObject2 MY-CLASS-1 ::= {FIELDA ASN1-Type3  FIELDB 2 }


myObject3 MY-CLASS-1 ::= {FIELDA ASN1-Type4  FIELDB 3 }


MyObjectSet1 MY-CLASS-1 ::= { myObject1 | myObject2 | myObject3}


MyBigMessageType1 ::= SEQUENCE

{
field1 myObject1.&TypeField  ({MyObjectSet1})            -- ASN1-Type2
,field2 MY-CLASS-1.&fixedTypeValueField ({MyObjectSet1})  -- ASN1-Type1
}

myBigMessage1 MyBigMessageType1 ::=
{
field1 TRUE
,field2 myObject1.&fixedTypeValueField    -- 5
}


MyBigMessageType2 ::= SEQUENCE

{
field1 myObject2.&TypeField ({MyObjectSet1})             --  ASN1-Type3
,field2 MY-CLASS-2.&fixedTypeValueField ({MyObjectSet1}) --  ASN1-Type1
}

myBigMessage2 MyBigMessageType2 ::=
{
field1 '010101'B
,field2  myObject2.&fixedTypeValueField  -- 2
}

MyBigMessageType3 ::= SEQUENCE

{
field1 myObject3.&TypeField ({MyObjectSet1})             --  ASN1-Type4
,field2 MY-CLASS-3.&fixedTypeValueField ({MyObjectSet1}) --  ASN1-Type1
}

myBigMessage3 MyBigMessageType3 ::=
{
field1 'FFFF'H,
field2  myObject3.&fixedTypeValueField  -- 3
}



END

