[PATCH] osmo-ttcn3-hacks[master]: RTP_Emulation: Add convenience helper functions around proce...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Mar 29 06:53:42 UTC 2018


Review at  https://gerrit.osmocom.org/7569

RTP_Emulation: Add convenience helper functions around procedure calls

Change-Id: I413aa2b86c2aebe8017112926fc88af0de4d43b7
---
M library/RTP_Emulation.ttcn
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/7569/1

diff --git a/library/RTP_Emulation.ttcn b/library/RTP_Emulation.ttcn
index 4b8c397..90a769c 100644
--- a/library/RTP_Emulation.ttcn
+++ b/library/RTP_Emulation.ttcn
@@ -160,6 +160,36 @@
 	inout RTPEM_bind, RTPEM_connect, RTPEM_mode, RTPEM_configure, RTPEM_stats_get;
 } with { extension "internal" };
 
+function f_rtpem_bind(RTPEM_CTRL_PT pt, in HostName local_host, inout PortNumber local_port) {
+	pt.call(RTPEM_bind:{local_host, local_port}) {
+		[] pt.getreply(RTPEM_bind:{local_host, ?}) -> param (local_port) {};
+	}
+}
+function f_rtpem_connect(RTPEM_CTRL_PT pt, in HostName remote_host, in PortNumber remote_port) {
+	pt.call(RTPEM_connect:{remote_host, remote_port}) {
+		[] pt.getreply(RTPEM_connect:{remote_host, remote_port}) {};
+	}
+}
+function f_rtpem_mode(RTPEM_CTRL_PT pt, in RtpemMode mode) {
+	pt.call(RTPEM_mode:{mode}) {
+		[] pt.getreply(RTPEM_mode:{mode}) {};
+	}
+}
+function f_rtpem_configure(RTPEM_CTRL_PT pt, in RtpemConfig cfg) {
+	pt.call(RTPEM_configure:{cfg}) {
+		[] pt.getreply(RTPEM_configure:{cfg}) {};
+	}
+}
+function f_rtpem_stats_get(RTPEM_CTRL_PT pt, boolean rtcp := false) return RtpemStats {
+	var RtpemStats stats;
+	pt.call(RTPEM_stats_get:{-, rtcp}) {
+		[] pt.getreply(RTPEM_stats_get:{?, rtcp}) -> param(stats) {};
+	}
+	return stats;
+}
+
+
+
 template PDU_RTP ts_RTP(BIT32_BO_LAST ssrc, INT7b pt, LIN2_BO_LAST seq, uint32_t ts,
 			octetstring payload, BIT1 marker := '0'B) := {
 	version := 2,

-- 
To view, visit https://gerrit.osmocom.org/7569
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I413aa2b86c2aebe8017112926fc88af0de4d43b7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list