Change in osmo-ttcn3-hacks[master]: PCU_Tests: introduce and use f_TC_pcuif_fh_params_gen()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Mon Sep 7 08:55:29 UTC 2020


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990 )

Change subject: PCU_Tests: introduce and use f_TC_pcuif_fh_params_gen()
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990/1/pcu/PCU_Tests.ttcn 
File pcu/PCU_Tests.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990/1/pcu/PCU_Tests.ttcn@2165 
PS1, Line 2165: private function f_TC_pcuif_fh_params_gen(integer ma_len)
> As long as you add some comment explaining it, it's fine imho.
Is it possible to reference a field of template in its own definition?

In the example above I missed the 'ma_len' field, so it must have been something like this:

  private template (value) PCUIF_InfoTrxTs ts_TC_pcuif_fh_params(integer ma_len) := {
    tsc := f_rnd_int(7),
    hsn := f_rnd_int(63),
    maio := f_rnd_int(63),
    ma_len := 2 + f_rnd_int(ma_len - 2),
    ma := f_pad_bit(f_rnd_bitstring(self.ma_len), 64, '0'B) // (!)
  };

That would be a beautiful solution, but TITAN throws a syntax error :/

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



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/19990
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I297b52410afafedad51d5b51734e946c4d62e8d2
Gerrit-Change-Number: 19990
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 07 Sep 2020 08:55:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy at sysmocom.de>
Comment-In-Reply-To: laforge <laforge at osmocom.org>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200907/33d0978f/attachment.htm>


More information about the gerrit-log mailing list