<p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370">View Change</a></p><p>8 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/GPRS_Components.ttcn">File pcu/GPRS_Components.ttcn:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/GPRS_Components.ttcn@78">Patch Set #5, Line 78:</a> <code style="font-family:monospace,monospace">uint8_t</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I iitially used a boolean but then had issues passing it to some lower layer template in RAW_PCUIF o […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ah, yeah, TITAN does not support implicit boolean-integer conversion. Neither there are functions for that like int2bool() and bool2int(). We should just change the field type in PCUFI_Types to boolean with FIELDLENGTH(8). I am fine with doing it later, in a separate change.</p><p style="white-space: pre-wrap; word-wrap: break-word;">On the other hand, using bitstring would simplify the things - it's easy to convert it to what PCUIF needs:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  type bitstring GsmRa length(8..11) with { variant "" };</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  const GsmRa chan_req_def := '01111000'B;</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  // Just before sending RACH.ind<br>  var uint16_t ra := bit2int(chan_req_def);<br>  var uint8_t is_11bit;</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  if (lengthof(chan_req_def) == 11) { is_11bit := 1 } else { is_11bit := 0 }</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/GPRS_Components.ttcn@79">Patch Set #5, Line 79:</a> <code style="font-family:monospace,monospace">PCUIF_BurstType</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Ack, will simply apply it when needed.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks!</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/GPRS_Components.ttcn@249">Patch Set #5, Line 249:</a> <code style="font-family:monospace,monospace">ms.burst_type := BURST_TYPE_0;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I will simply do this check before sending RACH.ind to send the correct BURST_TYPE.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Just let the caller some freedom, there is also BURST_TYPE_2 (and even more in the specs).</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/GPRS_Components.ttcn@327">Patch Set #5, Line 327:</a> <code style="font-family:monospace,monospace">uint16_t</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">will check the template.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Actually, template wants type integer TimingAdvance (0..219).</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/GPRS_Components.ttcn@362">Patch Set #5, Line 362:</a> <code style="font-family:monospace,monospace">uint32_t fn := 0</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">no, fn=0 is fine here, iirc it's a special value meaning "next one".</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ah, right. Nevermind.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/PCU_Tests.ttcn">File pcu/PCU_Tests.ttcn:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/PCU_Tests.ttcn@269">Patch Set #5, Line 269:</a> <code style="font-family:monospace,monospace">f_ms_establish_ul_tbf</code></p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">it was already calling f_establish_tbf, there's no much new overhead.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Well, f_establish_tbf() has a bit inaccurate name. Under the hood there is no TBF establishment, it simply sends RACH.ind, receives DATA.req on AGCH, matches it against tr_IMM_TBF_ASS and returns to the caller. This is exactly what's needed here. So there is overhead. Please keep low level API for small and simple test cases.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/PCU_Tests.ttcn@584">Patch Set #5, Line 584:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (match(dl_block, tr_RLCMAC_DUMMY_CTRL())) {<br>                     continue;<br>             }<br>             if (not match(dl_block, tr_RLCMAC_UL_ACK_NACK_GPRS(ul_tfi := ?)) and<br>              not match(dl_block, tr_RLCMAC_UL_ACK_NACK_EGPRS(ul_tfi := ?))) {<br>                  setverdict(fail, "Failed to match Packet Uplink ACK / NACK:", dl_block);<br>                    f_shutdown(__BFILE__, __LINE__);<br>              }<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Not really, I'm fixing the test since it was not behaving correctly as an MS would. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I would prefer this to be done in a separate change, but if it's really needed here - let's keep it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370/5/pcu/PCU_Tests.ttcn@609">Patch Set #5, Line 609:</a> <code style="font-family:monospace,monospace">f_shutdown</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I think this is fine. You want me to remove it? ok, I will remove it.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The proble is that I don't see how it's related to this patch. Feel free to do in a separate change with some description of its purpose.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370">change 18370</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/18370"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-ttcn3-hacks </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ib3fee37580f0ea0530a659dec83656799bf57288 </div>
<div style="display:none"> Gerrit-Change-Number: 18370 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 22 May 2020 05:18:12 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>