<p style="white-space: pre-wrap; word-wrap: break-word;">X timers: IMHO we should even use unique X timer numbers across osmocom programs. I think we need a wiki page like https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers but for X timers. So far I introduced new timers without much thought, but I think that was a probably not doing it properly. https://osmocom.org/issues/4376</p><p style="white-space: pre-wrap; word-wrap: break-word;">tdef_groups: as in the TODO comment, it seems that this patch rewrites exactly what osmo_tdef_group does. The test libosmocore/tests/tdef/tdef_vty_test_config_root is an example for using osmo_tdef_group.</p><p style="white-space: pre-wrap; word-wrap: break-word;">You can look at the vty commands it provides in<br>tdef_vty_test_config_root.vty<br>or try it live with</p><p style="white-space: pre-wrap; word-wrap: break-word;">▶ ./tdef_vty_test_config_root <br><0000> ../../../../src/libosmocore/src/vty/telnet_interface.c:104 Available via telnet 127.0.0.1 42042</p><p style="white-space: pre-wrap; word-wrap: break-word;">▶ telnet localhost 42042</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">tdef_vty_test> list<br>...<br>  show timer [(tea|test|software)] [TNNNN]</pre><p style="white-space: pre-wrap; word-wrap: break-word;">tdef_vty_test> enable<br>tdef_vty_test# configure terminal<br>tdef_vty_test(config)# timer test         <br>test: T1 = 100 s        Testing a hundred seconds (default: 100 s)<br>test: T2 = 100 ms   Testing a hundred milliseconds (default: 100 ms)<br>test: T3 = 100 m      Testing a hundred minutes (default: 100 m)<br>test: T4 = 100      Testing a hundred potatoes (default: 100)<br>test: T2147483647 = 4294967295 m     Very large (default: 4294967295 m)<br>test: X23 = 239471 s        Negative T number (default: 239471 s)<br>test: T30 = 50 s Testing range min (default: 50 s, range: [20 .. inf])<br>test: T31 = 50 s Testing range max (default: 50 s, range: [0 .. 52])<br>test: T32 = 50 s   Testing range both (default: 50 s, range: [20 .. 52])</p><p style="white-space: pre-wrap; word-wrap: break-word;"> Seems to me all that it takes is</p><ul><li>create a timer group struct array with mgw, mncc, sccp, geran, utran and sgs in it,</li><li>run osmo_tdef_vty_groups_init(),</li><li>call osmo_tdef_vty_groups_write()</li><li>all done.</li></ul><p style="white-space: pre-wrap; word-wrap: break-word;">You won't have an additional 'ran' keyword in there, but I think we can also just drop it, or you could prefix each name like ran-geran, ran-utran, ran-sgs if you really need to keep it.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Of course the tdef_vty API allows for flexibility like in this patch on purpose, but we'd save a bunch of code dup using the group API directly.</p><p><a href="https://gerrit.osmocom.org/c/osmo-msc/+/16932">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-msc/+/16932">change 16932</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-msc/+/16932"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I6024c104b6101666c8aa1108a043910eb75db9a5 </div>
<div style="display:none"> Gerrit-Change-Number: 16932 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 23 Jan 2020 21:24:00 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>