DiameterRfRo_Templates.ttcn 313 KB
Newer Older
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.223 Tariff-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Tariff_Information_AVP mw_tariff_Information_AVP(
                                                                                template (present) Current_Tariff_AVP p_current_Tariff := ?
            ) := { 
                aVP_Header          := mw_aVP_HeaderVid_Mbit1(c_tariff_Information_AVP_Code, ?, c_vendId3gpp),
                current_Tariff      := p_current_Tariff,
                tariff_Time_Change  := *,
                next_Tariff         := *
            } // End of template mw_tariff_Information_AVP 
            
            /**
             * @desc The Unit-Cost receive template 
             * @param p_value_Digits TODO
             * @param p_exponent     TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.239 Unit-Cost AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Unit_Cost_AVP mw_unit_Cost_AVP(
                                                              template (present) Value_Digits_AVP   p_value_Digits := ?,
                                                              template Exponent_AVP                 p_exponent := *
            ) := { 
                aVP_Header      := mw_aVP_HeaderVid_Mbit1(c_unit_Cost_AVP_Code, ?, c_vendId3gpp),
                value_Digits    := p_value_Digits,
                exponent        := p_exponent
            } // End of template mw_unit_Cost_AVP
            
            /**
             * @desc The Local-Sequence-Number receive template
             * @param p_seq_number   Holds the service data container sequence number
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.93  Local-Sequence-Number AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present)  Local_Sequence_Number_AVP mw_local_Sequence_Number_AVP(
                                                                                       template (present) UInt32 p_seq_number := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_local_Sequence_Number_AVP_Code, 4, c_vendId3gpp),
                seq_number  := p_seq_number
            } // End of template mw_local_Sequence_Number_AVP
            
            /**
             * @desc The Incremental-Cost receive template
             * @param p_value_Digits TODO
             * @param p_exponent     TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.70 Incremental-Cost AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Incremental_Cost_AVP mw_incremental_Cost_AVP(
                                                                            template (present) Value_Digits_AVP p_value_Digits := ?,
                                                                            template Exponent_AVP               p_exponent := *
            ) := { 
                aVP_Header      := mw_aVP_HeaderVid_Mbit1(c_incremental_Cost_AVP_Code, ?, c_vendId3gpp),
                value_Digits    := p_value_Digits,
                exponent        := p_exponent
            } // End of template mw_incremental_Cost_AVP
            
            /**
             * @desc The SGW-Change AVP receive template
             * @param p_aVP_Data     Accounting Request type
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.200 SGW-Change AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (present) SGW_Change_AVP mw_sgw_Change_AVP(
                                                                template (present) SGW_Change p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_sgw_Change_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_sgw_Change_AVP
            
            /**
             * @desc The Charging-Characteristics-Selection-Mode receive template
             * @param p_aVP_Data     Indicates how the applied Charging-Characteristics was selected
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.39A     Charging-Characteristics-Selection-Mode AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (present) Charging_Characteristics_Selection_Mode_AVP mw_charging_Characteristics_Selection_Mode_AVP(
                                                                                                                          template (present) Charging_Characteristics_Selection_Mode p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_charging_Characteristics_Selection_Mode_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_charging_Characteristics_Selection_Mode_AVP
            
            /**
             * @desc The SGW-Address receive template
             * @param p_aVP_Data  Holds the IP-address of the S-GW Node
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.199A SGW-Address AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (present) SGW_Address_AVP mw_sgw_Address_AVP(
                                                                  template (present) Address p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_sgw_Address_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_sgw_Address_AVP
            
            /**
             * @desc The Dynamic-Address-Flag receive template 
             * @param p_aVP_Data    Indicates whether the PDP context/PDN address is statically or dynamically allocated
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.57 Dynamic-Address-Flag AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Dynamic_Address_Flag_AVP mw_dynamic_Address_Flag_AVP(
                                                                                    template (present) Dynamic_Address_Flag p_aVP_Data := ?
            ) := { 
                aVP_Header    := m_aVP_HeaderVid_Mbit1(c_dynamic_Address_Flag_AVP_Code, 4, c_vendId3gpp),
                aVP_Data      := p_aVP_Data
            } // End of template mw_dynamic_Address_Flag_AVP
            
            /**
             * @desc The Dynamic-Address-Flag-Extension receive template 
             * @param pdpAddressAllocation    indicates that the IPv4 PDN address has been dynamically allocated for that particular IP CAN bearer (PDN connection) of PDN type IPv4v6, and the dynamic IPv6 address is indicated in Dynamic Address Flag
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.57A Dynamic-Address-Flag-Extension AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Dynamic_Address_Flag_Extension_AVP mw_dynamic_Address_Flag_Extension_AVP(
                                                                                                        template (present) Dynamic_Address_Flag_Extension p_pdpAddressAllocation := ?
            ) := { 
                aVP_Header              := m_aVP_HeaderVid_Mbit1(c_dynamic_Address_Flag_Extension_AVP_Code, 4, c_vendId3gpp),
                pdpAddressAllocation    := p_pdpAddressAllocation
            } // End of template mw_dynamic_Address_Flag_Extension_AVP
            
             * @desc The SIP-Request-Timestamp-Fraction receive template 
             * @param p_aVP_Data     Holds the miliseconds fraction in relation to SIP-Request-Timestamp
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.203 SIP-Request-Timestamp-Fraction AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) SIP_Request_Timestamp_Fraction_AVP mw_sip_Request_Timestamp_Fraction_AVP(
                                                                                                        template (present) UInt32 p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_sip_Request_Timestamp_Fraction_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_sip_Request_Timestamp_Fraction_AVP
            
            /**
             * @desc The SIP-Response-Timestamp-Fraction receive template 
             * @param p_aVP_Data     Holds the miliseconds fraction in relation to SIP-Response-Timestamp
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.205 SIP-Response-Timestamp-Fraction AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) SIP_Response_Timestamp_Fraction_AVP mw_sip_Response_Timestamp_Fraction_AVP(
                                                                                                          template (present) UInt32 p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_sip_Response_Timestamp_Fraction_AVP_Code, 4, c_vendId3gpp),
                aVP_Data := p_aVP_Data
            } // End of template mw_sip_Response_Timestamp_Fraction_AVP
            
            /**
             * @desc The Online-Charging-Flag receive template 
             * @param p_aVP_Data     Indicates the Online Charging Request was sent based on the provided ECF address from the SIP P-header "P-Charging-Function-Addresses"
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.122 Online-Charging-Flag AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Online_Charging_Flag_AVP mw_online_Charging_Flag_AVP(
                                                                                    template (present) Online_Charging_Flag p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_online_Charging_Flag_AVP_Code, 4, c_vendId3gpp),
                aVP_Data := p_aVP_Data
            } // End of template mw_online_Charging_Flag_AVP
            
            /**
             * @desc The Tariff-XML send template 
             * @param p_aVP_Data     Holds the XML body describing the tariff/add-on charge information exchanged during the SIP transaction, as described in the TS 29.658 [222]
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.224 Tariff-XML AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Tariff_XML_AVP mw_tariff_XML_AVP(
                                                                template (present) UTF8String p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_tariff_XML_AVP_Code, ?, c_vendId3gpp),
                aVP_Data := p_aVP_Data
            } // End of template mw_tariff_XML_AVP
            
            /**
             * @desc The IMSI-Unauthenticated-Flag receive template 
             * @param p_aVP_Data        Enumerated value
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.78  IMSI-Unauthenticated-Flag AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) IMSI_Unauthenticated_Flag_AVP mw_imsi_Unauthenticated_Flag_AVP(
                                                                                              template (present) IMSI_Unauthenticated_Flag p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_imsi_Unauthenticated_Flag_AVP_Code, 4, c_vendId3gpp),
                aVP_Data := p_aVP_Data
            } // End of template mw_imsi_Unauthenticated_Flag_AVP
            
            /**
             * @desc The Account-Expiration receive template 
             * @param p_aVP_Data     Indicates the subscriber account expiration date and aVP_Data of day
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.2   Account-Expiration AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Account_Expiration_AVP mw_account_Expiration_AVP(
                                                                                template (present) Time p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_aoc_Format_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_account_Expiration_AVP
            
            /**
             * @desc The AoC-Format receive template 
             * @param p_aVP_Data     Holds the format on how the AoC information shall be sent to the UE
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.14  AoC-Format AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) AoC_Format_AVP mw_aoc_Format_AVP(
                                                                template (present) AoC_Format p_aVP_Data := ?
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_aoc_Format_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_aoc_Format_AVP
            
            /**
             * @desc The AoC-Service receive template 
             * @param p_aoc_Service_Obligatory_Type  AoC Service type 
             * @param p_aoc_Service_Type             AoC Service obligatory type
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.17  AoC-Service AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template AoC_Service_AVP mw_aoc_Service_AVP(
                                                        template AoC_Service_Obligatory_Type_AVP   p_aoc_Service_Obligatory_Type := *,
                                                        template AoC_Service_Type_AVP              p_aoc_Service_Type := *
             ) := { 
                aVP_Header                  := mw_aVP_HeaderVid_Mbit1(c_aoc_Service_Obligatory_Type_AVP_Code, ?, c_vendId3gpp),
                aoc_Service_Obligatory_Type := p_aoc_Service_Obligatory_Type,
                aoc_Service_Type            := p_aoc_Service_Type
            } // End of template mw_aoc_Service_AVP
            
            /**
             * @desc The AoC-Service-Obligatory-Type receive template 
             * @param p_aVP_Data     Holds the information if the AoC information is binding or not
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.18  AoC-Service-Obligatory-Type AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) AoC_Service_Obligatory_Type_AVP mw_aoc_Service_Obligatory_Type_AVP(
                                                                                                  template (present) AoC_Service_Obligatory_Type p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_aoc_Service_Obligatory_Type_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_aoc_Service_Obligatory_Type_AVP
            
            /**
             * @desc The AoC-Service-Type AVP receive template 
             * @param p_aVP_Data     Defines the type of AoC information to be provided to the subscriber
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.19  AoC-Service-Type AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) AoC_Service_Type_AVP mw_aoc_Service_Type_AVP(
                                                                            template (present) AoC_Service_Type p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_aoc_Service_Type_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_aoc_Service_Type_AVP
            
            /**
             * @desc The AoC-Subscription-Information receive template 
             * @param p_aoc_Service              TODO
             * @param p_aoc_Format               TODO
             * @param p_preferred_AoC_Currency   TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.20  AoC-Subscription-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template AoC_Subscription_Information_AVP mw_aoc_Subscription_Information_AVP(
                                                                                          template AoC_Service_AVP             p_aoc_Service := *,
                                                                                          template AoC_Format_AVP              p_aoc_Format := *,
                                                                                          template Preferred_AoC_Currency_AVP  p_preferred_AoC_Currency := *
            ) := {
                aVP_Header              := mw_aVP_HeaderVid_Mbit1(c_aoc_Subscription_Information_AVP_Code, ?, c_vendId3gpp),
                aoc_Service             := { p_aoc_Service },
                aoc_Format              := p_aoc_Format,
                preferred_AoC_Currency  := p_preferred_AoC_Currency
            } // End of template mw_aoc_Subscription_Information_AVP 
            
            /**
             * @desc The Preferred-AoC-Currency receive template 
             * @param p_aVP_Data     Indicates the preferred currency code that the AoC function would like to get the AoC information
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.153 Preferred-AoC-Currency AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Preferred_AoC_Currency_AVP mw_preferred_AoC_Currency_AVP(
                                                                                        template (present) UInt32 p_aVP_Data := ?
            ) := { 
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_preferred_AoC_Currency_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_preferred_AoC_Currency_AVP
            /**
             * @desc The Initial-IMS-Charging-Identifier receive template 
             * @param p_aVP_Data     Indicates the IMS session is an IMS emergency session or IMS registration
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.76A IMS-Emergency-Indicator AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) IMS_Emergency_Indicator_AVP mw_ims_Emergency_Indicator_AVP(
                                                                                          template (present) IMS_Emergency_Indicator p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_initial_IMS_Charging_Identifier_AVP_Code, 2, c_vendId3gpp),
                aVP_Data := p_aVP_Data
            } // End of template mw_ims_Emergency_Indicator_AVP
            
            /**
             * @desc The Initial-IMS-Charging-Identifier receive template 
             * @param p_aVP_Data     Holds the Initial IMS Charging Identifier (ICID) as generated by a IMS node for the initial SIP session created for IMS service continuity
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.79A Initial-IMS-Charging-Identifier AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Initial_IMS_Charging_Identifier_AVP mw_initial_IMS_Charging_Identifier_AVP(
                                                                                                          template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_initial_IMS_Charging_Identifier_AVP_Code, ?, c_vendId3gpp),
                aVP_Data := p_aVP_Data
            } // End of template mw_initial_IMS_Charging_Identifier_AVP
            
            /**
             * @desc The Outgoing-Session-Id receive template 
             * @param p_aVP_Data     Contains the SIP Call ID of the outgoing leg, as defined in RFC 3261
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.128A    Outgoing-Session-Id AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Outgoing_Session_Id_AVP mw_outgoing_Session_Id_AVP(
                                                                                  template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_outgoing_Session_Id_AVP_Code, ?, c_vendId3gpp),
                aVP_Data := p_aVP_Data
            } // End of template mw_outgoing_Session_Id_AVP
            
            /**
             * @desc The Low-Priority-Indicator receive template 
             * @param p_aVP_Data     Indicates if the PDN connection has a low aVP_Data, i.e. for Machine Type Communications
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.97A Low-Priority-Indicator AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Low_Priority_Indicator_AVP mw_low_Priority_Indicator_AVP(
                                                                                        template (present) Low_Priority_Indicator p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_low_Priority_Indicator_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_low_Priority_Indicator_AVP
            
            /**
             * @desc The Local-GW-Inserted-Indication receive template 
             * @param p_aVP_Data     Indicates whether the IP realm used for the SDP media component is the Default IP realm or not
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.80A IP-Realm-Default-Indication  AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) IP_Realm_Default_Indication_AVP mw_ip_Realm_Default_Indication_AVP(
                                                                                                  template (present) IP_Realm_Default_Indication p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_ip_Realm_Default_Indication_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_ip_Realm_Default_Indication_AVP
            
            /**
             * @desc The Local-GW-Inserted-Indication receive template 
             * @param p_aVP_Data     Indicates if the local GW (TrGW, IMS-AGW) is inserted or not for the SDP media component
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.92A     Local-GW-Inserted-Indication AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Local_GW_Inserted_Indication_AVP mw_local_GW_Inserted_Indication_AVP(
                                                                                                    template (present) Local_GW_Inserted_Indication p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_local_GW_Inserted_Indication_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_local_GW_Inserted_Indication_AVP
            
            /**
             * @desc The Transcoder-Inserted-Indication receive template 
             * @param p_aVP_Data     Indicates if a transcoder is inserted or not for the SDP media component
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.233A            Transcoder-Inserted-Indication AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Transcoder_Inserted_Indication_AVP mw_transcoder_Inserted_Indication_AVP(
                                                                                                        template (present) Transcoder_Inserted_Indication p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_pdp_Address_Prefix_Length_AVP_Code, 4, c_vendId3gpp),
                aVP_Data      := p_aVP_Data
            } // End of template mw_transcoder_Inserted_Indication_AVP
            
            /**
             * @desc The PDP-Address-Prefix-Length receive template 
             * @param p_aVP_Data    the aVP_Data length of an IPv6 typed PDP-Address AVP
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.137a PDP-Address-Prefix-Length AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) PDP_Address_Prefix_Length_AVP mw_pdp_Address_Prefix_Length_AVP(
                                                                                              template (present) UInt32 p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_pdp_Address_Prefix_Length_AVP_Code, 4, c_vendId3gpp),
                aVP_Data      := p_aVP_Data
            } // End of template mw_pdp_Address_Prefix_Length_AVP
            
        } // End of group Rf_avps_templates_receive 
        
    } // End of group Rf_avps_templates 
    
juvancic's avatar
juvancic committed
    group RFC3588_AVPS {  
        
        group RFC3588_message_templates_send { 
            
            /**
             * @desc The Event_Timestamp Attribute send template
juvancic's avatar
juvancic committed
             * @param p_time     The time that the reported event occurred, in seconds (since January 1, 1900 00:00 UTC)
             * 
             * @see RFC3588 Clause 8.21.  Event-Timestamp AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (value) Event_Timestamp_AVP m_event_Timestamp(
juvancic's avatar
juvancic committed
                                                                   in template (value) Time p_time
juvancic's avatar
juvancic committed
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_event_Timestamp_AVP_Code, 4, omit),
                aVP_Data    := p_time
            } // End of template m_event_Timestamp
juvancic's avatar
juvancic committed
            /**
             * @desc The Acct_Application_Id send template
             * @param p_avpData     UInt32
             */
            template (value) Acct_Application_Id_AVP m_acct_Application_Id(
                                                                      template (value) UInt32 p_aVP_Data
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_acct_Application_Id_AVP_Code, 4, omit),
                aVP_Data    := p_aVP_Data
            } // End of template m_acct_Application_Id
            
        } // End of group RFC3588_message_templates_send 
        
        group RFC3588_message_templates_receive { 
            
            /**
             * @desc The Event_Timestamp Attribute receive template
juvancic's avatar
juvancic committed
             * @param p_time     The time that the reported event occurred, in seconds (since January 1, 1900 00:00 UTC)
             * 
             * @see RFC3588 Clause 8.21.  Event-Timestamp AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Event_Timestamp_AVP mw_event_Timestamp(
juvancic's avatar
juvancic committed
                                                                      template (present) Time p_time := ?
            ) := {
                aVP_Header  := mw_aVP_Header_Vbit0Mbit1(c_event_Timestamp_AVP_Code),
                aVP_Data    := p_time
            } // End of template mw_event_Timestamp 
            
            /**
             * @desc The Acct_Application_Id receive template
             * @param p_avpData     UInt32
             */
            template (present) Acct_Application_Id_AVP mw_acct_Application_Id(
                                                                      template (present) UInt32 p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_Header_Vbit0Mbit1(c_acct_Application_Id_AVP_Code),
                aVP_Data    := p_aVP_Data
            } // End of template mw_acct_Application_Id
            
            /**
             * @desc The Auth_Application_Id receive template
             * @param p_avpData     UInt32
             */
            template (present) Auth_Application_Id_AVP mw_auth_Application_Id(
                                                                      template (present) UInt32 p_aVP_Data := ?
juvancic's avatar
juvancic committed
                aVP_Header  := mw_aVP_Header_Vbit0Mbit1(c_auth_Application_Id_AVP_Code),
                aVP_Data    := p_aVP_Data
juvancic's avatar
juvancic committed
            } // End of template mw_acct_Application_Id
juvancic's avatar
juvancic committed
        } // End of group RFC3588_message_templates_receive
        
    } // End of group RFC3588_AVPS 
    
    group RFC5580_AVPS { // FIXME To be moved in TTCN-3 module LibDiameter_Types_GiSGi_AVPs 
        
        group RFC5580_message_templates_send { 
            
            /**
             * @desc The Operator-Name Attribute send template
             * @param p_namespace_Id      Namespace ID
             * @param p_operator_Name     Contains the operator namespace identifier AND an Access Network Operator Name
             * 
             * @see RFC5580 Clause 4.1. Operator-Name Attribute
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (value) Operator_Name_AVP m_operator_Name_AVP(
                                                                   in template (value) UInt8        p_namespace_Id,
                                                                   in template (value) UTF8String   p_operator_Name
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit0(c_operator_Name_AVP_Code, 1 + f_getUTF8StringLength(valueof(p_operator_Name)), omit),
                namespace_Id := p_namespace_Id,
                operator_Name := p_operator_Name
            } // End of template m_operator_Name_AVP
            
            /**
             * @desc The Operator-Name Attribute send template
             * @param p_index            Allows this attribute to provide information relating to the information included in the Location- Data Attribute to which it refers (via the Index)
             * @param p_code             Indicates the content of the location profile carried in the Location-Data Attribute
             * @param p_entity           Refers to as an unsigned 8-bit integer value
             * @param p_sighting_Time    Indicates when the location information was accurate
             * @param p_time_to_Live     Gives a hint regarding for how long location information should be considered current
             * @param p_method           Describes the way that the location information was determined
             * 
             * @see RFC5580 Clause 4.2. Location-Information Attribute
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (value) Location_Information_AVP m_location_Information_AVP(
                                                                                 in template (value) UInt16     p_index,
                                                                                 in template (value) UInt16     p_code,
                                                                                 in template (value) UInt16     p_entity,
                                                                                 in template (value) UInt64     p_sighting_Time,
                                                                                 in template (value) UInt64     p_time_to_Live,
                                                                                 in template (value) UTF8String p_method
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit0(c_location_Information_AVP_Code, 20 + f_getUTF8StringLength(valueof(p_method)), omit),
                index           := p_index,
                code            := p_code,
                entity          := p_entity,
                sighting_Time   := p_sighting_Time,
                time_to_Live    := p_time_to_Live,
                method          := p_method
            } // End of template m_location_Information_AVP
            
            /**
             * @desc The Location-Data Attribute send template
             * @param p_index        TODO
             * @param p_aVP_Data     TODO
             * 
             * @see RFC5580 Clause 4.3. Location-Data Attribute
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (value) Location_Data_AVP m_location_Data_AVP(
                                                                   in template (value) UInt16     p_index,
                                                                   in template (value) UTF8String p_aVP_Data
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit0(c_location_Data_AVP_Code, f_getUTF8StringLength(valueof(p_aVP_Data)), omit),
                index := p_index,
                aVP_Data := p_aVP_Data
            } // End of template Location_Data_AVP
            
        } // End of group RFC5580_message_templates_send
        
        group RFC5580_message_templates_receive { 
            
            /**
             * @desc The Operator-Name Attribute send template
             * @param p_namespace_Id      Namespace ID
             * @param p_operator_Name     Contains the operator namespace identifier AND an Access Network Operator Name
             * 
             * @see RFC5580 Clause 4.1. Operator-Name Attribute
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Operator_Name_AVP mw_operator_Name_AVP(
                                                                      template (present) UInt8        p_namespace_Id := ?,
                                                                      template (present) UTF8String   p_operator_Name := ?
            ) := {
                aVP_Header  := mw_aVP_Header_Vbit0Mbit0(c_operator_Name_AVP_Code),
                namespace_Id := p_namespace_Id,
                operator_Name := p_operator_Name
            } // End of template mw_operator_Name_AVP
            
            /**
             * @desc The Operator-Name Attribute send template
             * @param p_index            Allows this attribute to provide information relating to the information included in the Location- Data Attribute to which it refers (via the Index)
             * @param p_code             Indicates the content of the location profile carried in the Location-Data Attribute
             * @param p_entity           Refers to as an unsigned 8-bit integer value
             * @param p_sighting_Time    Indicates when the location information was accurate
             * @param p_time_to_Live     Gives a hint regarding for how long location information should be considered current
             * @param p_method           Describes the way that the location information was determined
             * 
             * @see RFC5580 Clause 4.2. Location-Information Attribute
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Location_Information_AVP mw_location_Information_AVP(
                                                                                    template (present) UInt16     p_index := ?,
                                                                                    template (present) UInt16     p_code := ?,
                                                                                    template (present) UInt16     p_entity := ?,
                                                                                    template (present) UInt64     p_sighting_Time := ?,
                                                                                    template (present) UInt64     p_time_to_Live := ?,
                                                                                    template (present) UTF8String p_method := ?
            ) := {
                aVP_Header      := mw_aVP_Header_Vbit0Mbit0(c_location_Information_AVP_Code),
                index           := p_index,
                code            := p_code,
                entity          := p_entity,
                sighting_Time   := p_sighting_Time,
                time_to_Live    := p_time_to_Live,
                method          := p_method
            } // End of template mw_location_Information_AVP
            
            /**
             * @desc The Location-Data Attribute send template
             * @param p_index        TODO
             * @param p_aVP_Data     TODO
             * 
             * @see RFC5580 Clause 4.3. Location-Data Attribute
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (present) Location_Data_AVP mw_location_Data_AVP(
                                                                      template (present) UInt16     p_index := ?,
                                                                      template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_Header_Vbit0Mbit0(c_location_Data_AVP_Code),
                index := p_index,
                aVP_Data := p_aVP_Data
            } // End of template mw_location_Data_AVP
            
        } // End of group RFC5580_message_templates_receive
        
    } // End of group RFC5580_AVPS 
    
    group GiSGi_message_templates { // FIXME To be moved in TTCN-3 module DiameterGiSGi_Templates
        
        group GiSGi_message_templates_send { 
            
            template (value) ThreeGPP_Charging_Id_AVP m_threeGPP_Charging_Id_AVP(
                                                                                 in template (value) octetstring p_aVP_Data
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_threeGPP_Charging_Id_AVP_Code, f_getOctetStringLength(valueof(p_aVP_Data)), c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_Charging_Id_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (value) ThreeGPP_PDP_Type_AVP m_threeGPP_PDP_Type_AVP(
                                                                           in template (value) ThreeGPP_PDP_Type p_aVP_Data 
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_threeGPP_PDP_Type_AVP_Code, 4, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_PDP_Type_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (value) ThreeGPP_IMSI_MCC_MNC_AVP m_threeGPP_IMSI_MCC_MNC_AVP(
                                                                                   in template (value) UTF8String p_aVP_Data
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_IMSI_MCC_MNC_AVP_Code, f_getUTF8StringLength(valueof(p_aVP_Data)), c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_IMSI_MCC_MNC_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (value) ThreeGPP_GGSN_MCC_MNC_AVP m_threeGPP_GGSN_MCC_MNC_AVP(
                                                                                   in template (value) UTF8String p_aVP_Data
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_threeGPP_GGSN_MCC_MNC_AVP_Code, f_getUTF8StringLength(valueof(p_aVP_Data)), c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_GGSN_MCC_MNC_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (value) ThreeGPP_NSAPI_AVP m_threeGPP_NSAPI_AVP(
                                                                     in template (value) UTF8String p_aVP_Data
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_threeGPP_NSAPI_AVP_Code, f_getUTF8StringLength(valueof(p_aVP_Data)), c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_NSAPI_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (value) ThreeGPP_Session_Stop_Indicator_AVP m_threeGPP_Session_Stop_Indicator_AVP(
                                                                                                       in template (value) UTF8String p_aVP_Data
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_threeGPP_Session_Stop_Indicator_AVP_Code, f_getUTF8StringLength(valueof(p_aVP_Data)), c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_Session_Stop_Indicator_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (value) ThreeGPP_Selection_Mode_AVP m_threeGPP_Selection_Mode_AVP(
                                                                                       in template (value) UTF8String p_aVP_Data
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_threeGPP_Selection_Mode_AVP_Code, f_getUTF8StringLength(valueof(p_aVP_Data)), c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_Selection_Mode_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (value) ThreeGPP_Charging_Characteristics_AVP m_threeGPP_Charging_Characteristics_AVP(
                                                                                                           in template (value) UTF8String p_aVP_Data
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_threeGPP_Charging_Characteristics_AVP_Code, f_getUTF8StringLength(valueof(p_aVP_Data)), c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template m_threeGPP_Charging_Characteristics_AVP
            
        } // End of group GiSGi_message_templates_send 
        
        group GiSGi_message_templates_receive { 
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_Charging_Id_AVP mw_threeGPP_Charging_Id_AVP(
                                                                                    template (present) octetstring p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_Charging_Id_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_Charging_Id_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_PDP_Type_AVP mw_threeGPP_PDP_Type_AVP(
                                                                              template (present) ThreeGPP_PDP_Type p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_PDP_Type_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_PDP_Type_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_IMSI_MCC_MNC_AVP mw_threeGPP_IMSI_MCC_MNC_AVP(
                                                                                      template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_IMSI_MCC_MNC_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_IMSI_MCC_MNC_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_GGSN_MCC_MNC_AVP mw_threeGPP_GGSN_MCC_MNC_AVP(
                                                                                      template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_GGSN_MCC_MNC_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_GGSN_MCC_MNC_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_NSAPI_AVP mw_threeGPP_NSAPI_AVP(
                                                                        template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_NSAPI_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_NSAPI_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_Session_Stop_Indicator_AVP mw_threeGPP_Session_Stop_Indicator_AVP(
                                                                                                          template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_Session_Stop_Indicator_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_Session_Stop_Indicator_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_Selection_Mode_AVP mw_threeGPP_Selection_Mode_AVP(
                                                                                          template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_Selection_Mode_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_Selection_Mode_AVP
            
            /**
             * @desc TODO
             * @param p_aVP_Data     TODO
             * 
             * @see ETSI TS 129 061 V10.12.0 Table 9a: Gi/SGi specific AVPs 
             */
            template (present) ThreeGPP_Charging_Characteristics_AVP mw_threeGPP_Charging_Characteristics_AVP(
                                                                                                              template (present) UTF8String p_aVP_Data := ?
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_threeGPP_Charging_Characteristics_AVP_Code, ?, c_vendId3gpp),
                aVP_Data    := p_aVP_Data
            } // End of template mw_threeGPP_Charging_Characteristics_AVP
            
        } // End of group GiSGi_message_templates_receive 
        
    } // End of group GiSGi_message_templates 
    
    /** 
     * @desc Type convertion functions to reduce warnings due to type mismaches 
     */
    group functionsForTemplates {
       
       /**
        * @desc Calculate the length of the Values_Digits/Exponent AVPs
        * @param p_value_Digits Values_Digits AVP value
        * @param p_exponent     Exponent AVP value
        * @return The length of the Values_Digits/Exponent AVP
        * @verdict Unchanged
        */
       function f_getValuesDigitsAndExponentLength(
                                                   in template (value) Value_Digits_AVP p_value_Digits,
                                                   in template (omit) Exponent_AVP p_exponent
        ) return AVP_Length {
            var AVP_Length v_length := f_getEncvalueLength(encvalue(p_value_Digits));
            if (ispresent(p_exponent)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_exponent));
            }
            
            return v_length;
        } // End of function f_getValuesDigitsAndExponentLength
        
       /**
        * @desc Calculate the length of the AoC_Information_AVP to set up the Diameter header
        * @param p_aoc_Cost_Information_AVP     Holds accumulated and incremental cost information for the AoC service
        * @param p_tariff_Information_AVP       Holds a tariff definition either from the local provider or from 3rd party provider
        * @param p_aoc_Subscription_Information Holds the subscription and formatting parameters received from HSS
        * @return The length of the AoC_Information_AVP
        * @verdict Unchanged
        */
        function f_getAoCInformationAVPLength(
                                              in template (omit) AoC_Cost_Information_AVP           p_aoc_Cost_Information_AVP,
                                              in template (omit) Tariff_Information_AVP             p_tariff_Information_AVP,
                                              in template (omit) AoC_Subscription_Information_AVP   p_aoc_Subscription_Information
        ) return AVP_Length {
            var AVP_Length v_length := 0;
            if (ispresent(p_aoc_Cost_Information_AVP)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_aoc_Cost_Information_AVP));
            }
            if (ispresent(p_tariff_Information_AVP)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_tariff_Information_AVP));
            }
            if (ispresent(p_aoc_Subscription_Information)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_aoc_Subscription_Information));
            }
            
            return v_length;
        } // End of function f_getAoCInformationAVPLength
        
       /**
        * @desc Calculate the length of the AoC_Cost_Information_AVP to set up the Diameter header
        * @param p_accumulated_Cost Holds the accumulated cost for the ongoing session
        * @param p_incremental_Cost Holds the incremental cost since last AoC interaction for the ongoing session
        * @return The length of the AoC_Cost_Information_AVP
        * @verdict Unchanged
        */
        function f_getAoCCostInformationAVPLength(
                                                  in template (omit) Accumulated_Cost_AVP  p_accumulated_Cost,
                                                  in template (omit) Incremental_Cost_AVP  p_incremental_Cost
        ) return AVP_Length {
            var AVP_Length v_length := 0;
            if (ispresent(p_accumulated_Cost)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_accumulated_Cost));
            }
            if (ispresent(p_incremental_Cost)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_incremental_Cost));
            }
            
            return v_length;
        } // End of function f_getAoCCostInformationAVPLength
        
       /**
        * @desc Calculate the length of the Current_Tariff_AVP to set up the Diameter header
        * @param p_scale_Factor Holds simple multiplication factor in the same format as Unit-Value
        * @param p_rate_Element Holds simple rate element of one dimension
        * @return The length of the Current_Tariff_AVP
        * @verdict Unchanged
        */
        function f_getTariffAVPLength(
                                      in template (omit) Scale_Factor_AVP p_scale_Factor,
                                      in template (omit) Rate_Element_AVP p_rate_Element
        ) return AVP_Length {
            var AVP_Length v_length := 0;
            if (ispresent(p_scale_Factor)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_scale_Factor));
            }
            if (ispresent(p_rate_Element)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_rate_Element));
            }
            
            return v_length;
        } // End of function f_getTariffAVPLength
        
        function f_getRateElementAVPLength(
                                           in template (value) CC_Unit_Type_AVP p_cc_Unit_Type_AVP
        ) return AVP_Length {
            var AVP_Length v_length := f_getEncvalueLength(encvalue(p_cc_Unit_Type_AVP));
            
            return v_length;
        } // End of function f_getRateElementAVPLength
        
       /**
        * @desc Calculate the length of the Current_Tariff_AVP to set up the Diameter header
        * @param p_scale_Factor Holds simple multiplication factor in the same format as Unit-Value
        * @return The length of the Current_Tariff_AVP
        * @verdict Unchanged
        */
        function f_getTariffInformationAVPLength(
                                                 in template (value) Current_Tariff_AVP     p_currentTariff,
                                                 in template (omit) Tariff_Time_Change_AVP  p_tariff_Time_Change := omit,
                                                 in template (omit) Next_Tariff_AVP         p_next_Tariff := omit
        ) return AVP_Length {
            var AVP_Length v_length := f_getEncvalueLength(encvalue(p_currentTariff));
            if (ispresent(p_tariff_Time_Change)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_tariff_Time_Change));
            }
            if (ispresent(p_next_Tariff)) {
                v_length := v_length + f_getEncvalueLength(encvalue(p_next_Tariff));
            }
            
            return v_length;
        } // End of function f_getTariffInformationAVPLength
        
       /**
        * @desc Calculate the length of the PS_Furnish_Charging_Information_AVP to set up the Diameter header
        * @param p_threeGPP_Charging_Id  TODO
        * @param p_ps_Free_Format_Data   TODO
        * @return The length of the PS_Furnish_Charging_Information_AVP
        * @verdict Unchanged
        */
        function f_getPSFurnishChargingInformationAVPLength(
                                                            in template (value) ThreeGPP_Charging_Id_AVP p_threeGPP_Charging_Id,
                                                            in template (value) PS_Free_Format_Data_AVP  p_ps_Free_Format_Data
        ) return AVP_Length {
            var AVP_Length v_length := 
                f_getEncvalueLength(encvalue(p_threeGPP_Charging_Id)) +
                f_getEncvalueLength(encvalue(p_ps_Free_Format_Data));
            
            return v_length;
        } // End of function f_getPSFurnishChargingInformationAVPLength
        
       /**
        * @desc Calculate the length of the Offline_Charging_AVP to set up the Diameter header
        * @param p_quota_Consumption_Time   TODO
        * @param p_time_Quota_Mechanism     TODO
        * @return The length of the Offline_Charging_AVP
        * @verdict Unchanged
        */
        function f_getOfflineChargingLength(
                                            in template (value) Quota_Consumption_Time_AVP   p_quota_Consumption_Time,