mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
host: Replace the msgpack-RPC (rpclib) client with a gRPC-based implementation. Add auto-generated C++ client and Python bindings from protobuf definitions. Remove rpclib dependency and integrate FindgRPC into CMake. mpm: Replace the msgpack-RPC server with a gRPC server generated from protobuf definitions. Add pb_utils.py for type conversion between Python and protobuf. Update rpc_server.py to dispatch calls via gRPC stubs. Update mpm_shell to use gRPC. Replace pyudev with sysfs scan in uio device discovery. Bump MPM compatibility number to 7.0 and RPC version to 2. This change requires new depedencies. E.g. for Ubuntu 24.04 or 25.10: libgrpc++-dev, libprotobuf-dev, protobuf-compiler-grpc, python3-grpcio
42 lines
1.8 KiB
C++
42 lines
1.8 KiB
C++
//
|
|
// Copyright 2025 Ettus Research, a National Instruments Brand
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
//
|
|
|
|
#pragma once
|
|
|
|
#include <cstddef>
|
|
|
|
/*************************************************************************
|
|
* RPC timeout constants for MPMD
|
|
*
|
|
* Single authoritative definition for all MPM/MPMD RPC timeout values.
|
|
* Included by:
|
|
* - mpmd_impl.hpp (host C++ MPMD implementation layer)
|
|
* - mpm_client.cpp (generated gRPC C++ client, via mpm_client.cpp.mako)
|
|
* - mpmd_mb_controller.cpp
|
|
*
|
|
* Python mirrors are in host/python/uhd/utils/mpmtools.py — update those
|
|
* comments when changing values here.
|
|
************************************************************************/
|
|
|
|
//! Time between reclaims (ms)
|
|
static constexpr size_t MPMD_RECLAIM_INTERVAL_MS = 1000;
|
|
//! Default timeout for long-running RPC calls: init(), set_device_id(), etc. (ms)
|
|
static constexpr size_t MPMD_DEFAULT_INIT_TIMEOUT = 120000;
|
|
//! Default timeout for the reset_timer_and_mgr() RPC call (ms)
|
|
static constexpr size_t MPMD_DEFAULT_REBOOT_TIMEOUT = 200000;
|
|
//! Default timeout for ordinary RPC calls (ms)
|
|
static constexpr size_t MPMD_DEFAULT_RPC_TIMEOUT = 2000;
|
|
//! Short timeout for calls that must return quickly; also used to probe link status (ms)
|
|
static constexpr size_t MPMD_SHORT_RPC_TIMEOUT = 2000;
|
|
//! Long timeout for RPC calls that may block on slow device operations,
|
|
//! e.g. set_time_source() / set_clock_source() which trigger PLL re-locking (ms)
|
|
static constexpr size_t MPMD_DEFAULT_LONG_TIMEOUT = 30000;
|
|
//! Extended timeout for RPC calls that probe network interfaces after FPGA reload (ms)
|
|
static constexpr size_t MPMD_LONG_RPC_TIMEOUT = 4000;
|
|
//! Claimer loop timeout for RPC calls (ms)
|
|
//! Python mirror: MPM_CLAIMER_RPC_TIMEOUT_S = 10 in mpmtools.py
|
|
static constexpr size_t MPMD_CLAIMER_RPC_TIMEOUT = 10000;
|