<p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990">View Change</a></p><p>1 comment:</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/+/19990/1/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/+/19990/1/pcu/PCU_Tests.ttcn@2165">Patch Set #1, Line 2165:</a> <code style="font-family:monospace,monospace">private function f_TC_pcuif_fh_params_gen(integer ma_len)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">As long as you add some comment explaining it, it's fine imho.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Is it possible to reference a field of template in its own definition?</p><p style="white-space: pre-wrap; word-wrap: break-word;">In the example above I missed the 'ma_len' field, so it must have been something like this:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  private template (value) PCUIF_InfoTrxTs ts_TC_pcuif_fh_params(integer ma_len) := {<br>    tsc := f_rnd_int(7),<br>    hsn := f_rnd_int(63),<br>    maio := f_rnd_int(63),<br>    ma_len := 2 + f_rnd_int(ma_len - 2),<br>    ma := f_pad_bit(f_rnd_bitstring(self.ma_len), 64, '0'B) // (!)<br>  };</pre><p style="white-space: pre-wrap; word-wrap: break-word;">That would be a beautiful solution, but TITAN throws a syntax error :/</p><p style="white-space: pre-wrap; word-wrap: break-word;">If TITAN's PADDING attribute was smarter than it is now, I would implement automatic 'ma_len' calculation and automatic padding, but... https://bugs.eclipse.org/bugs/show_bug.cgi?id=562849</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990">change 19990</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/+/19990"/><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: I297b52410afafedad51d5b51734e946c4d62e8d2 </div>
<div style="display:none"> Gerrit-Change-Number: 19990 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </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: Mon, 07 Sep 2020 08:55:29 +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 <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>