DiameterRfRo_Templates.ttcn 268 KB
Newer Older
pintar's avatar
pintar committed
/**
 *  @author   STF 490
pintar's avatar
pintar committed
 *  @version  $Id$
pintar's avatar
pintar committed
 *  @desc     This module defines RfRo Diameter Templates for message, header, and
 *            structured types. <br>
 *            Note that any changes made to the definitions in this module
 *            may be overwritten by future releases of this library
 *            End users are encouraged to contact the distributers of this
 *            module regarding their modifications or additions
 *            Note that usage of encvalue command (codec function) returns bitstring 
 *            length of the message or AVP with padding bytes. Therefore this function 
 *            is not used on the first level where length of one single AVP can be 
 *            calculated with lengthof function. It shall be used only on message level 
 *            or in case where one AVP is group of other AVPs (ex. m_subsesEnforcementInfo_Operation_MultiBBERFact_AnGw). 
 *  @remark   Any additions to the templates shall follow the design rules
 *            and always modify base templates only;
 */

module DiameterRfRo_Templates {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    
    // LibDiameter
pintar's avatar
pintar committed
    import from LibDiameter_Types_Base_AVPs all;
    import from LibDiameter_TypesAndValues all;
    import from LibDiameter_Types_Gx_AVPs all;
    import from LibDiameter_Types_Rx_AVPs all;
    import from LibDiameter_Types_RfRo_AVPs all;
pintar's avatar
pintar committed
    import from LibDiameter_Templates all;
pintar's avatar
pintar committed
    group SubFields{
    } // End of group SubFields
pintar's avatar
pintar committed

    group HeaderFieldTemplates {
pintar's avatar
pintar committed


        template DiameterHeader mw_diameterHeaderAns_CmdFlags(Command_Code p_cmdcode, template (present) UInt32 p_applid, template (present) Command_Flags p_commandFlags) modifies mw_diameterHeaderAns_dummy := {
            cmdflags := p_commandFlags
        }
        
        /**
         * @desc Received generic command flag template
         */
        template (present) Command_Flags mw_cmdFlagsAns := {
            r_bit           := '0'B,            //Answer message
            p_bit           := ?,
            e_bit           := ?,
            t_bit           := ?,
            reserved_bits    := '0000'B
        } // End of template mw_cmdFlagsAns
        
        /**
         * @desc Received generic command flag template
         */
        template (present) Command_Flags mw_cmdTFlagsAns 
        modifies mw_cmdFlagsAns := {
            t_bit           := '1'B // T message
        } // End of template mw_cmdTFlagsAns
        
pintar's avatar
pintar committed
        /**
         * @desc Received generic command flag template
         */
        template (present) Command_Flags mw_cmd_0TFlagsAns 
        modifies mw_cmdFlagsAns := {
            t_bit           := '0'B // !T message
        } // End of template mw_cmdTFlagsAns
        
        template AVP_Header mw_aVP_HeaderVid_Vbit1Mbit0 ( AVP_Code p_avpCode, template (present) AVP_Vendor_ID p_avpVid ) := {
            aVP_Code     := p_avpCode,
            aVP_flags     := mw_avpFlags_VMbits('1'B, '0'B),
            aVP_len     := ?,
            aVP_vid        := p_avpVid
        }
        
pintar's avatar
pintar committed
        template AVP_Header mw_aVP_HeaderVid_Vbit1Mbit1 ( AVP_Code p_avpCode, template (present) AVP_Vendor_ID p_avpVid ) := {
            aVP_Code     := p_avpCode,
            aVP_flags     := mw_avpFlags_VMbits('1'B, '1'B),
            aVP_len     := ?,
            aVP_vid        := p_avpVid
pintar's avatar
pintar committed
        }
        
//        group DummyAVPHeaders{
//            
//        } // End of group DummyAVPHeaders
//        
//        group SpecificAVPHeaders {
//              group sendingTemplatesForAVPs{
//
//              } // End of group sendingTemplatesForAVPs
//              group awaitingTemplatesForAVPs{
//
//            } // End of group awaitingTemplatesForAVPs
//        } // End of group SpecificAVPHeaders
    } // End of group HeaderFieldTemplates
    
    // TODO Check where to put it, also define in DiameterS9_Templates module
    template (value) Subscription_Id_AVP m_subscription_Id(
                                                           in template (value) Subscription_Id_Type_AVP p_typeAVP, 
                                                           in template (value) Subscription_Id_Data_AVP p_dataAVP
    ) := {
        aVP_Header := m_aVP_HeaderVid_Mbit1(
                                            c_subscription_Id_AVP_Code,
                                            f_getByteAlignedLength(p_typeAVP.aVP_Header.aVP_len) + 
                                            f_getByteAlignedLength(p_dataAVP.aVP_Header.aVP_len),
                                            omit),
        subscription_Id_Type := p_typeAVP,
        subscription_Id_Data := p_dataAVP
    } // End of template m_subscription_Id
    
    template (value) Subscription_Id_Type_AVP m_subscription_Id_Type(
                                                                     in template (value) Subscription_Id_Ty_Type p_avpData
    ):= {
        aVP_Header := m_aVP_HeaderVid_Mbit1(c_subscription_Id_Type_AVP_Code, f_getEnumLength(), omit),
        aVP_Data := p_avpData
    } // End of template m_subscription_Id_Type

    template (value) Subscription_Id_Data_AVP m_subscription_Id_Data(
                                                                     in template (value) UTF8String p_avpData
    ) := {
        aVP_Header := m_aVP_HeaderVid_Mbit1(c_subscription_Id_Data_AVP_Code, f_getUTF8StringLength(valueof(p_avpData)), omit),
        aVP_Data := p_avpData
    } // End of template  m_subscription_Id_Data

    
pintar's avatar
pintar committed
    /** Message templates for ACR, ACA, CCR, CCA.... methods  */
    group RfRoMessageTemplates {
pintar's avatar
pintar committed
        group RfRobase_templates {
pintar's avatar
pintar committed
            group RfRobasic_request_templates_send {

            } // Endgroup RfRobasic_request_templates_send
pintar's avatar
pintar committed
            group RfRobasic_request_templates_receive {

            } // End of group RfRobasic_request_templates_receive
pintar's avatar
pintar committed
            group RfRobasic_answer_templates_send {

            } // End of group RfRobasic_answer_templates_send
pintar's avatar
pintar committed
            group RfRobasic_answer_templates_receive {

            } // End of group RfRobasic_answer_templates_receive
        } // End of group RfRoMessageTemplates
        
pintar's avatar
pintar committed
        group RfRomodified_templates {
pintar's avatar
pintar committed
            group RfRomodified_request_templates_send {
pintar's avatar
pintar committed
            } //     end group RfRomodified_request_templates_send
            
            group RfRomodified_request_templates_receive {
pintar's avatar
pintar committed
            } //     end group RfRomodified_request_templates_receive
            group RfRomodified_answer_templates_send {
                
            } //     end group RfRomodified_answer_templates_send
            group RfRomodified_answer_templates_receive {
                
            } // Endgroup RfRomodified_answer_templates_receive
            
        } // End of group RfRomodified_templates
        
    } // End of group RfRoMessageTemplates
    
