Commit e2a9a0bc authored by Yann Garcia's avatar Yann Garcia
Browse files

Add Diameter encoding functions and Msrp encoding functions

parent 3e750fea
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -8,7 +8,7 @@ module LibMsrp_Functions {
    // LibMsrp
    // LibMsrp
    import from LibMsrp_TypesAndValues all;
    import from LibMsrp_TypesAndValues all;
    
    
    function f_str2msrpUri(in charstring p_uri, out template MsrpURI p_msrpUri) 
    function f_str2msrpUri(in charstring p_uri, out MsrpURI p_msrpUri) 
    return boolean {
    return boolean {
        var integer v_res := 0;
        var integer v_res := 0;
        var bitstring v_oct2bit := oct2bit(char2oct(p_uri));
        var bitstring v_oct2bit := oct2bit(char2oct(p_uri));
+1 −0
Original line number Original line Diff line number Diff line
@@ -3,4 +3,5 @@ sources := \
		LibMsrp_PIXITS.ttcn \
		LibMsrp_PIXITS.ttcn \
		LibMsrp_Templates.ttcn \
		LibMsrp_Templates.ttcn \
		LibMsrp_TypesAndValues.ttcn \
		LibMsrp_TypesAndValues.ttcn \
		../patch_lib_msrp_titan/ttcn/LibMsrp_EncDecDeclarations.ttcn \
+2 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,8 @@ sources := \
    ttcn/LibDiameter_Templates.ttcn \
    ttcn/LibDiameter_Templates.ttcn \
    ttcn/LibDiameter_Types_S6a_AVPs.ttcn3 \
    ttcn/LibDiameter_Types_S6a_AVPs.ttcn3 \
    ttcn/LibDiameter_Types_S9_AVPs.ttcn \
    ttcn/LibDiameter_Types_S9_AVPs.ttcn \
    ../patch_lib_diameter_titan/ttcn/LibDiameter_Types_RfRo_AVPs.ttcn3 \
    ../patch_lib_diameter_titan/ttcn/LibDiameter_EncdecDeclarations.ttcn \
    ../patch_lib_diameter_titan/ttcn/LibDiameter_Types_RfRo_AVPs.ttcn \
    ../patch_lib_diameter_titan/ttcn/LibDiameter_Types_ShDh_AVPs.ttcn \
    ../patch_lib_diameter_titan/ttcn/LibDiameter_Types_ShDh_AVPs.ttcn \
	../patch_lib_diameter_titan/ttcn/LibDiameter_TypesAndValues.ttcn \
	../patch_lib_diameter_titan/ttcn/LibDiameter_TypesAndValues.ttcn \
    ../patch_lib_diameter_titan/ttcn/LibDiameter_Types_Base_AVPs.ttcn \
    ../patch_lib_diameter_titan/ttcn/LibDiameter_Types_Base_AVPs.ttcn \
+271 −2
Original line number Original line Diff line number Diff line
@@ -10,10 +10,279 @@ module LibDiameter_EncdecDeclarations {
    import from LibDiameter_Types_CxDx_AVPs all;
    import from LibDiameter_Types_CxDx_AVPs all;
    import from LibDiameter_Types_RfRo_AVPs all;
    import from LibDiameter_Types_RfRo_AVPs all;


    fx_enc_CER_MSG(in CER_MSG p_CER_MSG) return bitstring
    external function fx_enc_CER_MSG(in CER_MSG p_CER_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    fx_dec_CER_MSG(inout bitstring pdu, out CER_MSG p_CER_MSG)  return integer
    external function fx_dec_CER_MSG(inout bitstring pdu, out CER_MSG p_CER_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}


    external function fx_enc_CEA_MSG(in CEA_MSG p_CEA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_CEA_MSG(inout bitstring pdu, out CEA_MSG p_CEA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_RAR_MSG(in RAR_MSG p_RAR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_RAR_MSG(inout bitstring pdu, out RAR_MSG p_RAR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_RAA_MSG(in RAA_MSG p_RAA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_RAA_MSG(inout bitstring pdu, out RAA_MSG p_RAA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_ACR_MSG(in ACR_MSG p_ACR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_ACR_MSG(inout bitstring pdu, out ACR_MSG p_ACR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_ACA_MSG(in ACA_MSG p_ACA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_ACA_MSG(inout bitstring pdu, out ACA_MSG p_ACA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_ASR_MSG(in ASR_MSG p_ASR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_ASR_MSG(inout bitstring pdu, out ASR_MSG p_ASR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_ASA_MSG(in ASA_MSG p_ASA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_ASA_MSG(inout bitstring pdu, out ASA_MSG p_ASA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_STR_MSG(in STR_MSG p_STR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_STR_MSG(inout bitstring pdu, out STR_MSG p_STR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_STA_MSG(in STA_MSG p_STA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_STA_MSG(inout bitstring pdu, out STA_MSG p_STA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_DWR_MSG(in DWR_MSG p_DWR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_DWR_MSG(inout bitstring pdu, out DWR_MSG p_DWR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_DWA_MSG(in DWA_MSG p_DWA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_DWA_MSG(inout bitstring pdu, out DWA_MSG p_DWA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_DPR_MSG(in DPR_MSG p_DPR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_DPR_MSG(inout bitstring pdu, out DPR_MSG p_DPR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_DPA_MSG(in DPA_MSG p_DPA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_DPA_MSG(inout bitstring pdu, out DPA_MSG p_DPA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_UAR_MSG(in UAR_MSG p_UAR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_UAR_MSG(inout bitstring pdu, out UAR_MSG p_UAR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_UAA_MSG(in UAA_MSG p_UAA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_UAA_MSG(inout bitstring pdu, out UAA_MSG p_UAA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_SAR_MSG(in SAR_MSG p_SAR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_SAR_MSG(inout bitstring pdu, out SAR_MSG p_SAR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_SAA_MSG(in SAA_MSG p_SAA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_SAA_MSG(inout bitstring pdu, out SAA_MSG p_SAA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_LIR_MSG(in LIR_MSG p_LIR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_LIR_MSG(inout bitstring pdu, out LIR_MSG p_LIR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_LIA_MSG(in LIA_MSG p_LIA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_LIA_MSG(inout bitstring pdu, out LIA_MSG p_LIA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_MAR_MSG(in MAR_MSG p_MAR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_MAR_MSG(inout bitstring pdu, out MAR_MSG p_MAR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_MAA_MSG(in MAA_MSG p_MAA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_MAA_MSG(inout bitstring pdu, out MAA_MSG p_MAA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_RTR_MSG(in RTR_MSG p_RTR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_RTR_MSG(inout bitstring pdu, out RTR_MSG p_RTR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_RTA_MSG(in RTA_MSG p_RTA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_RTA_MSG(inout bitstring pdu, out RTA_MSG p_RTA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PPR_MSG(in PPR_MSG p_PPR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PPR_MSG(inout bitstring pdu, out PPR_MSG p_PPR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PPA_MSG(in PPA_MSG p_PPA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PPA_MSG(inout bitstring pdu, out PPA_MSG p_PPA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_UDR_MSG(in UDR_MSG p_UDR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_UDR_MSG(inout bitstring pdu, out UDR_MSG p_UDR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_UDA_MSG(in UDA_MSG p_UDA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_UDA_MSG(inout bitstring pdu, out UDA_MSG p_UDA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PUR_MSG(in PUR_MSG p_PUR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PUR_MSG(inout bitstring pdu, out PUR_MSG p_PUR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PUA_MSG(in PUA_MSG p_PUA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PUA_MSG(inout bitstring pdu, out PUA_MSG p_PUA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_SNR_MSG(in SNR_MSG p_SNR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_SNR_MSG(inout bitstring pdu, out SNR_MSG p_SNR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_SNA_MSG(in SNA_MSG p_SNA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_SNA_MSG(inout bitstring pdu, out SNA_MSG p_SNA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PNR_MSG(in PNR_MSG p_PNR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PNR_MSG(inout bitstring pdu, out PNR_MSG p_PNR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PNA_MSG(in PNA_MSG p_PNA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PNA_MSG(inout bitstring pdu, out PNA_MSG p_PNA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_CCR_MSG(in CCR_MSG p_CCR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_CCR_MSG(inout bitstring pdu, out CCR_MSG p_CCR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_CCA_MSG(in CCA_MSG p_CCA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_CCA_MSG(inout bitstring pdu, out CCA_MSG p_CCA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_AAR_MSG(in AAR_MSG p_AAR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_AAR_MSG(inout bitstring pdu, out AAR_MSG p_AAR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_AAA_MSG(in AAA_MSG p_AAA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_AAA_MSG(inout bitstring pdu, out AAA_MSG p_AAA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_ULR_MSG(in ULR_MSG p_ULR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_ULR_MSG(inout bitstring pdu, out ULR_MSG p_ULR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_ULA_MSG(in ULA_MSG p_ULA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_ULA_MSG(inout bitstring pdu, out ULA_MSG p_ULA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_AIR_MSG(in AIR_MSG p_AIR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_AIR_MSG(inout bitstring pdu, out AIR_MSG p_AIR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_AIA_MSG(in AIA_MSG p_AIA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_AIA_MSG(inout bitstring pdu, out AIA_MSG p_AIA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_CLR_MSG(in CLR_MSG p_CLR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_CLR_MSG(inout bitstring pdu, out CLR_MSG p_CLR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_CLA_MSG(in CLA_MSG p_CLA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_CLA_MSG(inout bitstring pdu, out CLA_MSG p_CLA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_IDR_MSG(in IDR_MSG p_IDR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_IDR_MSG(inout bitstring pdu, out IDR_MSG p_IDR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_IDA_MSG(in IDA_MSG p_IDA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_IDA_MSG(inout bitstring pdu, out IDA_MSG p_IDA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_DSR_MSG(in DSR_MSG p_DSR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_DSR_MSG(inout bitstring pdu, out DSR_MSG p_DSR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_DSA_MSG(in DSA_MSG p_DSA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_DSA_MSG(inout bitstring pdu, out DSA_MSG p_DSA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_RSR_MSG(in RSR_MSG p_RSR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_RSR_MSG(inout bitstring pdu, out RSR_MSG p_RSR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_RSA_MSG(in RSA_MSG p_RSA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_RSA_MSG(inout bitstring pdu, out RSA_MSG p_RSA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_NOR_MSG(in NOR_MSG p_NOR_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_NOR_MSG(inout bitstring pdu, out NOR_MSG p_NOR_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_NOA_MSG(in NOA_MSG p_NOA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_NOA_MSG(inout bitstring pdu, out NOA_MSG p_NOA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PUER_MSG(in PUER_MSG p_PUER_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PUER_MSG(inout bitstring pdu, out PUER_MSG p_PUER_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_PUEA_MSG(in PUEA_MSG p_PUEA_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_PUEA_MSG(inout bitstring pdu, out PUEA_MSG p_PUEA_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}

    external function fx_enc_UNKNOWN_MSG(in UNKNOWN_MSG p_UNKNOWN_MSG) return bitstring
        with {extension "prototype(convert) encode(DIAMETERCodec)"}
    external function fx_dec_UNKNOWN_MSG(inout bitstring pdu, out UNKNOWN_MSG p_UNKNOWN_MSG)  return integer
        with {extension "prototype(sliding) decode(DIAMETERCodec)"}


} // End of module LibDiameter_EncdecDeclarations
} // End of module LibDiameter_EncdecDeclarations
 No newline at end of file
+2 −3
Original line number Original line Diff line number Diff line
@@ -2908,6 +2908,5 @@ group BasicTypesAndConstants{
    }//End group HeaderAndBodyTypes
    }//End group HeaderAndBodyTypes


} with {   
} with {   
//    variant ""
    encode "DIAMETERCodec"; variant ""
    encode "DIAMETERCodec"
} // End module LibDiameter_TypesAndValues
} // End module LibDiameter_TypesAndValues
Loading