aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python/usrp_mpm/rpc_server.py
Commit message (Collapse)AuthorAgeFilesLines
* mpm: rpc server: Remove disable_commit for init()Trung Trang2018-04-301-2/+0
| | | | | The async calls to long C++ methods allows the claimer loop to smoothly continue during init, so this hack is no longer necessary.
* mpm: rpc server: Increase claim timeout to 5 secondsTrung Trang2018-04-301-1/+1
| | | | | | Usually, the current timeout is fine, but there are cases when a lot of RPC traffic could drown out the reclaim calls. 5 seconds is an experimentally derived safe value.
* mpm: increase timeout interval for claimingTrung N Tran2018-04-021-1/+1
|
* mpm: improve logging on exceptionTrung N Tran2018-03-301-4/+5
|
* mpm: Add INFO log statements on MPM reset and component updateMartin Braun2018-03-131-0/+1
|
* mpm: Rename n310 to n3xxMartin Braun2018-03-051-1/+1
| | | | | This module (and class) are, in fact, used for all N3xx-derivates so renaming it is the more correct thing to do.
* mpm: uhd: RPC server reports MPM version, uhd_usrp_probe reads itMartin Braun2018-03-021-0/+1
|
* mpm: adding get_component_infoBrent Stapleton2018-02-191-1/+1
| | | | | Add getter function for updateable component information. This is a minor compat number bump.
* mpm: Update all license headersMartin Braun2018-02-191-1/+1
| | | | | - Fix typo in company name (missing 'a') - Updated SPDX license identifier to version 3.0
* mpm: Use prefs API for periph managerMartin Braun2018-02-081-1/+1
| | | | | | | | - Allow to set default args via config file - Read them from prefs API - override-db-pids uses the same APIs now ([overrides] section in config file, prefs API, and same dictionary as --default-args when used on the command line
* mpm: rpc_server: Declare local connection for *all* local IPsMartin Braun2018-02-071-2/+3
| | | | | | Before, it was possible to trick the RPC server in believing a connection was remote when the incoming connection was from a local IP address that was not 127.0.0.1.
* fixup! mpm: Log timeouts during API calls, reset timer on claimed callsMartin Braun2018-01-231-1/+2
|
* mpm: Log timeouts during API calls, reset timer on claimed callsMartin Braun2018-01-221-0/+7
| | | | Reviewed-by: Trung Tran <trung.tran@ettus.com>
* mpm: Update unclaim timeout logicMartin Braun2018-01-181-9/+30
| | | | | | | - Allow configurable timeout values from the command line - Add flag to disable timeouts for long calls; this fixes the case where reclaimers re-initialize a disabled timer - Add methods for timeout event for better tracking
* mpm: Refactored RPC serverMartin Braun2018-01-171-66/+80
| | | | | | - No functional changes - Grouped methods by function - Improved some comments
* mpm: Enable systemd watchdog and update it from MPMMartin Braun2018-01-151-0/+9
| | | | | | | | - Updated systemd service file - Added health status flag in shared data object - Added thread in RPC process to update watchdog Reviewed-by: Moritz Fischer <moritz.fischer@ettus.com>
* mpm: Add API call for claim and unclaimMartin Braun2018-01-101-59/+69
| | | | | | These are hooks that the RPC server calls into when claiming a device, and allow the device implementation to trigger user-definable actions on claiming/unclaiming.
* mpm: Spawn periph manager inside the RPC processMartin Braun2018-01-101-12/+26
| | | | Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
* mpm: Add API to read back log bufferMartin Braun2018-01-081-1/+22
| | | | Reviewed-by: Brent Stapleton <brent.stapleton@ettus.com>
* mpm: mpmd: Add MPM compat number checkBrent Stapleton2017-12-221-0/+6
| | | | Reviewed-by: Martin Braun <martin.braun@ettus.com>
* mpm: rpc_server: Unregister old RPC calls _init_rpc_calls()Martin Braun2017-12-221-2/+22
| | | | | | | On FPGA loads, when the periph_manager is respawned, this will now clear the previously registered methods. Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
* mpm: rpc_server: Fix use of to_binary_str()Martin Braun2017-12-221-5/+2
| | | | Reviewed-By: Brent Stapleton <brent.stapleton@ettus.com>
* mpm: Harmonize all license headerMartin Braun2017-12-221-13/+2
| | | | Now uses SPDX headers everywhere.
* mpm: UIOs now open only when necessaryBrent Stapleton2017-12-221-9/+0
| | | | | | | Refactoring to use the C++-based UIO objects. The Liberio and Ethernet objects now open the UIO before using it, and close it once done. Reviewed-By: Martin Braun <martin.braun@ettus.com>
* mpm: Harmonize imports, tidy + sort modulesMartin Braun2017-12-221-1/+1
| | | | | | | | - Moved nijesdcore to cores/ - Moved udev, net, dtoverlay, uio to sys_utils/ - Made all imports non-relative (except in __init__.py files) - Removed some unnecessary imports - Reordered some imports for Python conventions
* mpm: Add temporary failure for FPGA reloadMartin Braun2017-12-221-0/+9
| | | | | Note: This is subject to removal, but makes the FPGA reloading code available to all until we fix the reload bug.
* mpm: Reset periph manager on updateBrent Stapleton2017-12-221-12/+79
| | | | | | | | | | Upon updating certain components (the FPGA, for example), the Peripheral Manager is restarted, and the overlay is reapplied. In order to facilitate this, the RPC server intercepts and handles the update_component function. Tested on the RJ45 ethernet connection. It probably won't work as well if the SFP connection goes down when the overlay is removed.
* mpm/mpmd: Move to request_xport()/commit_xport() architectureMartin Braun2017-12-221-15/+1
| | | | | This commit combines code from various branches to finally enable both UDP and Liberio transports.
* mpm: Cache connection type in PeriphManagerBaseMartin Braun2017-12-221-1/+6
| | | | | | Now, when claiming a device, the connection type will be stored as a string in PeriphManagerBase. This way we can read out the current connection type even when not currently inside an RPC call.
* mpm: Remove leading _ from _get_device_info()Martin Braun2017-12-221-1/+1
| | | | Use @norpc instead. This fixes some linting issues.
* mpm: Improve exception/error handlingMartin Braun2017-12-221-19/+75
| | | | | | | | - Any RPC call with uncaught exceptions will result in additional logging on MPM side - Adds get_last_error() API call - get_last_error() is populated by various methods within rpc_server.py, but also from every uncaught exception
* mpm: server supports binary strings being sent across rpcBrent Stapleton2017-12-221-2/+7
|
* mpm: RPC methods now tell us if they need a claimMartin Braun2017-12-221-7/+8
| | | | | | On the RPC server side, we keep track of which methods require a claim token. MPM shell uses this info to automatically add claim tokens when required.
* mpm: Check rpc server has matching lock release/acquiresMartin Braun2017-12-221-1/+2
|
* mpm/mpmd: Call init() during UHD session init, not on hwd spawnMartin Braun2017-12-221-9/+33
|
* mpm: RPC servers own methods can no longer be overwrittenMartin Braun2017-12-221-0/+1
|
* mpm: Improved token checking in RPC serverMartin Braun2017-12-221-8/+31
|
* mpm: Addition Py3k fixes, all related to string/UTF-8/ascii differencesMartin Braun2017-12-221-14/+24
| | | | - Also fixed some error handling in various cases
* mpm: Made code Python3-compatibleMartin Braun2017-12-221-0/+3
|
* mpm: RPC server now provides decorators for no token and no RPCMartin Braun2017-12-221-22/+47
| | | | - Also token length is now variable, and 16 characters
* mpm: RPC server unitializes a device when claim is lostMartin Braun2017-12-221-0/+1
|
* mpm: Enabled mboard EEPROM readoutMartin Braun2017-12-221-2/+1
|
* mpm: Updating ref clock frequency will propagate to dboard, changed slot ↵Martin Braun2017-12-221-1/+1
| | | | indexing to numbers
* mpm: Moved over to new logging infrastructureMartin Braun2017-12-221-18/+11
| | | | Also currently hardcodes some settings.
* mpm: comment out functionality to make it workAndrej Rode2017-12-221-7/+5
| | | | | | | | - add uio udev find routine - add debug prints Signed-off-by: Andrej Rode <andrej.rode@ettus.com> Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
* mpm: mpm reorganizationAndrej Rode2017-12-221-41/+161
|
* mpm: CMake cleanup, Python code enhancementsAndrej Rode2017-12-221-27/+64
| | | | | - Send user defined data in ping - Improve rpc_shell, add mpm_debug.py, fix tracebacks in multiprocessing
* mpm: python refactoringAndrej Rode2017-12-221-1/+4
|
* Initial commit for N3xx development.Martin Braun2017-12-221-0/+69
- Creates mpm/ subdirectory - First pass at hardware daemon/MPM - New code for LMK04828, AD9371 - spidev integration Contributions by: Martin Braun <martin.braun@ettus.com> Derek Kozel <derek.kozel@ettus.com> Mark Meserve <mark.meserve@ni.com> Andrej Rode <andrej.rode@ettus.com>