summaryrefslogtreecommitdiff
path: root/cesar/cp/station/station.h
diff options
context:
space:
mode:
authorsave2008-04-07 14:17:42 +0000
committersave2008-04-07 14:17:42 +0000
commit3d58a62727346b7ac1a6cb36fed1a06ed72228dd (patch)
treed7788c3cf9f76426aef0286d0202e2097f0fa0eb /cesar/cp/station/station.h
parent095dca4b0a8d4924093bab424f71f588fdd84613 (diff)
Moved the complete svn base into the cesar directory.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1769 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp/station/station.h')
-rw-r--r--cesar/cp/station/station.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/cesar/cp/station/station.h b/cesar/cp/station/station.h
new file mode 100644
index 0000000000..dab1f204f6
--- /dev/null
+++ b/cesar/cp/station/station.h
@@ -0,0 +1,97 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/station/station.h
+ * \brief
+ * \ingroup cp_sta
+ */
+#ifndef CP_STATION_H_
+#define CP_STATION_H_
+
+#include <stdlib.h>
+
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_arch.h>
+
+#include "cp/interf/interf.h"
+#include "cp/station/inc/station_types.h"
+#include "cp/station/inc/station_apivs.h"
+#include "cp/station/inc/station_actions.h"
+#include "cp/station/inc/station_data.h"
+#include "cp/beacon/beacon.h"
+#include "cl/cl.h"
+#include "mac/common/store.h"
+
+/*
+ * some global variables
+ */
+
+extern uint station_seed;
+extern cyg_flag_t station_flag;
+
+
+/**
+ * \brief Init station module
+ * This is the cp entry point.
+ * \param
+ * \return
+ */
+void
+cp_station_init (mac_store_t *mac_store_ctx, cl_t *interf_cl_ctx, pbproc_t *pbproc_ctx, ca_t *ca_ctx);
+
+/**
+ * \brief start mac service
+ * \param
+ * \return
+ */
+void
+cp_station_mac_start(void);
+
+/**
+ * \brief wait for a station event
+ * \param
+ * \return
+ */
+void
+cp_station_wait_event (cyg_addrword_t data);
+
+/**
+ * \brief create an alarm that will generate an event after
+ * the specified delay
+ * \param cyg_flag : the event handle
+ * \param station_flag : the event flag
+ * \param event_delay_ms : the amount of time to wait
+ * \return
+ */
+void
+cp_station_gen_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag, SEM_EVENT_TYPE event_type, uint event_delay_ms);
+
+/**
+ * \brief will stop an alarm previously created with station_gen_timed_event
+ *
+ * \param cyg_flag : the event handle
+ * \param station_flag : the event flag
+ * \return
+ */
+void
+cp_station_stop_timed_event(cyg_flag_t *cyg_flag, station_flag_t station_flag);
+
+
+/**
+ * \brief this function is called when the amount of time specified
+ * with station_wait_event() has elapsed.
+ * warning : this function is called in DSR context
+ *
+ * \param see ecos manual about alarm
+ * \return
+ */
+void
+cp_station_alarm_handler(cyg_handle_t alarm, cyg_addrword_t data);
+
+
+#endif /* CP_STATION_H_ */