From 64fd02b80d1c054e5c28f0044d7aa5173acbc47f Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 21 Dec 2021 18:19:42 +0100 Subject: [PATCH] IuUP_Emulation: Fix frame number wrap-around As seen when running a test: IuUP_Emulation.ttcn:150 Dynamic test case error: While RAW-encoding type '@IuUP_Types.IuUP_PDU': There are insufficient bits to encode '@IuUP_Types.IuUP_PDU_Type_0.frame_nr' Change-Id: Ic9e69115c49545a7b9797d8f85568d5e91dfb329 --- library/IuUP_Emulation.ttcn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/IuUP_Emulation.ttcn b/library/IuUP_Emulation.ttcn index 56384ee70..b35602cef 100644 --- a/library/IuUP_Emulation.ttcn +++ b/library/IuUP_Emulation.ttcn @@ -143,7 +143,7 @@ function f_IuUP_Em_tx_encap(inout IuUP_Entity st, in octetstring payload) return } else { pdu := valueof(ts_IuUP_Type1(st.tx_next_frame_nr, 0, payload)); } - st.tx_next_frame_nr := st.tx_next_frame_nr + 1; + st.tx_next_frame_nr := (st.tx_next_frame_nr + 1) mod 16; } } if (isvalue(pdu)) {