summaryrefslogtreecommitdiff
path: root/cesar/mac/common/sta.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/mac/common/sta.h')
-rw-r--r--cesar/mac/common/sta.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/cesar/mac/common/sta.h b/cesar/mac/common/sta.h
new file mode 100644
index 0000000000..36537df87c
--- /dev/null
+++ b/cesar/mac/common/sta.h
@@ -0,0 +1,56 @@
+#ifndef mac_common_sta_h
+#define mac_common_sta_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file mac/common/sta.h
+ * \brief Information about a peer.
+ * \ingroup mac_common
+ */
+#include "mac/common/tonemap.h"
+#include "mac/common/nek.h"
+#include "ce/rxce_stats.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;
+ /** channel estimation status, statistics, and temporary computation. */
+ rxce_processing_t rxce;
+};
+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 */