Importing from usrp_mpm.rpc_server imports a lot of dependencies which are
unnecessary if the rpc_server functionality is not actually needed.
Move the decorator functions to a new file rpc_utils.py and import only
from this file inside periph_manager.
usrp_hwd.py needs additional dependencies which are specifically imported:
- usrp_mpm.rpc_server.spawn_rpc_process
- usrp_mpm.discovery.spawn_discovery_process
This is a class that allows handling compat numbers as a type:
>>> cn = CompatNumber(4, 3)
>>> print(cn.major)
4
>>> cn < CompatNumber(4, 5)
True
>>> cn == CompatNumber(4.3)
True
At this point, only about half of the mpm methods work on the simulator
over the mpm shell, and it hasn't been tested with uhd at all.
If you want to give it a try, first install all of the python
dependencies of mpm (The simulator doesn't require libusrp or any of
the C++ deps). In addition, running mpm on a desktop machine requires
the python lib netifaces. Next, make an /mpm/build directory and open
it. Run `cmake .. -DMPM_DEVICE=sim`, then `make`. Finally, run
`python3 python/usrp_hwd.py`. You should be able to open another
terminal and run `mpm/tools/mpm_shell.py localhost` to connect to the
mpm server.
Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
2020-10-07 15:29:19 -05:00
Renamed from mpm/python/usrp_mpm/__init__.py (Browse further)