    group Rf_message_templates { 
        
        group Rf_request_message_templates_send {
            
            /**
             * @desc Main receive message for CDF_Rf port
             * @param p_aCR_MSG AC-Request message
             */
            template (value) DIAMETER_MSG m_ctfAccountingRequest(
                                                                 in template (value) ACR_MSG p_aCR_MSG
            ) := {
                aCR_MSG := p_aCR_MSG
            } // End of template m_ctfAccountingRequest
            
            /**
             * @desc Send template for ACR
             * @param p_sessionId   Session identifier
             * @param p_acrBody     ACR message body
             */
            template (value) ACR_MSG md_aCR(
                                            in template (value) Session_Id_AVP  p_sessionId,
                                            in template (value) ACR_Body_AVP    p_acrBody
            ) modifies m_ACR_dummy := {
                session_Id  := p_sessionId,
                aCR_Body    := p_acrBody
            } // End of template md_aCR
            
            /**
             * @desc Receive template for ACR message body
             * @param p_resultCode                  Indicates whether a particular request was completed successfully or an error occurred
             * @param p_originHost                  Identifies the endpoint that originated the Diameter message
             * @param p_originRealm                 Realm of the originator
             * @param p_event_Timestamp             Event timestamp
             * @param p_accounting_Record_Type      TODO
             * @param p_accounting_Record_Number    TODO
             * @param p_service_Information         TODO
             */
            template (omit) ACR_Body_AVP md_acrBodyAvps(
                                                        in template (value) Origin_Host_AVP              p_originHost,
                                                        in template (value) Origin_Realm_AVP             p_originRealm,
                                                        in template (value) Accounting_Record_Type_AVP   p_accounting_Record_Type,
                                                        in template (value) Accounting_Record_Number_AVP p_accounting_Record_Number,
                                                        in template (omit) Event_Timestamp_AVP           p_event_Timestamp := omit,
                                                        in template (omit) Service_Information_AVP       p_service_Information := omit
            ) modifies m_ACR_Body_dummy := {
                    origin_Host                 := p_originHost,
                    origin_Realm                := p_originRealm,
                    accounting_Record_Type      := p_accounting_Record_Type,
                    accounting_Record_Number    := p_accounting_Record_Number,
                    service_Information         := p_service_Information
            } // End of template md_acrBodyAvps
            
pintar's avatar
pintar committed
            /**
	         * @desc Send template for ACR message body
	         */
            template (omit) ACR_Body_AVP md_acrBodyAvps_TypeOfCharging_Session(
                                                        in template (value) Origin_Host_AVP              p_originHost,
                                                        in template (value) Origin_Realm_AVP             p_originRealm,
                                                        in template (value) Accounting_Record_Type_AVP   p_accounting_Record_Type,
                                                        in template (value) Accounting_Record_Number_AVP p_accounting_Record_Number,
                                                        in template (omit) Event_Timestamp_AVP           p_event_Timestamp := omit,
                                                        in template (omit) Service_Information_AVP       p_service_Information := omit
            ) modifies m_ACR_Body_dummy := {
pintar's avatar
pintar committed
                    origin_Host                 := p_originHost,
                    origin_Realm                := p_originRealm,
                    accounting_Record_Type      := p_accounting_Record_Type,
                    accounting_Record_Number    := p_accounting_Record_Number,
                    event_Timestamp             := p_event_Timestamp,
                    service_Information         := p_service_Information
pintar's avatar
pintar committed
            } // End of template md_acrBodyAvps_TypeOfCharging_Session
            
        } // End of group Rf_request_message_templates_send 
        
        group Rf_answer_message_templates_receive { 
            
pintar's avatar
pintar committed
            template ACA_MSG mw_ACA_MessageFlags modifies mw_ACA_dummy := {
                header :=  mw_diameterHeaderAns_CmdFlags(ACA_E, ?, mw_cmd_0TFlagsAns),
                session_Id := ?,
                aCA_Body := mw_ACA_Body_dummy
            }
            
            /**
             * @desc Main receive message for CDF_Rf port
             * @param p_aCA_MSG AC-Answer message
             */
            template (value) DIAMETER_MSG mw_cdfAccountingResponse(
                                                                   in template (value) ACA_MSG p_aCA_MSG
            ) := {
                aCA_MSG := p_aCA_MSG
            } // End of template mw_cdfAccountingResponse
            
            /**
             * @desc Send template for ACA
             * @param p_sessionId   Session identifier
             * @param p_acaBody     ACA message body
             */
            template (present) ACA_MSG mdw_aCA(
                                               template (present) Session_Id_AVP  p_sessionId,
                                               template (present) ACA_Body_AVP    p_acaBody
            ) modifies mw_ACA_dummy := {
                session_Id  := p_sessionId,
                aCA_Body    := p_acaBody
            } // End of template md_aCA
            
            template (present) ACA_Body_AVP mdw_acaBodyAvps(
                                                            template (present) Result_Code_AVP              p_resultCode,
                                                            template (present) Origin_Host_AVP              p_originHost,
                                                            template (present) Origin_Realm_AVP             p_originRealm,
                                                            template (present) Accounting_Record_Type_AVP   p_accounting_Record_Type,
                                                            template (present) Accounting_Record_Number_AVP p_accounting_Record_Number
            ) modifies mw_ACA_Body_dummy := {
                result_Code                 := p_resultCode,
                origin_Host                 := p_originHost,
                origin_Realm                := p_originRealm,
                accounting_Record_Type      := p_accounting_Record_Type,
                accounting_Record_Number    := p_accounting_Record_Number
            } // End of template mdw_acaBodyAvps 
            
        } // End of group Rf_answer_message_templates_receive 
        
    } // End of group Rf_message_templates 
    
