#ifndef mac_common_sta_h #define mac_common_sta_h /* Cesar project {{{ * * Copyright (C) 2007 Spidcom * * <<>> * * }}} */ /** * \file mac/common/sta.h * \brief Information about a peer. * \ingroup mac_common */ #include "mac/common/tonemap.h" #include "cl/data_rate.h" #include "mac/common/nek.h" #include "ce/rx/bitloading/bitloading.h" #include "ce/rx/bitloading/intervals.h" /** Station information. Must be < BLK_SIZE. */ struct sta_t { /** Terminal equipment identifier. */ u8 tei; /** Is this STA authenticated. */ bool authenticated; /** EKS/NEK pairs pointer, used for unicast. */ mac_nek_t (*nek)[2]; /** Tonemaps for transmission. */ tonemaps_t *tx_tonemaps; /** Tonemaps for reception. */ tonemaps_t *rx_tonemaps; /** Station multi unicast reception capacity. */ bool multi_unicast_receiver; /** Bit-loading state & data (CE/RX). */ ce_rx_bitloading_t ce_rx_bt; /** Intervals state & data (CE/RX). */ ce_rx_bitloading_intervals_t *intervals; /** Data rate for transmit from the local station to this one. */ cl_data_rate_t tx_data_rate; /** Data rate for receive from this station to the local one. */ cl_data_rate_t rx_data_rate; }; typedef struct sta_t sta_t; /** * Initialise a station, called from MAC store. * \param sta STA to initialise * \param tei TEI */ void sta_init (sta_t *sta, uint tei); /** * Release the blocks pointed by the sta_t * \param sta Sta to uninit. * * Release the tonemaps,the set of tonemaps allocated during the existence of * the sta.( with eventually the tm_in_build used by Channel Estimation). */ void sta_uninit (sta_t *sta); #endif /* mac_common_sta_h */