///////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2000-2019 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
///////////////////////////////////////////////////////////////////////////////
//
//  File:               PFCP_Test_Templates.ttcn
//  Description:        PFCP protocol module
//  Rev:                <RnXnn>
//  Prodnr:             CNL 113 875
//  Contact:            http://ttcn.ericsson.se
//  Reference:          3GPP TS 29.244 v15.1.0
//

module PFCP_Test_Templates {

import from PFCP_Types all;

template PDU_PFCP t_PDU_PFCP :=
{
  s_flag := '1'B,
  mp := '0'B,
  spare := '000'B,
  version := 1,
  message_type := 50,
  lengthIndicator := 355,
  seid := '0000000000000000'O,
  sequence_number := 1589249,
  spare2 := '0000'B,
  mp_or_spare := '0000'B,
  message_body :=
  {
    pfcp_session_establishment_request :=
    {
      node_id :=
      {
        elementIdentifier := 60,
        lengthIndicator := 5,
        node_id_type := 0,
        spare := '0000'B,
        node_id_value := '05000304'O
      },
      CP_F_SEID :=
      {
        elementIdentifier := 57,
        lengthIndicator := 13,
        v6 := '0'B,
        v4 := '1'B,
        spare := '000000'B,
        seid := '000000007A423860'O,
        ipv4_address := '05000304'O,
        ipv6_address := omit
      },
      create_PDR_list :=
      {
        {
          elementIdentifier := 1,
          lengthIndicator := 85,
          grouped_ie :=
          {
            pdr_id :=
            {
              elementIdentifier := 56,
              lengthIndicator := 2,
              rule_id := '0001'O
            },
            precedence :=
            {
              elementIdentifier := 29,
              lengthIndicator := 4,
              precedence_value := 255
            },
            pdi :=
            {
              elementIdentifier := 2,
              lengthIndicator := 38,
              grouped_ie :=
              {
                source_interface :=
                {
                  elementIdentifier := 20,
                  lengthIndicator := 1,
                  interfacevalue := 0,
                  spare := '0000'B
                },
                local_F_TEID :=
                {
                  elementIdentifier := 21,
                  lengthIndicator := 2,
                  v4 := '1'B,
                  v6 := '0'B,
                  ch := '1'B,
                  chid := '1'B,
                  spare := '0000'B,
                  teid := omit,
                  ipv4_address := omit,
                  ipv6_address := omit,
                  choose_id := '00'O
                },
                pdn_instance := omit,
                ue_ip_address :=
                {
                  elementIdentifier := 93,
                  lengthIndicator := 5,
                  v6 := '0'B,
                  v4 := '1'B,
                  sd := '0'B,
                  spare := '00000'B,
                  ipv4_address := '6A000002'O,
                  ipv6_address := omit
                },
                traffic_endpoint_id := omit,
                sdf_filter_list := omit,
                application_id :=
                {
                  elementIdentifier := 24,
                  lengthIndicator := 14,
                  application_id := '6170706C69636174696F6E323535'O
                },
                ethernet_packet_filter_list := omit,
                qfi_list := omit
              }
            },
            outer_header_removal :=
            {
              elementIdentifier := 95,
              lengthIndicator := 1,
              ohc_description := 0
            },
            FAR_ID_list :=
            {
              {
                elementIdentifier := 108,
                lengthIndicator := 4,
                id_value := 1
              }
            },
            uRR_ID_list :=
            {
              {
                elementIdentifier := 81,
                lengthIndicator := 4,
                id_value := 1
              }
            },
            qER_ID_list :=
            {
              {
                elementIdentifier := 109,
                lengthIndicator := 4,
                id_value := 1
              }
            },
            activate_predefined_rules := omit
          }
        },
        {
          elementIdentifier := 1,
          lengthIndicator := 74,
          grouped_ie :=
          {
            pdr_id :=
            {
              elementIdentifier := 56,
              lengthIndicator := 2,
              rule_id := '0002'O
            },
            precedence :=
            {
              elementIdentifier := 29,
              lengthIndicator := 4,
              precedence_value := 255
            },
            pdi :=
            {
              elementIdentifier := 2,
              lengthIndicator := 32,
              grouped_ie :=
              {
                source_interface :=
                {
                  elementIdentifier := 20,
                  lengthIndicator := 1,
                  interfacevalue := 1,
                  spare := '0000'B
                },
                local_F_TEID := omit,
                pdn_instance := omit,
                ue_ip_address :=
                {
                  elementIdentifier := 93,
                  lengthIndicator := 5,
                  v6 := '0'B,
                  v4 := '1'B,
                  sd := '1'B,
                  spare := '00000'B,
                  ipv4_address := '6A000002'O,
                  ipv6_address := omit
                },
                traffic_endpoint_id := omit,
                sdf_filter_list := omit,
                application_id :=
                {
                  elementIdentifier := 24,
                  lengthIndicator := 14,
                  application_id := '6170706C69636174696F6E323535'O
                },
                ethernet_packet_filter_list := omit,
                qfi_list := omit
              }
            },
            outer_header_removal := omit,
            FAR_ID_list :=
            {
              {
                elementIdentifier := 108,
                lengthIndicator := 4,
                id_value := 2
              }
            },
            uRR_ID_list :=
            {
              {
                elementIdentifier := 81,
                lengthIndicator := 4,
                id_value := 1
              }
            },
            qER_ID_list :=
            {
              {
                elementIdentifier := 109,
                lengthIndicator := 4,
                id_value := 1
              }
            },
            activate_predefined_rules := omit
          }
        }
      },
      create_FAR_list :=
      {
        {
          elementIdentifier := 3,
          lengthIndicator := 28,
          grouped_ie :=
          {
            far_id :=
            {
              elementIdentifier := 108,
              lengthIndicator := 4,
              id_value := 1
            },
            apply_action :=
            {
              elementIdentifier := 44,
              lengthIndicator := 1,
              drop := '0'B,
              forw := '1'B,
              buff := '0'B,
              nocp := '0'B,
              dupl := '0'B,
              spare := '000'B
            },
            forwarding_parameters :=
            {
              elementIdentifier := 4,
              lengthIndicator := 11,
              grouped_ie :=
              {
                destination_interface :=
                {
                  elementIdentifier := 42,
                  lengthIndicator := 1,
                  interface_value := 1,
                  spare := '0000'B
                },
                pdn_Instance := omit,
                redirect_information := omit,
                outer_header_creation := omit,
                transport_level_marking :=
                {
                  elementIdentifier := 30,
                  lengthIndicator := 2,
                  ToS_traffic_class := '28FF'O
                },
                forwarding_policy := omit,
                header_enrichment := omit,
                traffic_endpoint_ID := omit
              }
            },
            duplicating_parameters := omit,
            bar_id := omit
          }
        },
        {
          elementIdentifier := 3,
          lengthIndicator := 42,
          grouped_ie :=
          {
            far_id :=
            {
              elementIdentifier := 108,
              lengthIndicator := 4,
              id_value := 2
            },
            apply_action :=
            {
              elementIdentifier := 44,
              lengthIndicator := 1,
              drop := '0'B,
              forw := '1'B,
              buff := '0'B,
              nocp := '0'B,
              dupl := '0'B,
              spare := '000'B
            },
            forwarding_parameters :=
            {
              elementIdentifier := 4,
              lengthIndicator := 25,
              grouped_ie :=
              {
                destination_interface :=
                {
                  elementIdentifier := 42,
                  lengthIndicator := 1,
                  interface_value := 0,
                  spare := '0000'B
                },
                pdn_Instance := omit,
                redirect_information := omit,
                outer_header_creation :=
                {
                  elementIdentifier := 84,
                  lengthIndicator := 10,
                  ohc_description_oct5 := '00000001'B,
                  ohc_description_oct6 := '00000000'B,
                  teid := 'B10A0A0E'O,
                  ipv4 := '0B000183'O,
                  ipv6 := omit,
                  udp_port := omit
                },
                transport_level_marking :=
                {
                  elementIdentifier := 30,
                  lengthIndicator := 2,
                  ToS_traffic_class := '28FF'O
                },
                forwarding_policy := omit,
                header_enrichment := omit,
                traffic_endpoint_ID := omit
              }
            },
            duplicating_parameters := omit,
            bar_id := omit
          }
        }
      },
      create_URR_list :=
      {
        {
          elementIdentifier := 6,
          lengthIndicator := 32,
          grouped_ie :=
          {
            urr_id :=
            {
              elementIdentifier := 81,
              lengthIndicator := 4,
              id_value := 1
            },
            measurement_method :=
            {
              elementIdentifier := 62,
              lengthIndicator := 1,
              durat := '0'B,
              volum := '1'B,
              event := '0'B,
              spare := '00000'B
            },
            reporting_triggers :=
            {
              elementIdentifier := 37,
              lengthIndicator := 2,
              perio := '1'B,
              volth := '1'B,
              timth := '0'B,
              quhti := '0'B,
              start_ := '0'B,
              stop_ := '0'B,
              droth := '0'B,
              liusa := '1'B,
              volqu := '0'B,
              timqu := '0'B,
              envcl := '0'B,
              spare := '00000'B
            },
            measurement_period := omit,
            volume_threshold :=
            {
              elementIdentifier := 31,
              lengthIndicator := 9,
              tovol := '1'B,
              ulvol := '0'B,
              dlvol := '0'B,
              spare := '00000'B,
              total_volume := 5120000,
              uplink_volume := omit,
              downlink_volume := omit
            },
            volume_quota := omit,
            time_threshold := omit,
            time_quota := omit,
            quota_holding_time := omit,
            dropped_dl_traffic_threshold := omit,
            monitoring_time := omit,
            subsequent_volume_threshold := omit,
            subsequent_time_threshold := omit,
            subsequent_volume_quota := omit,
            subsequent_time_quota := omit,
            inactivity_detection_time := omit,
            linked_urr_id := omit,
            measurement_information := omit,
            time_qouta_mechanism := omit,
            aggregated_urrs := omit
          }
        }
      },
      create_QER_list :=
      {
        {
          elementIdentifier := 7,
          lengthIndicator := 27,
          grouped_ie :=
          {
            qer_id :=
            {
              elementIdentifier := 109,
              lengthIndicator := 4,
              id_value := 1
            },
            qer_correlation_id := omit,
            gate_status :=
            {
              elementIdentifier := 25,
              lengthIndicator := 1,
              dl_gate := 0,
              ul_gate := 0,
              spare := '0000'B
            },
            mbr :=
            {
              elementIdentifier := 26,
              lengthIndicator := 10,
              ul_mbr := '0000001000'O,
              dl_mbr := '0000001000'O
            },
            gbr := omit,
            packet_rate := omit,
            dl_transport_level_marking := omit,
            qfi := omit,
            rqi := omit
          }
        }
      },
      create_BAR := omit,
      create_traffic_endpoint_list := omit,
      pdn_type :=
      {
        elementIdentifier := 113,
        lengthIndicator := 1,
        pdn_type := 1,
        spare := '00000'B
      },
      node_list := omit,
      up_inactivity_timer := omit
    }
  }
};

}  // end of module
