diff options
Diffstat (limited to 'mpm')
-rw-r--r-- | mpm/python/usrp_mpm/discovery.py | 1 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/mpmtypes.py | 1 | ||||
-rw-r--r-- | mpm/python/usrp_mpm/rpc_server.py | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/mpm/python/usrp_mpm/discovery.py b/mpm/python/usrp_mpm/discovery.py index a225bd1db..91fb8f590 100644 --- a/mpm/python/usrp_mpm/discovery.py +++ b/mpm/python/usrp_mpm/discovery.py @@ -55,6 +55,7 @@ def _discovery_process(state, discovery_addr): [b"type="+state.dev_type.value] + \ [b"product="+state.dev_product.value] + \ [b"serial="+state.dev_serial.value] + \ + [b"fpga="+state.dev_fpga_type.value] + \ [RESPONSE_CLAIMED_KEY+to_binary_str("={}".format(state.claim_status.value))] ) diff --git a/mpm/python/usrp_mpm/mpmtypes.py b/mpm/python/usrp_mpm/mpmtypes.py index 5eab23e3d..600ebcd0b 100644 --- a/mpm/python/usrp_mpm/mpmtypes.py +++ b/mpm/python/usrp_mpm/mpmtypes.py @@ -30,3 +30,4 @@ class SharedState: self.dev_type = Array(ctypes.c_char, 16, lock=self.lock) self.dev_serial = Array(ctypes.c_char, 8, lock=self.lock) self.dev_product = Array(ctypes.c_char, 16, lock=self.lock) + self.dev_fpga_type = Array(ctypes.c_char, 8, lock=self.lock) diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py index 95078a2d6..63302b23f 100644 --- a/mpm/python/usrp_mpm/rpc_server.py +++ b/mpm/python/usrp_mpm/rpc_server.py @@ -87,6 +87,8 @@ class MPMServer(RPCServer): to_binary_str(device_info.get("product", "n/a")) self._state.dev_serial.value = \ to_binary_str(device_info.get("serial", "n/a")) + self._state.dev_fpga_type.value = \ + to_binary_str(device_info.get("fpga", "n/a")) self._db_methods = [] self._mb_methods = [] self.claimed_methods = copy.copy(self.default_claimed_methods) @@ -503,6 +505,10 @@ class MPMServer(RPCServer): # Clear the method cache in order to remove stale references to # methods from the old peripheral manager (the one before reset) self.clear_method_registry() + # update the FPGA type information in the state + device_info = self.periph_manager.get_device_info() + self._state.dev_fpga_type.value = \ + to_binary_str(device_info.get("fpga", "n/a")) def reset_timer_and_mgr(self, token): """ |