Change in osmo-ttcn3-hacks[master]: Osmux_Emulation: Add DATA port
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29273 ) Change subject: Osmux_Emulation: Add DATA port ...................................................................... Osmux_Emulation: Add DATA port Similar to what's already present in RTPEM_Emulation, this allows tests to retrieve the Osmux messages received. Related: OS#5987 Change-Id: Id9aa3a0a02ef5a5e39b4df8a1c165f35255829ab --- M library/OSMUX_Emulation.ttcn 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/73/29273/1 diff --git a/library/OSMUX_Emulation.ttcn b/library/OSMUX_Emulation.ttcn index 10338d2..c6999de 100644 --- a/library/OSMUX_Emulation.ttcn +++ b/library/OSMUX_Emulation.ttcn @@ -67,6 +67,8 @@ /* user-facing port for controlling the binding */ port OsmuxEM_CTRL_PT CTRL; + /* user-facing port for sniffing Osmux frames */ + port OsmuxEM_DATA_PT DATA; /* configurable by user, should be fixed */ var OsmuxemConfig g_cfg := c_OsmuxemDefaultCfg; @@ -190,6 +192,10 @@ OsmuxEM_stats_get, OsmuxEM_register_rxhandle, OsmuxEM_register_txhandle; } with { extension "internal" }; +type port OsmuxEM_DATA_PT message { + inout OSMUX_PDU; +} with { extension "internal" }; + function f_osmuxem_bind(OsmuxEM_CTRL_PT pt, in HostName local_host, inout PortNumber local_port) { pt.call(OsmuxEM_bind:{local_host, local_port}) { [] pt.getreply(OsmuxEM_bind:{local_host, ?}) -> param (local_port) {}; @@ -556,6 +562,9 @@ if (ispresent(g_cfg.rx_fixed_payload) and rx_osmux.msg.osmux_amr.data != payload_truncated) { g_stat.num_pkts_rx_err_payload := g_stat.num_pkts_rx_err_payload + 1; } + if (DATA.checkstate("Connected")) { + DATA.send(rx_osmux.msg); + } } /* process received Osmux Dummy if receiver enabled */ [g_rx_enabled] OSMUX.receive(tr_osmux_dummy) -> value rx_osmux { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29273 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id9aa3a0a02ef5a5e39b4df8a1c165f35255829ab Gerrit-Change-Number: 29273 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin