Attention is currently required from: laforge, pespin.
fixeria has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33035 )
Change subject: BTS_Tests: f_est_dchan(): add support for CSD channel modes
......................................................................
Patch Set 1:
(1 comment)
File bts/BTS_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33035/comment/e002476a_a17e…
PS1, Line 2546: case (tr_RSL_ChanMode_SIGN)
what? you can use templates as cases?
Yeah, why not? :) ETSI ES 201 873-1 defines the syntax as follows:
```
select "(" SingleExpression ")" "{"
{ case "(" { TemplateInstance[","] } ")" StatementBlock
}+
[ case else StatementBlock ]
"}"
```
I wonder how is that implemented, given that 2
templates could match the same value...
I guess the one that matches first wins.
did you make sure this works as expected?
Yes. Actually we already do have templates-in-select in our code base:
```
bsc/BSC_Tests.ttcn: select (arfcn_) {
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((259..293), false, ?)) { band :=
"GSM450"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((306..340), false, ?)) { band :=
"GSM480"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((438..511), false, ?)) { band :=
"GSM750"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((128..251), false, ?)) { band :=
"GSM850"; }
bsc/BSC_Tests.ttcn- case (tr_GsmBandArfcn((0..124), false, ?)) { band :=
"GSM900"; }
```
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33035
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: I066657941dd751183aa5e937a6bfe9ab7837d46b
Gerrit-Change-Number: 33035
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 27 May 2023 09:11:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment