#ifndef ce_rx_bitloading_nsr_h #define ce_rx_bitloading_nsr_h /* Cesar project {{{ * * Copyright (C) 2011 Spidcom * * <<>> * * }}} */ /** * \file ce/rx/bitloading/nsr.h * \brief Public data * \ingroup ce_rx_bl * * This file contains the information related to NSR. */ #include "ce/rx/bitloading/context.h" /** * NSR must be rescaled before used by BER vs polynomials. * Rescaling is not the same if NSR is based on sound or data. */ #define CE_RX_BL_NSR_SOUND_RESCALE (2) BEGIN_DECLS /** * Clean NSR mean. * \param bl the bit loading context of the peer */ extern inline void ce_rx_bl_nsr_clean (ce_rx_bitloading_t *bl) { /* Check parameter. */ dbg_assert (bl); dbg_assert (bl->noise_nrj_blk_count); dbg_assert_ptr (bl->noise_nrj); blk_release_desc_range_nb (bl->noise_nrj, bl->noise_nrj_blk_count); dbg_invalid_ptr (bl->noise_nrj); bl->noise_nrj_blk_count = 0; } /** * Get the current NSR used by the bit loading. * \param ctx the bit loading context of the station. * \return the NSR if available (NULL otherwise). */ blk_t * ce_rx_bl_get_nsr (ce_rx_bitloading_t *bl); END_DECLS #endif /* ce_rx_bitloading_nsr_h */