From d355e0412d30f07e8bfcd86a4d2b4fbcd21f3745 Mon Sep 17 00:00:00 2001 From: Bartosz Podrygajlo Date: Fri, 26 Sep 2025 15:07:16 +0200 Subject: [PATCH] Add prototype for trx_set_beams function This function is to be called by the application to switch beams on reception and transmission. When receiving new samples using trx_read/trx_write the application is expected to be able to determine which beam the samples belong to. --- radio/COMMON/common_lib.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/radio/COMMON/common_lib.h b/radio/COMMON/common_lib.h index b98c0c82f8..3fd9d6243d 100644 --- a/radio/COMMON/common_lib.h +++ b/radio/COMMON/common_lib.h @@ -588,6 +588,21 @@ struct openair0_device_t { */ int (*trx_set_gains_func)(openair0_device *device, openair0_config_t *openair0_cfg); + /*! \brief Set tx/rx beams + * + * Set the tx/rx beams. This has to be done in advance of the reception in order to + * allow the underlying device to change receiver configuration. The exact time depends + * on the device. + * + * NOTICE: the samples returned from trx_read_func may belong to more than one beam. It is up + * to the application to determine the beam of the received samples. + * + * \param device the hardware to use + * \param beam_map the beams to receive + * \return 0 on success + */ + int (*trx_set_beams)(openair0_device *device, uint64_t beam_map, openair0_timestamp timestamp); + /*! \brief RRU Configuration callback * \param idx RU index * \param arg pointer to capabilities or configuration