Use of anytype in Osmocom TTCN-3 tests / TITAN

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/OpenBSC@lists.osmocom.org/.

Vadim Yanitskiy axilirator at gmail.com
Thu Mar 19 10:02:44 UTC 2020


Hi Harald,

> Please see https://www.eclipse.org/forums/index.php?t=msg&th=1074288&goto=1721710&#msg_1721710
for how to use anytype in TITAN

thank you! I was too sleepy to investigate. What a surprise from TITAN!

> The errors about the non-existant OCT1 field in anytype are gone.

As an experiment, I tried to move the test case to BTS_Tests.ttcn and
TITAN generated C++ code without any errors. Nice! But now g++ fails
to compile that code:

Osmocom_Types.cc:1389:24: error: ‘OCT1’ was not declared in this
scope; did you mean ‘General__Types::OCT1’?

so I am giving up on this.

> This is of course not nice, but maybe a work-around to explicitly list those types
> at the end for now?

I think for now it's fine to have one function per type as Pau did in
[1]. I was just looking for a way to generalize this somehow. The
ternary operator would be way more elegant and universal solution, so
I will do my best to move this forward as soon as I have time.

[1] https://git.osmocom.org/osmo-ttcn3-hacks/commit/?h=pespin/pcu-cap&id=2422d1fa829d156ed7ea9343e2cdf0109034029d

With best regards,
Vadim Yanitskiy.



More information about the OpenBSC mailing list