<p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26336">View Change</a></p><p>5 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/+/26336/1/library/Iuh_Emulation.ttcn">File library/Iuh_Emulation.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/+/26336/1/library/Iuh_Emulation.ttcn@156">Patch Set #1, Line 156:</a> <code style="font-family:monospace,monospace">             v</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">seems like an unused variable?</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/+/26336/1/library/Iuh_Emulation.ttcn@159">Patch Set #1, Line 159:</a> <code style="font-family:monospace,monospace">                v</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">likewise, unused variable?</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/+/26336/1/library/Iuh_Emulation.ttcn@174">Patch Set #1, Line 174:</a> <code style="font-family:monospace,monospace">MME</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">no MME involved in 3G</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/+/26336/1/library/Iuh_Emulation.ttcn@194">Patch Set #1, Line 194:</a> <code style="font-family:monospace,monospace">           [] Iuh.receive(ASP_Event:{connOpened:=?}) -> value asp_evt {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">if those are server-only, it might make sense to use a guard expression to constrain the clause to the server case.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26336/1/library/Iuh_Types.ttcn">File library/Iuh_Types.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/+/26336/1/library/Iuh_Types.ttcn@45">Patch Set #1, Line 45:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">type record Iuh_PDU {<br>  Iuh_MsgType     pdu_type,<br>     Iuh_PDUUnion    u<br>} with {<br>   variant (u) "CROSSTAG(hnbap, pdu_type = IUH_MSG_TYPE_HNBAP;<br>                            rua, pdu_type = IUH_MSG_TYPE_RUA;<br>                             payload, OTHERWISE)"<br>};<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm not quite sure about what you're doing here.  In the wire encoding of the 3GPP specifications, do we ever have such a header as you describe here? with a pdu_type octet followed by that union?   If not, then the "pdu_type" is useless, as unlike in C, a union in TTCN3 carries implicit knowledge about whihc of the alternatives is selected.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Any code wanting to know which of the Iuh_PDUUnion alternatives is used in a given variable can use ischosen(foo.hnbap) or the like.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Yes, you can of course add an explicit pdu_type, but I think it is not "native" TTCN3 programming, and it just makes the code more complex without any benefit.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26336">change 26336</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/+/26336"/><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: I7227917148e98a2c777f4b05d8d2eca6e9c121b7 </div>
<div style="display:none"> Gerrit-Change-Number: 26336 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 23 Nov 2021 10:59:07 +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>