summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-02-13 16:43:58 +0100
committerHarald Welte <laforge@osmocom.org>2021-02-13 16:49:25 +0100
commit516c5c725029d546602889a198507498a187443d (patch)
tree96bc932077137c234ac10e521536202df3bc30e3
parent3bd182f3b37cd4d14bb7809a888c0cab159acce2 (diff)
NS_Emulation: factor-out as_ns_common_status() altstep
This is a new altstep which groups all handling of NsStatusInd. Right now it's only used from one place, but upcoming patches will re-use it elsewhere. Change-Id: I4e8e7d19c764cc977beb84a6859c9ce73518b653
-rw-r--r--library/NS_Emulation.ttcnpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 24c9941d..1b9b1df1 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -352,13 +352,8 @@ module NS_Emulation {
return res;
}
- private altstep as_ns_common() runs on NS_CT {
+ private altstep as_ns_common_status() runs on NS_CT {
var NsStatusIndication rx_nssi;
- var NsUnitdataIndication rx_nsudi;
- var NsUnitdataRequest rx_nsudr;
- var NsDisableVcRequest rx_disar;
- var NsEnableVcRequest rx_enar;
- /* pass from NS-VCs up to user */
[] NSVC.receive(tr_NsStsInd(g_config.nsei, ?, ?, NSVC_S_ALIVE_UNBLOCKED)) -> value rx_nssi {
/* check if this one is the first to be unblocked */
var integer num_nsvc_unblocked := f_count_nsvcs_in_state(NSVC_S_ALIVE_UNBLOCKED);
@@ -385,6 +380,15 @@ module NS_Emulation {
Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
log2str("Received NsStatusInd for invalid NSEI: ", rx_nssi));
}
+ }
+
+ private altstep as_ns_common() runs on NS_CT {
+ var NsUnitdataIndication rx_nsudi;
+ var NsUnitdataRequest rx_nsudr;
+ var NsDisableVcRequest rx_disar;
+ var NsEnableVcRequest rx_enar;
+ /* pass from NS-VCs up to user */
+ [] as_ns_common_status();
[] NSVC.receive(tr_NsUdInd(g_config.nsei, ?, ?)) -> value rx_nsudi {
NS_SP.send(rx_nsudi);
}