aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/contrib/bsc_control.py
AgeCommit message (Collapse)AuthorFilesLines
2017-03-14cosmetic: add copyright header to bsc_control.pyPhilipp Maier1-0/+21
bsc_control.py lacks a copyright header. This commit adds the copyright header from ipa.py to bsc_control.py. Change-Id: Ie70bf686ee9bb157198e02bf8d946abf56adc82a
2017-01-23bsc_control.py: fix blockingMax1-5/+11
Previously reading from socket would block if no data were sent by the server. Use non-blocking read for set and get operations. Change-Id: I706d54a4a7ceef62683bf9a2fe63fc9ab331c24e
2016-12-19bsc_control.py: remove unused -i optionMax1-5/+0
This option only served to demonstrate possibility of manually selecting <id> field in CTRL protocol. Since the transition to generic ipa module this is no longer exposed so the option became a no-op. Correspondingly there's no need to explicitly initialize the RNG - the Ctrl class handles random <id> generation internally. Change-Id: I10cc7c069354cced2bba84fe67c69c28b8596ded
2016-12-13bsc_control.py: use ipa.py moduleMax1-61/+28
Simplify code by using Ctrl implementation from ipa.py Change-Id: I25fd7cd4b42126354b72abd60a3837be5d13e159
2016-12-13bsc_control.py: style correctionsMax1-22/+23
* replace some tabs indent with spaces * add comment to make sure no new tabs are used for indentation by emacs * remove unnecessary parenthesis Change-Id: Ib79fd4317d40ee4fd87b090b9faf8ebaf4bfca64
2016-08-11Add python functions to get/set ctrl variablesMax1-4/+27
Add get_var and set_var functions which handle requested variable while checking for proper response and id. Split header handling into separate function. Change-Id: I08705963c277bd93a011193dd7451a626d606c21 Related: OS#1646
2016-08-11Use random operation idMax1-8/+10
According to documentation for Control Interface Protocol <id> is "A numeric identifier, uniquely identifying this particular operation", hence it's best to be illustrated with random integer - use it as default. Fix override of id with previously used python-specific objects' id. Change-Id: I32236c067360526f4e7ee4bbdba64c5137de696d Related: OS#1646
2016-07-29Improve code re-useMax1-58/+59
Introduce explicit __main__ function to facilitate re-use of defined python functions for ctrl interface. Change-Id: I9bad8f0dd1d69bd28816bf047d85840e3411bb9c Related: OS#1646
2011-08-22contrib/bsc_control.py: Patch by Holger to handle connection resetsDaniel Willmann1-0/+4
2011-07-13Add example to communicate through the control interfaceDaniel Willmann1-0/+100