diff options
author | Andrej Rode <andrej.rode@ettus.com> | 2017-03-21 19:46:50 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:44 -0800 |
commit | ef6326a174e6880be5e2eaeac26a2c5de0768807 (patch) | |
tree | c949545e02390745c3a373e657bcf2404e62e191 /mpm/python/usrp_mpm/rpc_server.py | |
parent | b29246a9e2d7ed1e03e44cfc6804615fcfa5a5d8 (diff) | |
download | uhd-ef6326a174e6880be5e2eaeac26a2c5de0768807.tar.gz uhd-ef6326a174e6880be5e2eaeac26a2c5de0768807.tar.bz2 uhd-ef6326a174e6880be5e2eaeac26a2c5de0768807.zip |
mpm: python refactoring
Diffstat (limited to 'mpm/python/usrp_mpm/rpc_server.py')
-rw-r--r-- | mpm/python/usrp_mpm/rpc_server.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py index b092abdf7..a5dda0826 100644 --- a/mpm/python/usrp_mpm/rpc_server.py +++ b/mpm/python/usrp_mpm/rpc_server.py @@ -61,7 +61,10 @@ class ClaimServer(RPCServer): class MPMServer(RPCServer): def __init__(self, state): # Instead do self.mboard = periphs.init_periph_manager(args...) - self.mboard = periphs.lib.n3xx.periph_manager("/dev/spidev1.0", "") + self.periph_manager = periphs.init_periph_manager() + # When we do init we can just add dboard/periph_manager methods with setattr(self, method) + # Maybe using partial + # To remove methods again we also have to remove them from self._methods dict (they're cached) def get_clock_id(self, dboard): dboard = getattr(self.mboard, "get_dboard_"+dboard) |