summaryrefslogtreecommitdiff
path: root/cesar/test_general/station/int_station.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/test_general/station/int_station.h')
-rw-r--r--cesar/test_general/station/int_station.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/cesar/test_general/station/int_station.h b/cesar/test_general/station/int_station.h
new file mode 100644
index 0000000000..ba545675e3
--- /dev/null
+++ b/cesar/test_general/station/int_station.h
@@ -0,0 +1,117 @@
+#ifndef TEST_GENERAL_STATION_H_
+#define TEST_GENERAL_STATION_H_
+
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file station/inc/station.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * Contains all the functions calls to initialize for maximus test.
+ */
+
+#include "test_general/station/inc/int_context.h"
+
+typedef struct int_station_t int_station;
+
+/**
+ * Init the station and returns the result of the memory test
+ *
+ * \return ctx the int_station context.
+ */
+int_station_t *int_station_init (void);
+
+/**
+ * Uninit the station and returns the result of the memory test
+ *
+ * \param ctx the station context.
+ */
+void int_station_uninit (int_station_t *ctx);
+
+/**
+ * Provides the Tei of the STA and the SNID
+ *
+ * \param ctx the station context
+ * \param tei the tei of the station
+ * \param snid the snid of the AVLN
+ * \param beacon_period_auto generation automatic of the beacon period for
+ * the CA scheduling
+ * \param cco boolean informing if the sta is cco or not
+ * \param authenticated boolean informing if the sta is authenticated or
+ * not.
+ */
+void int_station_config (int_station_t *ctx, uint tei, uint snid,
+ bool beacon_period_auto, bool cco, bool authenticated, mac_t
+ mac_address);
+
+/**
+ * Provides the TEI of all the station in the AVLN.
+ *
+ * \param ctx the station context.
+ * \param tei the tei list of the stations
+ * \param macs the list of mac address of the STAs.
+ * \param qte the quantity of TEIs in the list.
+ */
+void int_station_discover (int_station_t *ctx, uint *tei, mac_t *macs,
+ uint qte);
+
+/**
+ * Add a link to the STAtion i.e. will create a MFS
+ *
+ * \param ctx the station context.
+ * \param type TX or RX link, it is a short 1 for TX 0 for RX.
+ * \param bcast short indicating if the link is a broadcast link
+ * \param mme short indicating if the link will be use to transmit MMEs
+ * \param lid short indicating if it is a link identitier.
+ * \param tei short the destination station.
+ */
+void int_station_link_add (int_station_t *ctx, uint type, uint bcast,
+ uint mme, uint lid, uint tei);
+
+/**
+ * Remove a link to the STAtion i.e. will create a MFS
+ *
+ * \param ctx the station context.
+ * \param type TX or RX link, it is a short 1 for TX 0 for RX.
+ * \param bcast short indicating if the link is a broadcast link
+ * \param mme short indicating if the link will be use to transmit MMEs
+ * \param lid short indicating if it is a link identitier.
+ * \param tei short the destination station.
+ */
+void int_station_link_remove (int_station_t *ctx, uint type, uint bcast,
+ uint mme, uint lid, uint tei);
+
+/**
+ * Thread entry finction
+ *
+ * \param int_sta the sta context.
+ */
+void pbproc_sched (cyg_addrword_t int_sta);
+
+/**
+ * Create a schedule for the Channel Access (beacon period) in CSMA only mode.
+ * Shall always be used to send or receive data.
+ *
+ * \param int_sta the pbproc context
+ * \param beacon_period_nb the quantity of beacon periods for the test.
+ */
+void
+create_schedule_csma_only (int_station_t *int_sta,
+ uint beacon_period_nb);
+
+/**
+ * Cp beacon call back when the leon timer expires.
+ * It shall call the add event function of the Visual state FSM.
+ *
+ * \param user_data the user_data provided on the cp_beacon_init function.
+ */
+void
+cp_beacon_timer_expires (void *user_data);
+
+#endif /*TEST_GENERAL_STATION_H_*/