<p>neels <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21564">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">OsmoCtrl cleanup: get_var(), set_var(), get_trap()<br><br>CTRL interface interaction was mostly inherited from the first legacy<br>implementation of osmo-gsm-tester, and it was a pain to look at from the<br>start. Now, while I'm close to the topic, I want this to improve:<br><br>Properly match a GET_REPLY/SET_REPLY to a sent GET/SET by the message<br>ID.<br><br>Completely drop the do_get() and do_set(), which were not useful for<br>correct handling of the CTRL request and response messaging. The API to<br>use by callers is set_var(), get_var()/get_int_var() and get_trap().<br>These call the internal _sendrecv() (or for TRAP only _recv())<br>functions. Make it so that tese work both on an already connected<br>OsmoCtrl, as well as one that needs to establish a (short) connection,<br>so that both are trivially possible:<br><br>    # one CTRL connection stays open<br>    with OsmoCtrl(...) as ctrl:<br>   ctrl.get_var('var1')<br>          ctrl.get_var('var2')<br>          ctrl.get_var('var3')<br><br>and<br><br>  # get_var() opens a connection, does the GET and closes again<br>  OsmoCtrl(...).get_var('var1')<br><br>Do away with doubling the instances OsmoCtrl and e.g. OsmoBscCtrl.<br>Rather make OsmoBscCtrl a child class of OsmoCtrl, which means that we<br>no longer have bsc.ctrl().ctrl(), just bsc.ctrl().<br><br>Have VERB_* constants instead of dup'd strings.<br><br>Apply to / simplify all callers of OsmoCtrl.<br><br>Some of these changes are similar to recently added OsmoVty.<br><br>Change-Id: Id561e5a55d8057a997a8ec9e7fa6f94840194df1<br>---<br>M src/osmo_gsm_tester/obj/bsc_osmo.py<br>M src/osmo_gsm_tester/obj/msc_osmo.py<br>M src/osmo_gsm_tester/obj/nitb_osmo.py<br>M src/osmo_gsm_tester/obj/osmo_ctrl.py<br>4 files changed, 186 insertions(+), 127 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/64/21564/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-gsm-tester/+/21564">change 21564</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-gsm-tester/+/21564"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-tester </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id561e5a55d8057a997a8ec9e7fa6f94840194df1 </div>
<div style="display:none"> Gerrit-Change-Number: 21564 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>