<p style="white-space: pre-wrap; word-wrap: break-word;">to  be honest, I'm overall not very convinced by this patch.  It looks more like a kludge/hack than a proper solution.</p><p style="white-space: pre-wrap; word-wrap: break-word;">In general, we should try to keep code as generic as possible and not include too many special use cases.  If there is a common way to interface the NS_Provider with its consumer, then we should go for that  rather than supporting two different ways.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Ideally we also wouldn't have a new un-conditional dependency to NS_RAW from the NS_Provider_IPL4.  If it's absolutely neccessary, one c ould think of #ifdef'ing it out and using ttcnpp, like we e.g. do in IPA_Emulation to avoid extra dependencies that otherwise are not there.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Without spending more time on thinking about this in detail, I don't immediately have a better solution, but I think there should be some way to have a general interface betwene the provider and the consumer, without special-casing between the two existing consumers.</p><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401">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/osmo-ttcn3-hacks/+/24401/2/library/NS_Provider_IPL4.ttcn">File library/NS_Provider_IPL4.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/+/24401/2/library/NS_Provider_IPL4.ttcn@57">Patch Set #2, Line 57:</a> <code style="font-family:monospace,monospace">      integer vc_raw_idx</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">as those two are mutually exclusive, one could introduce a union here to show those are two mutually excluded alternatives</p><p style="white-space: pre-wrap; word-wrap: break-word;">code can then use ischosen() to determine if either of the union alternatives has been selected or not (rather than checking for a component reference being null).</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/2/library/NS_Provider_IPL4.ttcn@60">Patch Set #2, Line 60:</a> <code style="font-family:monospace,monospace">sig</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">AFAICT, adding the raw NSVC is really different from the "normal" one, so it might make sense to keep the old signature as-is and add a second NSPIP_add_nsvc_raw()</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401/2/library/NS_Provider_IPL4.ttcn@76">Patch Set #2, Line 76:</a> <code style="font-family:monospace,monospace">                          connect(self:NSVC[i], nsvc.vc_raw:NSCP[nsvc.vc_raw_idx]);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">so the only difference between those two is that one has an array, and the other has not? this needs more thought.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24401">change 24401</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/+/24401"/><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: Iafd9310e04066958914201da0cbdcd563bd5c976 </div>
<div style="display:none"> Gerrit-Change-Number: 24401 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Sun, 30 May 2021 09:31:42 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>