Move "connect to L1CTL and RESET" function from LAPDm_RAW_PT to L1CTL_PortType

This commit is contained in:
Harald Welte 2017-07-29 12:55:06 +02:00
parent 484160bf21
commit d1209a6f04
2 changed files with 8 additions and 5 deletions

View File

@ -90,11 +90,7 @@ module LAPDm_RAW_PT {
}
private function f_init() runs on lapdm_CT {
L1CTL.send(L1CTL_connect:{path:=l1ctl_sock_path});
L1CTL.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit});
L1CTL.send(t_L1ctlResetReq(L1CTL_RES_T_SCHED));
L1CTL.receive;
f_connect_reset(L1CTL, l1ctl_sock_path);
set_ph_state(PH_STATE_NULL);
}

View File

@ -67,6 +67,13 @@ module L1CTL_PortType {
pt.send(t_L1CTL_DM_EST_REQ({ false, imm_ass.chan_desc.arfcn }, imm_ass.chan_desc.chan_nr, imm_ass.chan_desc.tsc));
}
function f_connect_reset(L1CTL_PT pt, charstring l1ctl_sock_path := "/tmp/osmocom_l2") {
pt.send(L1CTL_connect:{path:=l1ctl_sock_path});
pt.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit});
pt.send(t_L1ctlResetReq(L1CTL_RES_T_SCHED));
pt.receive;
}
private function L1CTL_to_UD_connect(in L1CTL_connect pin, out UD_connect pout) {
pout.path := pin.path;