From 95bf12ea7e11da3740db827b93c32cfdc6539624 Mon Sep 17 00:00:00 2001
From: guptar <guptar@mycompany.com>
Date: Sat, 19 Sep 2015 20:11:56 +0000
Subject: [PATCH] Added doxygen support for generic PHY-RF Interface
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7827 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
openair1/PHY/impl_defs_top.h | 8 ++++++
targets/ARCH/COMMON/common_lib.h | 48 ++++++++++++++++++++++++--------
targets/DOCS/Doxyfile | 3 +-
3 files changed, 46 insertions(+), 13 deletions(-)
diff --git a/openair1/PHY/impl_defs_top.h b/openair1/PHY/impl_defs_top.h
index cd55625373..a0302fd526 100755
--- a/openair1/PHY/impl_defs_top.h
+++ b/openair1/PHY/impl_defs_top.h
@@ -43,10 +43,18 @@
/** @defgroup _ref_implementation_ OpenAirInterface LTE Implementation
* @{
+
+ * @defgroup _PHY_RF_INTERFACE_ Generic PHY - RF Interface
+ * @ingroup _ref_implementation_
+ * @{
+ * This module is responsible for defining the generic interface between PHY and RF Target
+ * @}
+
* @defgroup _openair1_ openair1 Reference Implementation
* @ingroup _ref_implementation_
* @{
+
* @defgroup _physical_layer_ref_implementation_ Physical Layer Reference Implementation
* @ingroup _openair1_
* @{
diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h
index b541729076..dc9f30f4df 100644
--- a/targets/ARCH/COMMON/common_lib.h
+++ b/targets/ARCH/COMMON/common_lib.h
@@ -45,10 +45,10 @@
typedef int64_t openair0_timestamp;
typedef volatile int64_t openair0_vtimestamp;
-
+
+/* structrue holds the parameters to configure USRP devices*/
typedef struct openair0_device_t openair0_device;
-/* structrue holds the parameters to configure USRP devices
- */
+
#ifndef EXMIMO
#define MAX_CARDS 1
@@ -60,6 +60,10 @@ typedef enum {
max_gain=0,med_gain,byp_gain
} rx_gain_t;
+/** @addtogroup _PHY_RF_INTERFACE_
+ * @{
+ */
+
typedef struct {
//! Frequency for which RX chain was calibrated
double freq;
@@ -177,19 +181,33 @@ struct openair0_device_t {
/* Functions API, which are called by the application*/
- /* Called to start the transceiver. Return 0 if OK, < 0 if error */
+ /*! \brief Called to start the transceiver. Return 0 if OK, < 0 if error
+ @param device pointer to the device structure specific to the RF hardware target
+ */
int (*trx_start_func)(openair0_device *device);
- /* Called to send a request message between BBU-RRH */
+ /*! \brief Called to send a request message between BBU-RRH
+ @param device pointer to the device structure specific to the RF hardware target
+ @param msg pointer to the message structure passed between BBU-RRH
+ @param msg_len length of the message
+ */
int (*trx_request_func)(openair0_device *device, void *msg, ssize_t msg_len);
- /* Called to send a reply message between BBU-RRH */
+ /*! \brief Called to send a reply message between BBU-RRH
+ @param device pointer to the device structure specific to the RF hardware target
+ @param msg pointer to the message structure passed between BBU-RRH
+ @param msg_len length of the message
+ */
int (*trx_reply_func)(openair0_device *openair0, void *msg, ssize_t msg_len);
- /* Write 'nsamps' samples on each channel from buffers. buff[0] is the array for
- * the first channel. timestamp if the time (in samples) at which the first sample
- * MUST be sent
- * use flags = 1 to send as timestamp specfied*/
+ /*! \brief Called to send samples to the RF target
+ @param device pointer to the device structure specific to the RF hardware target
+ @param timestamp The timestamp at whicch the first sample MUST be sent
+ @param buff Buffer which holds the samples
+ @param nsamps number of samples to be sent
+ @param antenna_id index of the antenna if the device has multiple anteannas
+ @param flags flags must be set to TRUE if timestamp parameter needs to be applied
+ */
int (*trx_write_func)(openair0_device *device, openair0_timestamp timestamp, void **buff, int nsamps,int antenna_id, int flags);
/*! \brief Receive samples from hardware.
@@ -217,7 +235,7 @@ struct openair0_device_t {
*/
int (*trx_reset_stats_func)(openair0_device *device);
- /* Terminate operation of the transceiver -- free all associated resources */
+ /*! \brief Terminate operation of the transceiver -- free all associated resources */
void (*trx_end_func)(openair0_device *device);
/* Terminate operation */
@@ -230,6 +248,7 @@ struct openair0_device_t {
* \returns 0 in success
*/
int (*trx_set_freq_func)(openair0_device* device, openair0_config_t *openair0_cfg,int exmimo_dump_config);
+
/*! \brief Set gains
* \param
* \returns 0 in success
@@ -244,20 +263,25 @@ extern "C"
{
#endif
-/* return 0 if OK */
+/*! \brief Initialize Openair RF target. It returns 0 if OK */
int openair0_device_init(openair0_device* device, openair0_config_t *openair0_cfg);
//int openair0_stop(int card);
//ETHERNET
+/*! \brief Initialize Openair ETHERNET target. It returns 0 if OK */
int openair0_dev_init_eth(openair0_device *device, openair0_config_t *openair0_cfg);
//int openair0_stop_eth(int card);
//int openair0_set_gains_eth(openair0_device* device, openair0_config_t *openair0_cfg);
//int openair0_set_frequencies_eth(openair0_device* device, openair0_config_t *openair0_cfg,int exmimo_dump_config);
//USPRP
+/*! \brief Get the current timestamp of USRP */
openair0_timestamp get_usrp_time(openair0_device *device);
+
+/*! \brief Set the RX frequency of USRP RF TARGET */
int openair0_set_rx_frequencies(openair0_device* device, openair0_config_t *openair0_cfg);
+/*@}*/
#ifdef __cplusplus
}
diff --git a/targets/DOCS/Doxyfile b/targets/DOCS/Doxyfile
index b69d4c43ab..0d32a3ffad 100644
--- a/targets/DOCS/Doxyfile
+++ b/targets/DOCS/Doxyfile
@@ -792,7 +792,8 @@ INPUT = $(OPENAIR1_DIR)/PHY/defs.h \
$(OPENAIR2_DIR)/PHY_INTERFACE/defs.h \
$(OPENAIR2_DIR)/LAYER2/RLC/UM_v9.3.0/rlc_um.h \
$(OPENAIR2_DIR)/LAYER2/RLC/UM_v9.3.0/rlc_um_entity.h \
- $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/proto_extern.h
+ $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/proto_extern.h \
+ $(OPENAIR_TARGETS)/ARCH/COMMON/common_lib.h
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
--
GitLab