Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 1 | /* dual-faced port that wraps an Unixdomain port and encodes/decodes L1CTL |
| 2 | * (C) 2017-2019 Harald Welte <laforge@gnumonks.org> |
| 3 | * contributions by sysmocom - s.f.m.c. GmbH |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * Released under the terms of GNU General Public License, Version 2 or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 10 | */ |
| 11 | |
Harald Welte | 52c713c | 2017-07-16 15:44:44 +0200 | [diff] [blame] | 12 | module L1CTL_PortType { |
| 13 | import from L1CTL_Types all; |
| 14 | import from UD_PortType all; |
Harald Welte | aaa0dfd | 2021-02-04 16:58:53 +0100 | [diff] [blame] | 15 | import from Socket_API_Definitions all; |
Harald Welte | 52c713c | 2017-07-16 15:44:44 +0200 | [diff] [blame] | 16 | import from UD_Types all; |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 17 | import from Osmocom_Types all; |
| 18 | import from GSM_Types all; |
Harald Welte | 9419c8a | 2017-07-30 04:07:05 +0200 | [diff] [blame] | 19 | import from GSM_RR_Types all; |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 20 | import from L1CTL_PortType_CtrlFunct all; |
Harald Welte | 52c713c | 2017-07-16 15:44:44 +0200 | [diff] [blame] | 21 | |
| 22 | type record L1CTL_connect { |
| 23 | charstring path |
| 24 | } |
| 25 | |
| 26 | type record L1CTL_connect_result { |
| 27 | UD_Result_code result_code optional, |
| 28 | charstring err optional |
| 29 | } |
| 30 | |
Harald Welte | f68765d | 2017-08-20 22:54:57 +0200 | [diff] [blame] | 31 | modulepar { |
| 32 | charstring m_l1ctl_sock_path := "/tmp/osmocom_l2"; |
| 33 | } |
| 34 | |
Harald Welte | aaa0dfd | 2021-02-04 16:58:53 +0100 | [diff] [blame] | 35 | function f_L1CTL_getMsgLen(in octetstring stream, inout Socket_API_Definitions.ro_integer args) return integer { |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 36 | var integer stream_len := lengthof(stream); |
| 37 | var integer len; |
| 38 | if (stream_len < 2) { |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 39 | return -1; |
| 40 | } |
| 41 | len := 2 + oct2int(substr(stream, 0, 2)); |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 42 | return len; |
| 43 | } |
| 44 | |
Vadim Yanitskiy | 1acc7bb | 2020-11-14 04:24:57 +0700 | [diff] [blame] | 45 | function f_L1CTL_FBSB(L1CTL_PT pt, GsmBandArfcn arfcn, |
| 46 | L1ctlCcchMode ccch_mode := CCCH_MODE_COMBINED, |
| 47 | integer rxlev_exp := 57) |
| 48 | { |
Harald Welte | 3757e60 | 2018-03-10 17:12:02 +0100 | [diff] [blame] | 49 | timer T := 15.0; |
Harald Welte | 8fe9eba | 2018-03-09 17:03:49 +0100 | [diff] [blame] | 50 | for (var integer i := 0; i < 10; i := i+1) { |
Stefan Sperling | 0258590 | 2018-08-30 17:03:50 +0200 | [diff] [blame] | 51 | var L1ctlDlMessage dl; |
Pau Espin Pedrol | 752ffd5 | 2018-06-07 13:55:45 +0200 | [diff] [blame] | 52 | pt.send(ts_L1CTL_FBSB_REQ(arfcn, valueof(t_L1CTL_FBSB_F_ALL), 0, ccch_mode, rxlev_exp)); |
Harald Welte | 8fe9eba | 2018-03-09 17:03:49 +0100 | [diff] [blame] | 53 | T.start |
| 54 | alt { |
Harald Welte | f8df4cb | 2018-03-10 15:15:08 +0100 | [diff] [blame] | 55 | [] pt.receive(tr_L1CTL_FBSB_CONF(0)) { return; }; |
Stefan Sperling | 0258590 | 2018-08-30 17:03:50 +0200 | [diff] [blame] | 56 | [i >= 9] pt.receive(tr_L1CTL_FBSB_CONF(?)) -> value dl { |
| 57 | setverdict(fail, "FBSB Failed with non-zero return code ", dl.payload.fbsb_conf.result); |
Daniel Willmann | e4ff537 | 2018-07-05 17:35:03 +0200 | [diff] [blame] | 58 | mtc.stop; |
Harald Welte | 7d7d26c | 2018-02-22 18:52:28 +0100 | [diff] [blame] | 59 | }; |
Harald Welte | f8df4cb | 2018-03-10 15:15:08 +0100 | [diff] [blame] | 60 | [] pt.receive(tr_L1CTL_FBSB_CONF(?)) { |
Harald Welte | 3757e60 | 2018-03-10 17:12:02 +0100 | [diff] [blame] | 61 | f_sleep(1.0); |
Harald Welte | f8df4cb | 2018-03-10 15:15:08 +0100 | [diff] [blame] | 62 | } |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 63 | [] pt.receive { repeat; }; |
Harald Welte | 3757e60 | 2018-03-10 17:12:02 +0100 | [diff] [blame] | 64 | [] T.timeout { |
Vadim Yanitskiy | de8af3d | 2019-06-12 01:34:05 +0700 | [diff] [blame] | 65 | setverdict(fail, "Timeout waiting for L1CTL_FBSB_CONF"); |
Daniel Willmann | e4ff537 | 2018-07-05 17:35:03 +0200 | [diff] [blame] | 66 | mtc.stop; |
Harald Welte | 3757e60 | 2018-03-10 17:12:02 +0100 | [diff] [blame] | 67 | }; |
| 68 | } |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | function f_L1CTL_CCCH_MODE(L1CTL_PT pt, L1ctlCcchMode ccch_mode) { |
| 73 | timer T := 2.0; |
| 74 | pt.send(ts_L1CTL_CCCH_MODE_REQ(ccch_mode)); |
| 75 | T.start; |
| 76 | alt { |
| 77 | [] pt.receive(tr_L1CTL_CCCH_MODE_CONF) { } |
| 78 | [] pt.receive { repeat; } |
| 79 | [] T.timeout { |
Vadim Yanitskiy | de8af3d | 2019-06-12 01:34:05 +0700 | [diff] [blame] | 80 | setverdict(fail, "Timeout waiting for L1CTL_CCCH_MODE_CONF"); |
Daniel Willmann | e4ff537 | 2018-07-05 17:35:03 +0200 | [diff] [blame] | 81 | mtc.stop; |
Harald Welte | 8fe9eba | 2018-03-09 17:03:49 +0100 | [diff] [blame] | 82 | } |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 83 | } |
| 84 | } |
| 85 | |
Vadim Yanitskiy | 52787bf | 2020-10-19 17:34:52 +0700 | [diff] [blame] | 86 | function f_L1CTL_TCH_MODE(L1CTL_PT pt, L1ctlTchMode tch_mode) { |
| 87 | timer T := 2.0; |
| 88 | pt.send(ts_L1CTL_TCH_MODE_REQ(tch_mode)); |
| 89 | T.start; |
| 90 | alt { |
| 91 | [] pt.receive(tr_L1CTL_MsgType(L1CTL_TCH_MODE_CONF)) { } |
| 92 | [] pt.receive { repeat; } |
| 93 | [] T.timeout { |
| 94 | setverdict(fail, "Timeout waiting for L1CTL_TCH_MODE_CONF"); |
| 95 | mtc.stop; |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | |
Vadim Yanitskiy | e432ba9 | 2019-05-31 18:44:13 +0700 | [diff] [blame] | 100 | function f_L1CTL_RACH(L1CTL_PT pt, uint8_t ra, uint8_t combined := 1, uint16_t offset := 0, |
| 101 | template (value) RslChannelNr chan_nr := ts_RslChanNr_RACH(0), |
| 102 | template (value) RslLinkId link_id := ts_RslLinkID_DCCH(0)) |
| 103 | return GsmFrameNumber { |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 104 | var L1ctlDlMessage rc; |
| 105 | var GsmFrameNumber fn; |
| 106 | timer T := 2.0; |
| 107 | T.start |
Vadim Yanitskiy | e432ba9 | 2019-05-31 18:44:13 +0700 | [diff] [blame] | 108 | pt.send(ts_L1CTL_RACH_REQ(ra, combined, offset, chan_nr, link_id)) |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 109 | alt { |
Vadim Yanitskiy | e7c4a99 | 2020-10-19 13:10:23 +0700 | [diff] [blame] | 110 | [] pt.receive(tr_L1CTL_RACH_CONF) -> value rc { fn := rc.dl_info.frame_nr }; |
| 111 | [] pt.receive { repeat; }; |
| 112 | [] T.timeout { |
| 113 | setverdict(fail, "Timeout waiting for L1CTL_RACH_CONF"); |
| 114 | mtc.stop; |
| 115 | } |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 116 | } |
| 117 | return fn; |
| 118 | } |
| 119 | |
Vadim Yanitskiy | 51cbc10 | 2019-04-22 06:37:30 +0700 | [diff] [blame] | 120 | function f_L1CTL_EXT_RACH( |
| 121 | L1CTL_PT pt, uint16_t ra11, L1ctlRachSynchSeq seq, |
| 122 | uint8_t combined := 1, uint16_t offset := 0 |
| 123 | ) return GsmFrameNumber { |
| 124 | var L1ctlDlMessage rc; |
| 125 | var GsmFrameNumber fn; |
| 126 | timer T := 2.0; |
| 127 | |
| 128 | T.start; |
| 129 | pt.send(ts_L1CTL_EXT_RACH_REQ(ra11, seq, combined, offset)); |
| 130 | alt { |
Vadim Yanitskiy | e7c4a99 | 2020-10-19 13:10:23 +0700 | [diff] [blame] | 131 | [] pt.receive(tr_L1CTL_RACH_CONF) -> value rc { fn := rc.dl_info.frame_nr }; |
| 132 | [] pt.receive { repeat; }; |
| 133 | [] T.timeout { |
| 134 | setverdict(fail, "Timeout waiting for (extended) L1CTL_RACH_CONF"); |
| 135 | mtc.stop; |
| 136 | } |
Vadim Yanitskiy | 51cbc10 | 2019-04-22 06:37:30 +0700 | [diff] [blame] | 137 | } |
| 138 | |
| 139 | return fn; |
| 140 | } |
| 141 | |
Harald Welte | 3705273 | 2018-03-09 19:38:46 +0100 | [diff] [blame] | 142 | function f_L1CTL_PARAM(L1CTL_PT pt, uint8_t ta, uint8_t tx_power) { |
Harald Welte | f8df4cb | 2018-03-10 15:15:08 +0100 | [diff] [blame] | 143 | pt.send(ts_L1CTL_PAR_REQ(ta, tx_power)); |
Harald Welte | 3705273 | 2018-03-09 19:38:46 +0100 | [diff] [blame] | 144 | } |
| 145 | |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 146 | function f_L1CTL_WAIT_IMM_ASS(L1CTL_PT pt, uint8_t ra, GsmFrameNumber rach_fn) return ImmediateAssignment { |
Vadim Yanitskiy | 23b7440 | 2019-09-09 16:43:29 +0200 | [diff] [blame] | 147 | var template GsmRrMessage rr_imm_ass; |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 148 | var L1ctlDlMessage dl; |
| 149 | var GsmRrMessage rr; |
| 150 | timer T := 10.0; |
Vadim Yanitskiy | 23b7440 | 2019-09-09 16:43:29 +0200 | [diff] [blame] | 151 | |
| 152 | /* Prepare generic template (for both CS and PS) */ |
| 153 | rr_imm_ass := tr_IMM_ASS(ra, rach_fn); |
| 154 | rr_imm_ass.payload.imm_ass.ded_or_tbf := ?; |
| 155 | rr_imm_ass.payload.imm_ass.pkt_chan_desc := *; |
| 156 | rr_imm_ass.payload.imm_ass.chan_desc := *; |
| 157 | |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 158 | T.start; |
| 159 | alt { |
Vadim Yanitskiy | e7c4a99 | 2020-10-19 13:10:23 +0700 | [diff] [blame] | 160 | [] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl { |
| 161 | rr := dec_GsmRrMessage(dl.payload.data_ind.payload); |
| 162 | log("PCH/AGCH DL RR: ", rr); |
| 163 | if (match(rr, rr_imm_ass)) { |
| 164 | log("Received IMM.ASS for our RACH!"); |
| 165 | } else { |
| 166 | repeat; |
| 167 | } |
| 168 | }; |
| 169 | [] pt.receive { repeat }; |
| 170 | [] T.timeout { |
| 171 | setverdict(fail, "Timeout waiting for IMM ASS"); |
| 172 | mtc.stop; |
| 173 | } |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 174 | } |
| 175 | T.stop; |
| 176 | return rr.payload.imm_ass; |
| 177 | } |
| 178 | |
Harald Welte | b669ee0 | 2018-03-09 12:50:02 +0100 | [diff] [blame] | 179 | function f_L1CTL_WAIT_IMM_ASS_TBF_DL(L1CTL_PT pt, GprsTlli tlli) return ImmediateAssignment { |
Vadim Yanitskiy | 6edd4f5 | 2019-09-09 01:51:09 +0200 | [diff] [blame] | 180 | var template PacketDlAssign dl_ass := tr_PacketDlAssign(tlli); |
| 181 | var template IaRestOctets rest := tr_IaRestOctets_DLAss(dl_ass); |
Harald Welte | b669ee0 | 2018-03-09 12:50:02 +0100 | [diff] [blame] | 182 | var L1ctlDlMessage dl; |
| 183 | var GsmRrMessage rr; |
| 184 | timer T := 10.0; |
| 185 | T.start; |
| 186 | alt { |
Vadim Yanitskiy | e7c4a99 | 2020-10-19 13:10:23 +0700 | [diff] [blame] | 187 | [] pt.receive(tr_L1CTL_DATA_IND(t_RslChanNr_PCH_AGCH(0))) -> value dl { |
| 188 | /* TODO: use decmatch tr_IaRestOctets_DLAss(...) instead */ |
| 189 | rr := dec_GsmRrMessage(dl.payload.data_ind.payload); |
| 190 | log("PCH/AGCN DL RR: ", rr); |
| 191 | if (match(rr, tr_IMM_TBF_ASS(dl := true, rest := rest))) { |
| 192 | log("Received IMM.ASS for our TLLI!"); |
| 193 | } else { |
| 194 | repeat; |
| 195 | } |
| 196 | }; |
| 197 | [] pt.receive { repeat }; |
| 198 | [] T.timeout { |
| 199 | setverdict(fail, "Timeout waiting for TBF IMM ASS"); |
| 200 | mtc.stop; |
| 201 | } |
Harald Welte | b669ee0 | 2018-03-09 12:50:02 +0100 | [diff] [blame] | 202 | } |
| 203 | T.stop; |
| 204 | return rr.payload.imm_ass; |
| 205 | } |
| 206 | |
Harald Welte | b3c226e | 2017-07-30 17:18:01 +0200 | [diff] [blame] | 207 | function f_L1CTL_TBF_CFG(L1CTL_PT pt, boolean is_uplink, TfiUsfArr tfi_usf) { |
| 208 | timer T := 2.0; |
| 209 | T.start; |
Harald Welte | f8df4cb | 2018-03-10 15:15:08 +0100 | [diff] [blame] | 210 | pt.send(ts_L1CTL_TBF_CFG_REQ(is_uplink, tfi_usf)); |
Harald Welte | b3c226e | 2017-07-30 17:18:01 +0200 | [diff] [blame] | 211 | alt { |
Vadim Yanitskiy | e7c4a99 | 2020-10-19 13:10:23 +0700 | [diff] [blame] | 212 | [] pt.receive(tr_L1CTL_TBF_CFG_CONF(is_uplink)) {} |
| 213 | [] pt.receive { repeat }; |
| 214 | [] T.timeout { |
| 215 | setverdict(fail, "Timeout waiting for L1CTL_TBF_CFG_CONF"); |
| 216 | mtc.stop; |
| 217 | }; |
Harald Welte | b3c226e | 2017-07-30 17:18:01 +0200 | [diff] [blame] | 218 | } |
| 219 | T.stop; |
| 220 | } |
| 221 | |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 222 | /* Send DM_EST_REQ from parameters derived from IMM ASS */ |
Vadim Yanitskiy | 204d1b8 | 2020-05-27 19:40:01 +0700 | [diff] [blame] | 223 | function f_L1CTL_DM_EST_REQ_IA(L1CTL_PT pt, ImmediateAssignment imm_ass, L1ctlMA ma := {}) { |
| 224 | /* FIXME: handle Packet Channel Description */ |
| 225 | if (imm_ass.ded_or_tbf.tbf == true) { |
| 226 | setverdict(fail, "TBF assignment is not handled by ", __SCOPE__); |
| 227 | mtc.stop; |
| 228 | } |
| 229 | |
| 230 | /* Single channel or frequency hopping? */ |
| 231 | if (not imm_ass.chan_desc.h) { |
| 232 | pt.send(ts_L1CTL_DM_EST_REQ_H0(imm_ass.chan_desc.chan_nr, |
| 233 | imm_ass.chan_desc.tsc, |
| 234 | imm_ass.chan_desc.arfcn)); |
| 235 | } else { |
| 236 | /* TODO: we probably want to apply a bitmask from imm_ass.mobile_allocation |
| 237 | * on the list of channels, if it's present. Use all channels for now. */ |
| 238 | pt.send(ts_L1CTL_DM_EST_REQ_H1(imm_ass.chan_desc.chan_nr, |
| 239 | imm_ass.chan_desc.tsc, |
| 240 | imm_ass.chan_desc.maio_hsn.hsn, |
| 241 | imm_ass.chan_desc.maio_hsn.maio, |
| 242 | ma)); |
| 243 | } |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 244 | } |
| 245 | |
Harald Welte | 3dc2046 | 2018-03-10 23:03:38 +0100 | [diff] [blame] | 246 | /* Send DM_REL_REQ from parameters derived from IMM ASS */ |
| 247 | function f_L1CTL_DM_REL_REQ(L1CTL_PT pt, RslChannelNr chan_nr) { |
| 248 | pt.send(ts_L1CTL_DM_REL_REQ(chan_nr)); |
| 249 | } |
| 250 | |
Harald Welte | aca6e07 | 2018-03-10 17:15:38 +0100 | [diff] [blame] | 251 | function f_L1CTL_RESET(L1CTL_PT pt, L1ctlResetType res_type := L1CTL_RES_T_FULL) { |
| 252 | timer T := 2.0; |
| 253 | pt.send(t_L1ctlResetReq(res_type)); |
| 254 | T.start; |
| 255 | alt { |
Vadim Yanitskiy | e7c4a99 | 2020-10-19 13:10:23 +0700 | [diff] [blame] | 256 | [] pt.receive(tr_L1CTL_MsgType(L1CTL_RESET_CONF)) { } |
| 257 | [] pt.receive { repeat; } |
| 258 | [] T.timeout { |
| 259 | setverdict(fail, "Timeout waiting for L1CTL_RESET_CONF"); |
| 260 | mtc.stop; |
| 261 | } |
Harald Welte | aca6e07 | 2018-03-10 17:15:38 +0100 | [diff] [blame] | 262 | } |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 263 | } |
Harald Welte | aca6e07 | 2018-03-10 17:15:38 +0100 | [diff] [blame] | 264 | |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 265 | function f_L1CTL_CRYPTO_REQ(L1CTL_PT pt, RslChannelNr chan_nr, uint8_t algo, octetstring key) { |
| 266 | pt.send(ts_L1CTL_CRYPTO_REQ(chan_nr, algo, key)); |
Harald Welte | aca6e07 | 2018-03-10 17:15:38 +0100 | [diff] [blame] | 267 | } |
| 268 | |
Harald Welte | f68765d | 2017-08-20 22:54:57 +0200 | [diff] [blame] | 269 | function f_connect_reset(L1CTL_PT pt, charstring l1ctl_sock_path := m_l1ctl_sock_path) { |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 270 | var f_UD_getMsgLen vl_f := refers(f_L1CTL_getMsgLen); |
| 271 | f_L1CTL_setGetMsgLen(pt, -1, vl_f, {}); |
Harald Welte | d1209a6 | 2017-07-29 12:55:06 +0200 | [diff] [blame] | 272 | pt.send(L1CTL_connect:{path:=l1ctl_sock_path}); |
| 273 | pt.receive(L1CTL_connect_result:{result_code := SUCCESS, err:=omit}); |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 274 | f_L1CTL_setGetMsgLen(pt, 0, vl_f, {}); |
Harald Welte | aca6e07 | 2018-03-10 17:15:38 +0100 | [diff] [blame] | 275 | f_L1CTL_RESET(pt); |
Harald Welte | d1209a6 | 2017-07-29 12:55:06 +0200 | [diff] [blame] | 276 | } |
Harald Welte | 9e4725d | 2017-07-16 23:18:09 +0200 | [diff] [blame] | 277 | |
Harald Welte | 52c713c | 2017-07-16 15:44:44 +0200 | [diff] [blame] | 278 | private function L1CTL_to_UD_connect(in L1CTL_connect pin, out UD_connect pout) { |
| 279 | pout.path := pin.path; |
| 280 | pout.id := 0; |
| 281 | } with { extension "prototype(fast)" } |
| 282 | |
| 283 | private function UD_to_L1CTL_connect_result(in UD_connect_result pin, out L1CTL_connect_result pout) { |
| 284 | pout.result_code := pin.result.result_code; |
| 285 | pout.err := pin.result.err; |
| 286 | } with { extension "prototype(fast)" } |
| 287 | |
| 288 | private function L1CTL_to_UD_ul(in L1ctlUlMessage pin, out UD_send_data pout) { |
| 289 | var L1ctlUlMessageLV msg_lv := { msg := pin }; |
| 290 | pout.data := enc_L1ctlUlMessageLV(msg_lv); |
| 291 | pout.id := 0; |
| 292 | } with { extension "prototype(fast)" } |
| 293 | |
| 294 | private function UD_to_L1CTL_dl(in UD_send_data pin, out L1ctlDlMessage pout) { |
| 295 | var L1ctlDlMessageLV msg_lv := dec_L1ctlDlMessageLV(pin.data); |
| 296 | pout:= msg_lv.msg; |
| 297 | } with { extension "prototype(fast)" } |
| 298 | |
| 299 | type port L1CTL_PT message { |
| 300 | out L1ctlUlMessage |
| 301 | out L1CTL_connect |
| 302 | in L1ctlDlMessage |
| 303 | in L1CTL_connect_result |
| 304 | in UD_listen_result |
| 305 | in UD_connected |
| 306 | } with { extension "user UD_PT |
| 307 | out(L1ctlUlMessage -> UD_send_data: function(L1CTL_to_UD_ul); |
| 308 | L1CTL_connect -> UD_connect: function(L1CTL_to_UD_connect)) |
| 309 | in(UD_send_data -> L1ctlDlMessage: function(UD_to_L1CTL_dl); |
| 310 | UD_connect_result -> L1CTL_connect_result: function(UD_to_L1CTL_connect_result); |
| 311 | UD_listen_result -> UD_listen_result: simple; |
| 312 | UD_connected -> UD_connected: simple |
| 313 | )" } |
| 314 | } |