library/RSL_Emulation: use existing tr_ASP_RSL_UD template

Change-Id: I4c4a98458cfa33512db661b5435f484a38e2ef4f
This commit is contained in:
Vadim Yanitskiy 2020-05-25 22:08:23 +07:00
parent 493abe7ec6
commit a2c12c9c4e
1 changed files with 8 additions and 14 deletions

View File

@ -332,12 +332,6 @@ type component RSL_Emulation_CT {
}
/* template for an ASP_RSL_Unitdata as we receive it from the IPA_Emulateion component */
private template ASP_RSL_Unitdata tr_RSL(template RSL_Message rsl, template IpaStreamId sid := ?) := {
streamId := sid,
rsl := rsl
}
private function f_trx_by_streamId(IpaStreamId id) return integer {
return enum2int(id);
}
@ -388,7 +382,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_PAGING_LOAD_IND(23)));
}
[not bts_role] IPA_PT.receive(tr_ASP_IPA_EV(ASP_IPA_EVENT_ID_ACK)) { }
[bts_role] IPA_PT.receive(tr_RSL(tr_RSL_IMM_ASSIGN)) -> value rx_rsl {
[bts_role] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_IMM_ASSIGN)) -> value rx_rsl {
var GsmRrMessage rr;
var OCT1 ra;
var GsmFrameNumber fn;
@ -424,7 +418,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
}
}
}
[not bts_role] IPA_PT.receive(tr_RSL(tr_RSL_CHAN_RQD(?))) -> value rx_rsl {
[not bts_role] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_CHAN_RQD(?))) -> value rx_rsl {
var RSL_IE_RequestRef req_ref;
req_ref := rx_rsl.rsl.ies[1].body.req_ref;
cid := f_cid_by_ra_fn2(req_ref.ra, req_ref.frame_nr);
@ -436,7 +430,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
}
}
[bts_role] IPA_PT.receive(tr_RSL(tr_RSL_PAGING_CMD(?, ?))) -> value rx_rsl {
[bts_role] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_PAGING_CMD(?, ?))) -> value rx_rsl {
/* broadcast to all clients? */
for (i := 0; i < sizeof(ConnectionTable); i := i + 1) {
if (ispresent(ConnectionTable[i].comp_ref)) {
@ -446,24 +440,24 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
}
/* Forward common channel management to the special port for it */
[] IPA_PT.receive(tr_RSL(tr_RSL_MsgTypeT(?))) -> value rx_rsl {
[] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeT(?))) -> value rx_rsl {
CCHAN_PT.send(rx_rsl);
}
/* Forward common channel management to the special port for it */
[] IPA_PT.receive(tr_RSL(tr_RSL_MsgTypeC(?))) -> value rx_rsl {
[] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeC(?))) -> value rx_rsl {
CCHAN_PT.send(rx_rsl);
}
/* blindly acknowledge all channel activations */
[bts_role] IPA_PT.receive(tr_RSL(tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) -> value rx_rsl {
[bts_role] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeD(RSL_MT_CHAN_ACTIV))) -> value rx_rsl {
chan_nr := rx_rsl.rsl.ies[0].body.chan_nr;
trx_nr := f_trx_by_streamId(rx_rsl.streamId);
f_store_last_act_data(trx_nr, chan_nr, rx_rsl.rsl);
IPA_PT.send(ts_ASP_RSL_UD(ts_RSL_CHAN_ACT_ACK(chan_nr, 23), rx_rsl.streamId));
}
[not dchan_suspended] IPA_PT.receive(tr_RSL(tr_RSL_MsgTypeDR(?))) -> value rx_rsl {
[not dchan_suspended] IPA_PT.receive(tr_ASP_RSL_UD(tr_RSL_MsgTypeDR(?))) -> value rx_rsl {
/* dispatch to channel based on ChanId */
cid := f_cid_by_chan_nr(f_trx_by_streamId(rx_rsl.streamId),
rx_rsl.rsl.ies[0].body.chan_nr);
@ -497,7 +491,7 @@ function main(boolean bts_role := true) runs on RSL_Emulation_CT {
IPA_PT.send(ts_ASP_RSL_UD(rx_rsl_msg, ConnectionTable[cid].stream_id));
}
[] CCHAN_PT.receive(tr_RSL(?)) -> value rx_rsl {
[] CCHAN_PT.receive(tr_ASP_RSL_UD(?)) -> value rx_rsl {
IPA_PT.send(ts_ASP_RSL_UD(rx_rsl.rsl, rx_rsl.streamId));
}