<p><a href="https://gerrit.osmocom.org/10166">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/10166/1/msc/MSC_Tests.ttcn">File msc/MSC_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/10166/1/msc/MSC_Tests.ttcn@1158">Patch Set #1, Line 1158:</a> <code style="font-family:monospace,monospace">  // length is limited by PDU_BSSAP length field which includes some</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Better use /* */ for comments.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Done</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10166/1/msc/MSC_Tests.ttcn@1159">Patch Set #1, Line 1159:</a> <code style="font-family:monospace,monospace">  // other fields beside l3info payload. So payl can only be 240 bytes</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">be "max" 240 bytes? […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The short answer was that before it was 256 for a max length of 255.<br>The long answer is that rnd() always returns a value < 1 and float2int does not round.<br>In https://www.etsi.org/deliver/etsi_es/201800_201899/20187301/04.10.01_60/es_20187301v041001p.pdf#page=343<br>the formula for generating values in a given range is:</p><p style="white-space: pre-wrap; word-wrap: break-word;">float2int(int2float(upperbound - lowerbound +1)*rnd()) + lowerbound // with lowerbound 0, upperbound 240</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/10166/1/msc/MSC_Tests.ttcn@1162">Patch Set #1, Line 1162:</a> <code style="font-family:monospace,monospace">        log("Length:", len);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">We can drop this line.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Thanks, forgot this one</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/10166">change 10166</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/10166"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I7be33e261a11f03a80a6b770b6acf0a4be49b85b </div>
<div style="display:none"> Gerrit-Change-Number: 10166 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 26 Jul 2018 09:29:20 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>