#ifndef ce_rx_rx_h #define ce_rx_rx_h /* Cesar project {{{ * * Copyright (C) 2009 Spidcom * * <<>> * * }}} */ /** * \file ce/rx/rx.h * \brief Channel Estimation in Receive mode. * \ingroup ce_rx */ #include "mac/common/store.h" #include "mac/sar/sar.h" #include "cp/types.h" #include "ce/rx/forward.h" #include "bsu/aclf/aclf.h" /** * CE RX behaviors. */ typedef enum ce_rx_behavior_t { /* Do not use intervals. */ CE_RX_BEHAVIOR_INTERVALS_DISABLE, /* Use intervals. * CE will switch to intervals after default tone map negotiation. */ CE_RX_BEHAVIOR_INTERVALS_ENABLE, CE_RX_BEHAVIOR_NB } ce_rx_behavior_t; /* Control CE RX behavior. */ extern ce_rx_behavior_t ce_rx_behavior; BEGIN_DECLS /** * Initialize the CE in RX. * \param mac_store the MAC store context. * \param sar the SAR context. * \param pbproc the PBProc context. * \param mac_config the MAC config context. * \param aclf the bsu_aclf context. * \return the context of the CE in RX. */ ce_rx_t * ce_rx_init (mac_store_t *mac_store, sar_t *sar, pbproc_t *pbproc, mac_config_t *mac_config, bsu_aclf_t *aclf); /** * Un-initialize the CE in RX. * \param ce_rx the CE in RX context. */ void ce_rx_uninit (ce_rx_t *ce_rx); /** * Reinitialize CE tonemask when it changed. * \param ce_rx the CE in RX context. */ void ce_rx_init_tonemask (ce_rx_t *ce_rx); /** * Ask for the CE RX to get the current noise NRJ (nsr) of a peer. * \param ce_rx the CE in RX context. * \param tei the TEI of the station from which we want the SNR. * \param int_index the interval index on which we want the SNR. * \param int_version the version of the intervals. * \param ber the current BER (only available if return is not NULL). * \return some blocks of NSR (or NULL if NSR is not available). * * The NSR returned by this function is the NSR used by the CE: it is not the * channel data returned by the PBProc. For example, just after initial CE, * the NSR will be a mean of all the NSR computed on sound frames. */ blk_t * ce_rx_get_nsr (ce_rx_t *ce_rx, cp_tei_t tei, uint int_index, uint int_version, u16 *ber); END_DECLS #endif /* ce_rx_rx_h */