Commit graph

3 commits

Author SHA1 Message Date
Joerg Hofrichter
ba5028cf57 mpm: avoid importing from rpc_server when importing usrp_mpm
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
2024-06-11 10:20:08 +02:00
Martin Braun
ee75bd984c mpm: Add CompatNumber utility class
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
2022-06-29 12:08:02 -07:00
Samuel O'Brien
6394a7c6ea sim: Lay Groundwork for Simulator
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)