Newer
Older
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
* @desc Calculate the length of the Message_Body_AVP to set up the Diameter header
* @param p_content_Type TODO
* @param p_content_Length TODO
*
* @see ETSI TS 132 299 V10.15.0 Clause 7.2.103 Message-Body AVP
* @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
*/
function f_getMessageBodyAVPLength(
in template (value) Content_Type_AVP p_content_Type,
in template (value) Content_Length_AVP p_content_Length
) return AVP_Length {
var AVP_Length v_length := f_getEncvalueLength(encvalue(p_content_Type)) + f_getEncvalueLength(encvalue(p_content_Length));
return v_length;
} // End of function f_getMessageBodyAVPLength
/**
* @desc Calculate the length of the SDP_TimeStamps_AVP to set up the Diameter header
* @param p_sdp_Offer_Timestamp_AVP TODO
* @param p_sdp_Answer_Timestamp_AVP TODO
*
* @see ETSI TS 132 299 V10.15.0 Clause 7.2.58 Early-Media-Description AVP
* @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
*/
function f_getSDPTimeStampsAVPLength(
in template (omit) SDP_Offer_Timestamp_AVP p_sdp_Offer_Timestamp,
in template (omit) SDP_Answer_Timestamp_AVP p_sdp_Answer_Timestamp
) return AVP_Length {
var AVP_Length v_length := 0;
if (ispresent(p_sdp_Offer_Timestamp)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_sdp_Offer_Timestamp));
}
if (ispresent(p_sdp_Answer_Timestamp)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_sdp_Answer_Timestamp));
}
return v_length;
} // End of function f_getSDPTimeStampsAVPLength
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
/**
* @desc Calculate the length of the Service_Generic_Information_AVP to set up the Diameter header
* @param p_application_Server_ID TODO
* @param p_application_Service_Type TODO
* @param p_application_Session_ID TODO
* @param p_delivery_Status TODO
*
* @see ETSI TS 132 299 V10.15.0 Clause 7.2.191 Service-Generic-Information AVP
* @see ETSI TS 132 299 V10.15.0 Table 7.1: Use Of IETF Diameter AVPs
* @see OMA-DDS-Charging_Data-V1_0-20110201-A
*/
function f_getServiceGenericInformationAVPLength(
in template (omit) Application_Server_ID_AVP p_application_Server_ID,
in template (omit) Application_Service_Type_AVP p_application_Service_Type,
in template (omit) Application_Session_ID_AVP p_application_Session_ID,
in template (omit) Delivery_Status_AVP p_delivery_Status
) return AVP_Length {
var AVP_Length v_length := 0;
if (ispresent(p_application_Server_ID)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_application_Server_ID));
}
if (ispresent(p_application_Service_Type)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_application_Service_Type));
}
if (ispresent(p_application_Session_ID)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_application_Session_ID));
}
if (ispresent(p_delivery_Status)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_delivery_Status));
}
return v_length;
} // End of function f_getServiceGenericInformationAVPLength
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
function f_getCCMoneyAVPLength(
in template (value) Unit_Value_AVP p_unit_Value,
in template (omit) Currency_Code_AVP p_currency_Code
) return AVP_Length {
var AVP_Length v_length := f_getEncvalueLength(encvalue(p_unit_Value));
if (ispresent(p_currency_Code)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_currency_Code));
}
return v_length;
} // End of function f_getCCMoneyAVPLength
function f_getCostInformationAVPLength(
in template (value) Unit_Value_AVP p_unit_Value,
in template (value) Currency_Code_AVP p_currency_Code,
in template (omit) Cost_Unit_AVP p_cost_Unit
) return AVP_Length {
var AVP_Length v_length := f_getEncvalueLength(encvalue(p_unit_Value)) + f_getEncvalueLength(encvalue(p_currency_Code));
if (ispresent(p_cost_Unit)) {
v_length := v_length + f_getEncvalueLength(encvalue(p_cost_Unit));
}
return v_length;
} // End of function f_getCostInformationAVPLength
} // End of module DiameterRfRo_Templates