    group Rf_avps_templates { 
        
        group Rf_dummy_avps_templates_send { 
            
            /**
             * @desc Service-Information AVP, Basic send template 
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.192 Service-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (omit) Service_Information_AVP m_service_Information_AVP_dummy := {
                aVP_Header                  := m_aVP_HeaderVid_Mbit1(c_service_Information_AVP_Code, 4, c_vendId3gpp),
                subscription_Id             := omit,
                aoc_Information             := omit,
                ps_Information              := omit,
                wlan_Information            := omit,
                ims_Information             := omit,
                mms_Information             := omit,
                lcs_Information             := omit,
                poc_Information             := omit,
                mbms_Information            := omit,
                sms_Information             := omit,
                mmtel_Information           := omit,
                service_Generic_Information := omit,
                im_Information              := omit,
                dcd_Information             := omit
            } // End of template m_service_Information_AVP_dummy
            
            /**
             * @desc PS-Information AVP, Basic send template 
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.158 PS-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (omit) PS_Information_AVP m_ps_Information_AVP_dummy := {
                aVP_Header                               := m_aVP_HeaderVid_Mbit1(c_service_Information_AVP_Code, 0, c_vendId3gpp),
                threeGPP_Charging_Id                     := omit,
                pdn_Connection_Charging_ID               := omit,
                node_Id                                  := omit,
                threeGPP_PDP_Type                        := omit,
                pdp_Address                              := omit,
                pdp_Address_Prefix_Length                := omit,
                dynamic_Address_Flag                     := omit,
                dynamic_Address_Flag_Extension           := omit,
                qos_Information                          := omit,
                sgsn_Address                             := omit,
                ggsn_Address                             := omit,
                sgw_Address                              := omit,
                cg_Address                               := omit,
                serving_Node_Type                        := omit,
                sgw_Change                               := omit,
                threeGPP_IMSI_MCC_MNC                    := omit,
                imsi_Unauthenticated_Flag                := omit,
                threeGPP_GGSN_MCC_MNC                    := omit,
                threeGPP_NSAPI                           := omit,
                called_Station_Id                        := omit,
                threeGPP_Session_Stop_Indicator          := omit,
                threeGPP_Selection_Mode                  := omit,
                threeGPP_Charging_Characteristics        := omit,
                charging_Characteristics_Selection_Mode  := omit,
                threeGPP_SGSN_MCC_MNC                    := omit,
                threeGPP_MS_TimeZone                     := omit,
                charging_Rule_Base_Name                  := omit,
                threeGPP_User_Location_Info              := omit,
                user_CSG_Information                     := omit,
                threeGPP2_BSID                           := omit,
                threeGPP_RAT_Type                        := omit,
                ps_Furnish_Charging_Information          := omit,
                pdp_Context_Type                         := omit,
                offline_Charging                         := omit,
                traffic_Data_Volumes                     := omit,
                service_Data_Container                   := omit,
                user_Equipment_Info                      := omit,
                terminal_Information                     := omit,
                start_Time                               := omit,
                stop_Time                                := omit,
                change_Condition                         := omit,
                diagnostics                              := omit,
                low_Priority_Indicator                   := omit
            } // End of template m_ps_Information_AVP_dummy
            
            /**
             * @desc The IMS-Information send template
             * @param p_node_Functionality  TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.77  IMS-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) IMS_Information_AVP m_ims_Information_AVP_dummy(
                                                                             in template (value) Node_Functionality_AVP p_node_Functionality
            ) := {
                aVP_Header                              := m_aVP_HeaderVid_Mbit1(c_ims_Information_AVP_Code, 0, c_vendId3gpp),
                event_Type                              := omit,
                role_Of_Node                            := omit,
                node_Functionality                      := p_node_Functionality,
                user_Session_Id                         := omit,
                outgoing_Session_Id                     := omit,
                session_Priority                        := omit,
                calling_Party_Address                   := omit,
                called_Party_Address                    := omit,
                called_Asserted_Identity                := omit,
                number_Portability_Routing_Information  := omit,
                carrier_Select_Routing_Information      := omit,
                alternate_Charged_Party_Address         := omit,
                requested_Party_Address                 := omit,
                associated_URI                          := omit,
                time_Stamps                             := omit,
                application_Server_Information          := omit,
                inter_Operator_Identifie                := omit,
                ims_Charging_Identifier                 := omit,
                sdp_Session_Description                 := omit,
//TODO                sdp_Media_Component                     := omit,
                served_Party_IP_Address                 := omit,
                server_Capabilities                     := omit,
//				TODO                trunk_Group_ID                          := omit,
                bearer_Service                          := omit,
                service_Id                              := omit,
                service_Specific_Info                   := omit,
//				TODO                message_Body                            := omit,
                cause_Code                              := omit,
                access_Network_Information              := omit,
//				TODO                early_Media_Description                 := omit, 
                ims_Communication_Service_Identifier    := omit, 
                online_Charging_Flag                    := omit,
//				TODO                real_Time_Tariff_Information            := omit,
                account_Expiration                      := omit,
                initial_IMS_Charging_Identifier         := omit, 
                ims_Emergency_Indicator                 := omit
            } // End of template m_ims_Information_AVP_dummy 
            
            /**
             * @desc The Service-Data-Container send template
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.189 Service-Data-Container AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (omit) Service_Data_Container_AVP m_service_Data_Container_AVP_dummy := {
                aVP_Header                  := m_aVP_HeaderVid_Mbit1(c_service_Data_Container_AVP_Code, 0, c_vendId3gpp),
                aF_Correlation_Information  := omit,
                charging_Rule_Base_Name     := omit,
                accounting_Input_Octets     := omit,
                accounting_Output_Octets    := omit,
                local_Sequence_Number       := omit,
                qos_Information             := omit,
                rating_Group                := omit, 
                change_Time                 := omit, 
                service_Identifier          := omit, 
                service_Specific_Info       := omit, 
                SGSN_Address                := omit, 
                time_First_Usage            := omit,
                time_Last_Usage             := omit,
                time_Usage                  := omit,
                change_Condition            := omit,
                threeGPP_User_Location_Info := omit,
                threeGPP2_BSID              := omit,
                user_CSG_Information        := omit
            } // End of template m_service_Data_Container_AVP_dummy
            
        } // End of group Rf_dummy_avps_templates_send 
        
        group Rf_dummy_avps_templates_receive { 
            
            /**
             * @desc Service-Information AVP, Basic receive template 
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.192 Service-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template Service_Information_AVP mw_service_Information_AVP_dummy := {
                aVP_Header                  := mw_aVP_HeaderVid_Mbit1(c_service_Information_AVP_Code, ?, c_vendId3gpp),
                subscription_Id             := *,
                aoc_Information             := *,
                ps_Information              := *,
                wlan_Information            := *,
                ims_Information             := *,
                mms_Information             := *,
                lcs_Information             := *,
                poc_Information             := *,
                mbms_Information            := *,
                sms_Information             := *,
                mmtel_Information           := *,
                service_Generic_Information := *,
                im_Information              := *,
                dcd_Information             := *
            } // End of template mw_service_Information_AVP_dummy
            
            /**
             * @desc PS-Information AVP, Basic receive template 
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.158 PS-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template PS_Information_AVP mw_ps_Information_AVP_dummy := {
                aVP_Header                               := mw_aVP_HeaderVid_Mbit1(c_ps_Information_AVP_Code, ?, c_vendId3gpp),
                threeGPP_Charging_Id                     := *,
                pdn_Connection_Charging_ID               := *,
                node_Id                                  := *,
                threeGPP_PDP_Type                        := *,
                pdp_Address                              := *,
                pdp_Address_Prefix_Length                := *,
                dynamic_Address_Flag                     := *,
                dynamic_Address_Flag_Extension           := *,
                qos_Information                          := *,
                sgsn_Address                             := *,
                ggsn_Address                             := *,
                sgw_Address                              := *,
                cg_Address                               := *,
                serving_Node_Type                        := *,
                sgw_Change                               := *,
                threeGPP_IMSI_MCC_MNC                    := *,
                imsi_Unauthenticated_Flag                := *,
                threeGPP_GGSN_MCC_MNC                    := *,
                threeGPP_NSAPI                           := *,
                called_Station_Id                        := *,
                threeGPP_Session_Stop_Indicator          := *,
                threeGPP_Selection_Mode                  := *,
                threeGPP_Charging_Characteristics        := *,
                charging_Characteristics_Selection_Mode  := *,
                threeGPP_SGSN_MCC_MNC                    := *,
                threeGPP_MS_TimeZone                     := *,
                charging_Rule_Base_Name                  := *,
                threeGPP_User_Location_Info              := *,
                user_CSG_Information                     := *,
                threeGPP2_BSID                           := *,
                threeGPP_RAT_Type                        := *,
                ps_Furnish_Charging_Information          := *,
                pdp_Context_Type                         := *,
                offline_Charging                         := *,
                traffic_Data_Volumes                     := *,
                service_Data_Container                   := *,
                user_Equipment_Info                      := *,
                terminal_Information                     := *,
                start_Time                               := *,
                stop_Time                                := *,
                change_Condition                         := *,
                diagnostics                              := *,
                low_Priority_Indicator                   := *
            } // End of template mw_ps_Information_AVP_dummy
            
            /**
             * @desc The IMS-Information receive template
             * @param p_node_Functionality  TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.77  IMS-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (present) IMS_Information_AVP mw_ims_Information_AVP_dummy(
                                                                                template (present) Node_Functionality_AVP p_node_Functionality := ?
            ) := {
                aVP_Header                              := mw_aVP_HeaderVid_Mbit1(c_ims_Information_AVP_Code, ?, c_vendId3gpp),
                event_Type                              := *,
                role_Of_Node                            := *,
                node_Functionality                      := p_node_Functionality,
                user_Session_Id                         := *,
                outgoing_Session_Id                     := *,
                session_Priority                        := *,
                calling_Party_Address                   := *,
                called_Party_Address                    := *,
                called_Asserted_Identity                := *,
                number_Portability_Routing_Information  := *,
                carrier_Select_Routing_Information      := *,
                alternate_Charged_Party_Address         := *,
                requested_Party_Address                 := *,
                associated_URI                          := *,
                time_Stamps                             := *,
                application_Server_Information          := *,
                inter_Operator_Identifie                := *,
                ims_Charging_Identifier                 := *,
                sdp_Session_Description                 := *,
//TODO                sdp_Media_Component                     := *,
                served_Party_IP_Address                 := *,
                server_Capabilities                     := *,
//				TODO                trunk_Group_ID                          := *,
                bearer_Service                          := *,
                service_Id                              := *,
                service_Specific_Info                   := *,
//				TODO                message_Body                            := *,
                cause_Code                              := *,
                access_Network_Information              := *,
//				TODO                early_Media_Description                 := *, 
                ims_Communication_Service_Identifier    := *, 
                online_Charging_Flag                    := *,
//				TODO                real_Time_Tariff_Information            := *,
                account_Expiration                      := *,
                initial_IMS_Charging_Identifier         := *, 
                ims_Emergency_Indicator                 := *
            } // End of template mw_ims_Information_AVP_dummy 
            
            /**
             * @desc The Service-Data-Container receive template
             * @param p_aVP_Header                   Header AVP
             * @param p_aF_Correlation_Information   TODO
             * @param p_charging_Rule_Base_Name      TODO
             * @param p_accounting_Input_Octets      TODO
             * @param p_accounting_Output_Octets     TODO
             * @param p_local_Sequence_Number        TODO
             * @param p_qos_Information              TODO
             * @param p_rating_Group                 TODO
             * @param p_change_Time                  TODO
             * @param p_service_Identifier           TODO
             * @param p_service_Specific_Info        TODO
             * @param p_SGSN_Address                 TODO
             * @param p_time_First_Usage             TODO
             * @param p_time_Last_Usage              TODO
             * @param p_time_Usage                   TODO
             * @param p_change_Condition             TODO
             * @param p_threeGPP_User_Location_Info  TODO
             * @param p_threeGPP2_BSID               TODO
             * @param p_user_CSG_Information         TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.189 Service-Data-Container AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (omit) Service_Data_Container_AVP mw_service_Data_Container_AVP_dummy := {
                aVP_Header                  := mw_aVP_HeaderVid_Mbit1(c_service_Data_Container_AVP_Code, ?, c_vendId3gpp),
                aF_Correlation_Information  := omit,
                charging_Rule_Base_Name     := omit,
                accounting_Input_Octets     := omit,
                accounting_Output_Octets    := omit,
                local_Sequence_Number       := omit,
                qos_Information             := omit,
                rating_Group                := omit, 
                change_Time                 := omit, 
                service_Identifier          := omit, 
                service_Specific_Info       := omit, 
                SGSN_Address                := omit, 
                time_First_Usage            := omit,
                time_Last_Usage             := omit,
                time_Usage                  := omit,
                change_Condition            := omit,
                threeGPP_User_Location_Info := omit,
                threeGPP2_BSID              := omit,
                user_CSG_Information        := omit
            } // End of template mw_service_Data_Container_AVP_dummy
            
        } // End of group Rf_dummy_avps_templates_receive 
        
        group Rf_avps_templates_send { 
            
            /**
             * @desc Service-Information AVP, send template 
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.192 Service-Information AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.2: 3GPP specific AVPs
             */
            template (omit) Service_Information_AVP m_service_Information(
                                                                          in template (value) Subscription_Id_AVP               p_subscription_Id,
                                                                          in template (omit) IMS_Information_AVP                p_ims_Information := omit,
                                                                          in template (omit) Service_Generic_Information_AVP    p_service_Generic_Information := omit
            ) modifies m_service_Information_AVP_dummy := {
                subscription_Id             := { p_subscription_Id },
                ims_Information             := p_ims_Information,
                service_Generic_Information := p_service_Generic_Information
            } // End of template m_service_Information
            
            /**
             * @desc 
             */
            template Accounting_Record_Type_AVP m_accounting_Record_Type(
                                                                         in template (value) Acc_Record_Type p_aVP_Data
            ) modifies m_accounting_Record_Type_dummy := {
                aVP_Data := p_aVP_Data
            } // End of template m_accounting_Record_Type 
            
            template Accounting_Record_Number_AVP m_accounting_Record_Number(
                                                                             in template (value) UInt32 p_aVP_Data
            ) modifies m_accounting_Record_Number_dummy := {
                aVP_Data := p_aVP_Data
            } // End of template m_accounting_Record__Number
            
            /**
             * @desc The Accounting-Input-Octets send template 
             * @param p_octetsTransmitted   Number of octets transmitted during the data container recording interval, reflecting the volume counts for uplink traffic for a data flow
             */
            template (value) Accounting_Input_Octets_AVP m_accounting_Input_Octets_AVP(
                                                                                       in template (value) UInt64 p_octetsTransmitted
            ) := {
                aVP_Header          := m_aVP_HeaderVid_Mbit1(c_accounting_Input_Octets_AVP_Code, 8, c_vendId3gpp),
                octetsTransmitted   := p_octetsTransmitted
            } // End of template m_accounting_Input_Octets_AVP 
            
            /**
             * @desc The Accounting-Output-Octets send template 
             * @param p_octetsTransmitted   Number of octets transmitted during the data container recording interval, reflecting the volume counts for downlink traffic for a data flow
             */
            template (value) Accounting_Output_Octets_AVP m_accounting_Output_Octets_AVP(
                                                                                         in template (value) UInt64 p_octetsTransmitted
            ) := {
                aVP_Header          := m_aVP_HeaderVid_Mbit1(c_accounting_Output_Octets_AVP_Code, 8, c_vendId3gpp),
                octetsTransmitted   := p_octetsTransmitted
            } // End of template m_accounting_Output_Octets_AVP 
            
            /**
             * @desc The Event-Type send template 
             * @param p_sip_Method   TODO
             * @param p_event        TODO
             * @param p_expires      TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.65  Event-Type AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (omit) Event_Type_AVP m_event_Type_AVP(
                                                            in template (omit) SIP_Method_AVP    p_sip_Method := omit,
                                                            in template (omit) Event_AVP         p_event := omit,
                                                            in template (omit) Expires_AVP       p_expires := omit
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_event_Type_AVP_Code, f_getEventTypeAVPLength(p_sip_Method, p_event, p_expires), c_vendId3gpp),
                sip_Method := p_sip_Method,
                event := p_event,
                expires := p_expires
            } // End of template m_event_Type_AVP
            
            /**
             * @desc The Event send template 
             * @param p_data_AVP     Holds the content of the "Event" header
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.63  Event AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Event_AVP m_event_AVP(
                                                   in template (value) UTF8String  p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_event_AVP_Code, 4, c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_event_AVP
            
            /**
             * @desc The Event send template 
             * @param p_aVP_Header   Header AVP
             * @param p_data_AVP     Specifies whether the IMS node (except the MRFC) is serving the calling or the called party
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.177 Role-Of-Node AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Role_Of_Node_AVP m_role_Of_Node_AVP(
                                                                 in template (value) Role_Of_Node p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_role_Of_Node_AVP_Code, 4, c_vendId3gpp),
                data_AVP := p_data_AVP
            } // End of template m_role_Of_Node_AVP
            
            /**
             * @desc The User-Session-Id send template 
             * @param p_aVP_Header   Header AVP
             * @param p_data_AVP     Holds the session identifier
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.242 User-Session-Id AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) User_Session_Id_AVP m_user_Session_Id_AVP(
                                                                       in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_user_Session_Id_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_user_Session_Id_AVP
            
            /**
             * @desc The Calling-Party-Address send template 
             * @param p_data_AVP     Holds the session identifier
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.33  Calling-Party-Address AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Calling_Party_Address_AVP m_calling_Party_Address_AVP(
                                                                                   in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_calling_Party_Address_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_calling_Party_Address_AVP
            
            /**
             * @desc The Called-Party-Address send template 
             * @param p_data_AVP     Holds the session identifier
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.32  Called-Party-Address AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Called_Party_Address_AVP m_called_Party_Address_AVP(
                                                                                 in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_called_Party_Address_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_called_Party_Address_AVP
            
            /**
             * @desc The Time-Stamps send template 
             * @param p_sip_Request_Timestamp            TODO
             * @param p_sip_Response_Timestamp           TODO
             * @param p_sip_Request_Timestamp_Fraction   TODO
             * @param p_sip_Response_Timestamp_Fraction  TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.231 Time-Stamps AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (omit) Time_Stamps_AVP m_time_Stamps_AVP(
                                                              in template (omit) SIP_Request_Timestamp_AVP           p_sip_Request_Timestamp := omit,
                                                              in template (omit) SIP_Response_Timestamp_AVP          p_sip_Response_Timestamp := omit,
                                                              in template (omit) SIP_Request_Timestamp_Fraction_AVP  p_sip_Request_Timestamp_Fraction := omit,
                                                              in template (omit) SIP_Response_Timestamp_Fraction_AVP p_sip_Response_Timestamp_Fraction := omit
            ) := {
                aVP_Header                      := m_aVP_HeaderVid_Mbit1(c_time_Stamps_AVP_Code, f_getTimeStampsAVPLength(p_sip_Request_Timestamp, p_sip_Response_Timestamp, p_sip_Request_Timestamp_Fraction, p_sip_Response_Timestamp_Fraction), c_vendId3gpp),
                sip_Request_Timestamp           := p_sip_Request_Timestamp,
                sip_Response_Timestamp          := p_sip_Response_Timestamp,
                sip_Request_Timestamp_Fraction  := p_sip_Request_Timestamp_Fraction,
                sip_Response_Timestamp_Fraction := p_sip_Response_Timestamp_Fraction
            } // End of template m_time_Stamps_AVP
            
            /**
             * @desc The SIP-Request-Timestamp send template 
             * @param p_data_AVP     Holds the time in UTC format of the SIP request 
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.202 SIP-Request-Timestamp AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) SIP_Request_Timestamp_AVP m_sip_Request_Timestamp_AVP(
                                                                                   in template (value) Time p_data_AVPP
            ) := {
                aVP_Header  := mw_aVP_HeaderVid_Mbit1(c_sip_Request_Timestamp_AVP_Code, 4, c_vendId3gpp),
                data_AVP := p_data_AVPP
            } // End of template m_sip_Request_Timestamp_AVP
            
            /**
             * @desc The SIP-Response-Timestamp send template 
             * @param p_data_AVP     Holds the time in UTC format of the SIP response 
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause SIP-Response-Timestamp
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) SIP_Response_Timestamp_AVP m_sip_Response_Timestamp_AVP(
                                                                                     in template (value) Time p_data_AVPP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_sip_Response_Timestamp_AVP_Code, 4, c_vendId3gpp),
                data_AVP := p_data_AVPP
            } // End of template m_sip_Response_Timestamp_AVP
            
            /**
             * @desc The Application-Server send template 
             * @param p_data_AVP     Holds the SIP URL(s) of the AS(s) addressed during the session
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.23  Application-Server AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Application_Server_AVP m_application_Server_AVP(
                                                                             in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_application_Server_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_application_Server_AVP
            
            /**
             * @desc The Application-provided-Called-Party-Address send template 
             * @param p_data_AVP     Holds the called party number (SIP URI, E.164), if it is determined by an application server
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.22  Application-provided-Called-Party-Address AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Application_provided_Called_Party_Address_AVP m_application_provided_Called_Party_Address_AVP(
                                                                                                                           in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_application_provided_Called_Party_Address_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_application_provided_Called_Party_Address_AVP
            
            /**
             * @desc The Inter-Operator-Identifier send template 
             * @param p_originating_IOI  TODO
             * @param p_terminating_IOI  TODO
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.80  Inter-Operator-Identifier AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (omit) Inter_Operator_Identifier_AVP m_inter_Operator_Identifier_AVP(
                                                                                          in template (omit) Originating_IOI_AVP p_originating_IOI := omit,
                                                                                          in template (omit) Terminating_IOI_AVP p_terminating_IOI := omit
            ) := {
                aVP_Header      := m_aVP_HeaderVid_Mbit1(c_inter_Operator_Identifier_AVP_Code, f_getInterOperatorIdentifierAVPLength(p_originating_IOI, p_terminating_IOI), c_vendId3gpp),
                originating_IOI := p_originating_IOI,
                terminating_IOI := p_terminating_IOI
            } // End of template m_inter_Operator_Identifier_AVP
            
            /**
             * @desc The Originating-IOI send template 
             * @param p_data_AVP     holds the Inter Operator Identifier (IOI) for the originating network as generated by the IMS network element which takes responsibility for populating this parameter [404] in a SIP request as described in TS 24.229 [202]
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.123 Originating-IOI AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Originating_IOI_AVP m_originating_IOI_AVP(
                                                                       in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_originating_IOI_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_originating_IOI_AVP
            
            /**
             * @desc The Terminating-IOI send template 
             * @member aVP_Header   Header AVP
             * @member data_AVP     Holds the Inter Operator Identifier (IOI) for the terminating network as generated by the IMS network element which takes responsibility for populating this parameter [404] in a SIP response as described in TS 24.229 [202]
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.225 TTerminatingerminating-IOI AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Terminating_IOI_AVP m_terminating_IOI_AVP(
                                                                       in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_terminating_IOI_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_terminating_IOI_AVP
            
            /**
             * @desc The IMS-Charging-Identifier send template 
             * @member aVP_Header   Header AVP
             * @member data_AVP     Holds the IMS Charging Identifier (ICID) as generated by a IMS node for a SIP session and described in TS 24.229 [204]
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.75  IMS-Charging-Identifier AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) IMS_Charging_Identifier_AVP m_ims_Charging_Identifier_AVP(
                                                                                       in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_ims_Charging_Identifier_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_ims_Charging_Identifier_AVP
            
            /**
             * @desc The SDP-Session-Description send template 
             * @member aVP_Header   Header AVP
             * @member data_AVP     Holds the content of  the SDP line (i=, c=, b=, k=, a=, etc.) in the session description, as described in RFC 4566  [406]
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.184 SDP-Session-Description AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) SDP_Session_Description_AVP m_sdp_Session_Description_AVP(
                                                                                       in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_sdp_Session_Description_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP    := p_data_AVP
            } // End of template m_sdp_Session_Description_AVP
            
            /**
             * @desc The CG-Address send template 
             * @param p_address_AVP    Holds the IP-address of the charging gateway
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.36  CG-Address AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) CG_Address_AVP m_cg_Address_AVP(
                                                             in template (value) Address p_address_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_cg_Address_AVP_Code, f_getEncvalueLength(encvalue(p_address_AVP)), c_vendId3gpp),
                address_AVP := p_address_AVP
            } // End of template m_cg_Address_AVP
            
pintar's avatar
pintar committed
            template (value) Event_Timestamp_AVP m_event_timestamp (UInt32 p_data_AVP) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_event_Timestamp_AVP_Code, 4, omit),
                aVP_Data := p_data_AVP
            } // End of template m_cg_Address_AVP
            
            /**
             * @desc The Bearer-Service send template 
             * @param p_aVP_Header   Header AVP
             * @param p_data_AVP     Holds the used bearer service for the PSTN leg
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.30  Bearer-Service AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Bearer_Service_AVP m_bearer_Service_AVP(
                                                                     in template (value) octetstring p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_bearer_Service_AVP_Code, f_getOctetStringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP := p_data_AVP
            } // End of template m_bearer_Service_AVP
            
            /**
             * @desc The Service-ID send template 
             * @member aVP_Header   Header AVP
             * @member data_AVP     Identifies the service the MRFC is hosting or AoC service
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.190 Service-ID AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Service_Id_AVP m_service_Id_AVP(
                                                             in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_service_Id_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP := p_data_AVP
            } // End of template m_service_Id_AVP
            
            /**
             * @desc The Associated-URI send template 
             * @param p_data_AVP     Holds a non-barred public user identity (SIP URI or TEL URI) associated to the the public user identity under registration
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.26  Associated-URI AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Associated_URI_AVP m_associated_URI_AVP(
                                                                     in template (value) UTF8String p_data_AVP
            ) := {
                aVP_Header  := m_aVP_HeaderVid_Mbit1(c_associated_URI_AVP_Code, f_getUTF8StringLength(valueof(p_data_AVP)), c_vendId3gpp),
                data_AVP := p_data_AVP
            } // End of template m_associated_URI_AVP
            
            /**
             * @desc The Cause-Code send template 
             * @param p_aVP_Header   Header AVP
             * @param p_cause        Includes the cause code value from IMS node
             * 
             * @see ETSI TS 132 299 V10.15.0 Clause 7.2.35  Cause-Code AVP
             * @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
             */
            template (value) Cause_Code_AVP m_cause_Code_AVP(