pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37257?usp=email )
Change subject: library/SDP_Templates: Add templates for precondition qos attributes ......................................................................
library/SDP_Templates: Add templates for precondition qos attributes
Change-Id: I656ec1fa77bf3390a690fb0ed385d0be95c0f6b4 --- M library/SDP_Templates.ttcn 1 file changed, 86 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved
diff --git a/library/SDP_Templates.ttcn b/library/SDP_Templates.ttcn index 525da8e..ece6147 100644 --- a/library/SDP_Templates.ttcn +++ b/library/SDP_Templates.ttcn @@ -147,6 +147,83 @@ } }
+/* rfc3312 */ +const charstring c_SDP_PRECON_TYPE_qos := "qos"; +const charstring c_SDP_PRECON_STRENGTH_TAG_mandatory := "mandatory"; +const charstring c_SDP_PRECON_STRENGTH_TAG_optional := "optional"; +const charstring c_SDP_PRECON_STRENGTH_TAG_none := "none"; +const charstring c_SDP_PRECON_STRENGTH_TAG_failure := "failure"; +const charstring c_SDP_PRECON_STRENGTH_TAG_unknown := "unknown"; +const charstring c_SDP_PRECON_STATUS_TYPE_e2e := "e2e"; +const charstring c_SDP_PRECON_STATUS_TYPE_local := "local"; +const charstring c_SDP_PRECON_STATUS_TYPE_remote := "remote"; +const charstring c_SDP_PRECON_DIR_TAG_none := "none"; +const charstring c_SDP_PRECON_DIR_TAG_send := "send"; +const charstring c_SDP_PRECON_DIR_TAG_recv := "recv"; +const charstring c_SDP_PRECON_DIR_TAG_sendrecv := "sendrecv"; + +template (present) SDP_attribute tr_SDP_curr(charstring status_type, + charstring dir_tag, + charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { + curr := { + attr_value := precondition_type & " " & status_type & " " & dir_tag + } +} +template (present) SDP_attribute tr_SDP_curr_present := { + curr := { + attr_value := ? + } +} +template (value) SDP_attribute ts_SDP_curr(charstring status_type, + charstring dir_tag, + charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { + curr := { + attr_value := precondition_type & " " & status_type & " " & dir_tag + } +} + +template (present) SDP_attribute tr_SDP_des(charstring status_type, + charstring strength_tag, + charstring dir_tag, + charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { + curr := { + attr_value := precondition_type & " " & strength_tag & " " & status_type & " " & dir_tag + } +} +template (present) SDP_attribute tr_SDP_des_present := { + des := { + attr_value := ? + } +} +template (value) SDP_attribute ts_SDP_des(charstring status_type, + charstring strength_tag, + charstring dir_tag, + charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { + des := { + attr_value := precondition_type & " " & strength_tag & " " & status_type & " " & dir_tag + } +} + +template (present) SDP_attribute tr_SDP_conf(charstring status_type, + charstring dir_tag, + charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { + conf := { + attr_value := precondition_type & " " & status_type & " " & dir_tag + } +} +template (present) SDP_attribute tr_SDP_conf_present := { + conf := { + attr_value := ? + } +} +template (value) SDP_attribute ts_SDP_conf(charstring status_type, + charstring dir_tag, + charstring precondition_type := c_SDP_PRECON_TYPE_qos) := { + conf := { + attr_value := precondition_type & " " & status_type & " " & dir_tag + } +} + function f_sdp_addr2addrtype(charstring addr) return charstring { for (var integer i := 0; i < lengthof(addr); i := i + 1) { if (addr[i] == ":") {