--/////////////////////////////////////////////////////////////////////////////
-- 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
--   Baranyi, Botond
--
--/////////////////////////////////////////////////////////////////////////////

--
-- Based on definitions used in S1AP
--

PDU-Definitions DEFINITIONS ::=
BEGIN

Priority        ::= ENUMERATED { low, normal, medium, high, urgent }

Conditionality  ::= ENUMERATED { optional, conditional, mandatory }

ProtocolElem-ID   ::= INTEGER (0..65535)


--IOC
PROTOCOL-ELEMS ::= CLASS
{
    &id             ProtocolElem-ID UNIQUE,
    &priority       Priority,
    &Value,
    &conditionality Conditionality
}
WITH SYNTAX
{
    ID                  &id
    PRIORITY            &priority
    TYPE                &Value
    CONDITIONALITY      &conditionality
}

--parameterized type
ProtocolElem-Field {PROTOCOL-ELEMS : ElemsSetParam} ::= SEQUENCE
{
    id                  PROTOCOL-ELEMS.&id            ({ElemsSetParam}),
    priority            PROTOCOL-ELEMS.&priority      ({ElemsSetParam}{@id}),
    val                 PROTOCOL-ELEMS.&Value         ({ElemsSetParam}{@id})
}


--Information objects
ies-Set-Element-1 PROTOCOL-ELEMS ::=
{
    ID 0
    PRIORITY low
    TYPE INTEGER
    CONDITIONALITY mandatory
}

ies-Set-Element-2 PROTOCOL-ELEMS ::=
{
    ID 1
    PRIORITY high
    TYPE IA5String
    CONDITIONALITY optional
}
--Information Object Set
Elems-Set PROTOCOL-ELEMS ::= { ies-Set-Element-1 | ies-Set-Element-2 }


--instantiation
ProtocolElem-Field1 ::= ProtocolElem-Field {{Elems-Set}}

ProtocolElem-Field2 ::= ProtocolElem-Field {{ies-Set-Element-2 }}

--Choice containing NULL
Price ::= CHOICE
{
  value REAL,
  invaluable NULL
}

--Sequence containing an object identifier and an ANY type
Object ::= SEQUENCE
{
  id OBJECT IDENTIFIER,
  data ANY
}

--Sequence containing an optional NULL field
HasNull ::= SEQUENCE
{
  theNull NULL OPTIONAL
}

END

