aboutsummaryrefslogtreecommitdiffstats
path: root/mpm
diff options
context:
space:
mode:
authorBrent Stapleton <brent.stapleton@ettus.com>2017-12-14 19:01:14 -0800
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:05:58 -0800
commita927a364c5b07387be3a849b74546b98ba84db84 (patch)
treee288fc58e2971af547a85fc943d96b838a496776 /mpm
parent0c94fff3300d2c1c1c98367d99e1457f073a1892 (diff)
downloaduhd-a927a364c5b07387be3a849b74546b98ba84db84.tar.gz
uhd-a927a364c5b07387be3a849b74546b98ba84db84.tar.bz2
uhd-a927a364c5b07387be3a849b74546b98ba84db84.zip
mpm: mpmd: Add MPM compat number check
Reviewed-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'mpm')
-rw-r--r--mpm/python/usrp_mpm/rpc_server.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py
index c3b4fc2dd..cf3f4a21b 100644
--- a/mpm/python/usrp_mpm/rpc_server.py
+++ b/mpm/python/usrp_mpm/rpc_server.py
@@ -45,6 +45,8 @@ class MPMServer(RPCServer):
"""
# This is a list of methods in this class which require a claim
default_claimed_methods = ['init', 'update_component', 'reclaim', 'unclaim']
+ # Compatibility number for MPM
+ MPM_COMPAT_NUM = (1, 0)
def __init__(self, state, mgr, mgr_generator=None, *args, **kwargs):
self.log = get_main_logger().getChild('RPCServer')
@@ -240,6 +242,10 @@ class MPMServer(RPCServer):
self.periph_manager.set_connection_type("remote")
return self._state.claim_token.value
+ def get_mpm_compat_num(self):
+ """Get the MPM compatibility number"""
+ self.log.trace("Compat num requested: {}".format(self.MPM_COMPAT_NUM))
+ return self.MPM_COMPAT_NUM
def init(self, token, args):
"""