#ifndef ce_rx_bitloading_pber_h #define ce_rx_bitloading_pber_h /* Cesar project {{{ * * Copyright (C) 2011 Spidcom * * <<>> * * }}} */ /** * \file ce/rx/bitloading/pber.h * \brief PB Error Rate functions * \ingroup ce_rx * * This module is used to manage PBER. * Basically, it can: * - maintain (update, initialize, reset) a PBER sliding mean (by PB and not * by frame). * This module is used by the BER margin update. */ /** * The PBER context. */ typedef struct ce_rx_bl_pber_t { /** * Current PBER sliding mean. * This is a Q16U32. */ u32 mean_q16; } ce_rx_bl_pber_t; BEGIN_DECLS /** * Reset PBER sliding mean. * \param ctx the PBER context */ void ce_rx_bl_pber_reset (ce_rx_bl_pber_t *ctx); /** * Update PBER sliding mean with a received frame. * \param ctx the PBER context * \param pb_total total number of PB (whatever CRC) * \param pb_crc_false number of PB with a CRC wrong * * This function simulates we have received PB one by one and compute the PBER * sliding mean by PB and not by frame. */ void ce_rx_bl_pber_update (ce_rx_bl_pber_t *ctx, uint pb_total, uint pb_crc_false); END_DECLS #endif /* ce_rx_bitloading_pber_h */