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
diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp
index 24c9941..1b9b1df 100644
--- a/library/NS_Emulation.ttcnpp
+++ b/library/NS_Emulation.ttcnpp
@@ -352,13 +352,8 @@
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 @@
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);
}