summaryrefslogtreecommitdiff
path: root/test_general/station
diff options
context:
space:
mode:
authorlaranjeiro2008-01-16 11:05:13 +0000
committerlaranjeiro2008-01-16 11:05:13 +0000
commit4afb830b0e93be60165e000db42f682d0a656b46 (patch)
tree325e51cfb523a5caf9c0e392dc2b17bbdc609093 /test_general/station
parentee9c67663fc1ebbcfffa95cf168f7d1d94f8519d (diff)
Modifying the overide of the station to use it with the cp and data plane.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@1274 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'test_general/station')
-rw-r--r--test_general/station/inc/int_context.h17
-rw-r--r--test_general/station/int_station_fc.h17
-rw-r--r--test_general/station/overide/cp/cco/Module1
-rw-r--r--test_general/station/overide/cp/cco/cco.h123
-rw-r--r--test_general/station/overide/cp/cco/inc/context.h46
-rw-r--r--test_general/station/overide/cp/cco/src/cco.c281
-rw-r--r--test_general/station/overide/cp/secu/Module1
-rw-r--r--test_general/station/overide/cp/secu/inc/context.h24
-rw-r--r--test_general/station/overide/cp/secu/secu.h58
-rw-r--r--test_general/station/overide/cp/secu/src/secu.c74
-rw-r--r--test_general/station/src/int_station.c68
11 files changed, 701 insertions, 9 deletions
diff --git a/test_general/station/inc/int_context.h b/test_general/station/inc/int_context.h
index 8e3d4aaa9a..61c711d0af 100644
--- a/test_general/station/inc/int_context.h
+++ b/test_general/station/inc/int_context.h
@@ -32,6 +32,12 @@
#include "cl/cl.h"
#include "hle/hle.h"
+#include "cp/beacon/beacons.h"
+#include "cp/secu/secu.h"
+#include "cp/station/station.h"
+#include "cp/cco/cco.h"
+
+
u8 sched_stack [CYGNUM_HAL_STACK_SIZE_TYPICAL];
u8 sar_stack [CYGNUM_HAL_STACK_SIZE_TYPICAL];
@@ -42,6 +48,16 @@ struct tei_node_t
};
typedef struct tei_node_t tei_node_t;
+struct cp_t
+{
+ u8 *mme_tx_buffer;
+ cp_cco_t *cco;
+ cp_sta_t *sta;
+ cp_secu_t *secu;
+ cp_beacon_t *beacon;
+};
+typedef struct cp_t cp_t;
+
struct int_station_t
{
mac_config_t *mac_config;
@@ -50,6 +66,7 @@ struct int_station_t
sar_t *sar;
cl_t *cl;
hle_t *hle;
+ cp_t cp;
/** Used to memorize the list of TEI inserted in the mac_Store to remove it
diff --git a/test_general/station/int_station_fc.h b/test_general/station/int_station_fc.h
index 6f05b02976..ee6b1e0497 100644
--- a/test_general/station/int_station_fc.h
+++ b/test_general/station/int_station_fc.h
@@ -88,4 +88,21 @@ int fc_station_link_add (fcall_ctx_t *fcall, fcall_param_t **param,
int fc_station_link_remove (fcall_ctx_t *fcall, fcall_param_t **param,
sci_msg_t **msg, void *data);
+/**
+ * Remove a link to the Station in order to receive or transmit data.
+ *
+ * - type TX or RX link, it is a short 1 for TX 0 for RX.
+ * - bcast short indicating if the link is a broadcast link
+ * - mme short indicating if the link will be use to transmit MMEs
+ * - lid short indicating if it is a link identitier.
+ * - tei short the destination station.
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_pbproc_print_trace (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data);
+
#endif /*INT_STATION_FC_H_*/
diff --git a/test_general/station/overide/cp/cco/Module b/test_general/station/overide/cp/cco/Module
new file mode 100644
index 0000000000..89eab437be
--- /dev/null
+++ b/test_general/station/overide/cp/cco/Module
@@ -0,0 +1 @@
+SOURCES:=cco.c
diff --git a/test_general/station/overide/cp/cco/cco.h b/test_general/station/overide/cp/cco/cco.h
new file mode 100644
index 0000000000..0dcda62b01
--- /dev/null
+++ b/test_general/station/overide/cp/cco/cco.h
@@ -0,0 +1,123 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_cco_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/cco.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+/** Foward declaration */
+typedef struct cp_cco_t cp_cco_t;
+
+cp_cco_t *
+cp_cco_init (void);
+
+void
+cp_cco_uninit (cp_cco_t *ctx);
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx);
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av);
+
+bool
+cp_cco_get_access(cp_cco_t *ctx);
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access);
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx);
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr);
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx);
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm);
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx);
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots);
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx);
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage);
+
+u8
+cp_cco_get_slot_id (cp_cco_t *ctx);
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id);
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx);
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss);
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx);
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm);
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap);
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap);
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap);
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx);
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status);
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status);
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status);
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx);
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status);
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_cco_h */
diff --git a/test_general/station/overide/cp/cco/inc/context.h b/test_general/station/overide/cp/cco/inc/context.h
new file mode 100644
index 0000000000..a503f02382
--- /dev/null
+++ b/test_general/station/overide/cp/cco/inc/context.h
@@ -0,0 +1,46 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+#define cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct cp_cco_t
+{
+ BITFIELDS_WORD
+ (
+ uint dt_av:3;,
+ uint access:1;,
+ uint ncnr:1;,
+ uint npsm:1;,
+ uint num_slots:3;,
+ uint slot_usage:8;,
+ uint slotid:3;,
+ uint aclss:3;,
+ uint nm:2;,
+ uint cco_cap:2;,
+ uint proxy_cap:1;,
+ uint backup_cap:1;,
+ uint cco_status:1;,
+ uint pco_status:1;,
+ uint backup_cco:1;
+ );
+ BITFIELDS_WORD
+ (
+ uint nr:6;,
+ uint user_appointed_cco_status:1;,
+ uint rsvd:25;
+ );
+};
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_cco_inc_context_h */
diff --git a/test_general/station/overide/cp/cco/src/cco.c b/test_general/station/overide/cp/cco/src/cco.c
new file mode 100644
index 0000000000..c793828138
--- /dev/null
+++ b/test_general/station/overide/cp/cco/src/cco.c
@@ -0,0 +1,281 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/cco/src/cco.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/cco/cco.h"
+#include "cp/cco/inc/context.h"
+
+static cp_cco_t cco;
+
+cp_cco_t *
+cp_cco_init (void)
+{
+ cco.dt_av = 0x0;
+ cco.access = 0x0;
+ cco.ncnr = 0x0;
+ cco.npsm = 0x0;
+ cco.num_slots = 0x1;
+ cco.slot_usage = 0x1;
+ cco.slotid = 0x0;
+ cco.aclss = 0x1;
+ cco.nm = 0x2;
+ cco.cco_cap = 0x0;
+ cco.proxy_cap = 0;
+ cco.backup_cap = 0;
+ cco.cco_status = 0;
+ cco.pco_status = 0;
+ cco.backup_cco = 0;
+ cco.nr = 0;
+ cco.user_appointed_cco_status = 0;
+ cco.rsvd = 0;
+
+ return &cco;
+}
+
+void
+cp_cco_uninit (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+uint
+cp_cco_get_dt_av(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->dt_av;
+}
+
+void
+cp_coo_set_dt_av (cp_cco_t *ctx, uint dt_av)
+{
+ dbg_assert (ctx);
+ ctx->dt_av = dt_av;
+}
+
+bool
+cp_cco_get_access(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->access;
+}
+
+void
+cp_cco_set_access(cp_cco_t *ctx, bool access)
+{
+ dbg_assert (ctx);
+
+ ctx->access = access;
+}
+
+bool
+cp_cco_get_ncnr (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->ncnr;
+}
+
+void
+cp_cco_set_ncnr (cp_cco_t *ctx, bool ncnr)
+{
+ dbg_assert (ctx);
+ ctx->ncnr = ncnr;
+}
+
+bool
+cp_cco_get_npsm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->npsm;
+}
+
+void
+cp_cco_set_npsm (cp_cco_t *ctx, bool npsm)
+{
+ dbg_assert (ctx);
+ ctx->npsm = npsm;
+}
+
+u8
+cp_cco_get_numslots (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->num_slots;
+}
+
+void
+cp_cco_set_numslots (cp_cco_t *ctx, u8 num_slots)
+{
+ dbg_assert (ctx);
+ ctx->num_slots = num_slots;
+}
+
+u8
+cp_cco_get_slotusage (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->slot_usage;
+}
+
+void
+cp_cco_set_slotusage (cp_cco_t *ctx, u8 slotusage)
+{
+ dbg_assert (ctx);
+ ctx->slot_usage = slotusage;
+}
+
+u8
+cp_cco_get_slot_id (cp_cco_t *cco)
+{
+ dbg_assert (cco);
+ return cco->slotid;
+}
+
+void
+cp_cco_set_slot_id (cp_cco_t *ctx, u8 slot_id)
+{
+ dbg_assert (ctx);
+ ctx->slotid = slot_id;
+}
+
+u8
+cp_cco_get_aclss (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->aclss;
+}
+
+void
+cp_cco_set_aclss (cp_cco_t *ctx, u8 aclss)
+{
+ dbg_assert (ctx);
+ ctx->aclss = aclss;
+}
+
+u8
+cp_cco_get_nm (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->nm;
+}
+
+void
+cp_cco_set_nm (cp_cco_t *ctx, u8 nm)
+{
+ dbg_assert (ctx);
+ ctx->nm = nm;
+}
+
+u8
+cp_cco_get_cco_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_cap;
+}
+
+void
+cp_cco_set_cco_cap (cp_cco_t *ctx, u8 cco_cap)
+{
+ dbg_assert (ctx);
+ ctx->cco_cap = cco_cap;
+}
+
+bool
+cp_cco_get_proxy_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->proxy_cap;
+}
+
+void
+cp_cco_set_proxy_cap (cp_cco_t *ctx, bool proxy_cap)
+{
+ dbg_assert (ctx);
+ ctx->proxy_cap = proxy_cap;
+}
+
+bool
+cp_cco_get_backup_cap (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cap;
+}
+
+void
+cp_cco_set_backup_cap (cp_cco_t *ctx, bool backup_cap)
+{
+ dbg_assert (ctx);
+ ctx->backup_cap = backup_cap;
+}
+
+bool
+cp_cco_get_cco_status (cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->cco_status;
+}
+
+void
+cp_cco_set_cco_status (cp_cco_t *ctx, bool cco_status)
+{
+ dbg_assert (ctx);
+ ctx->cco_status = cco_status;
+}
+
+bool
+cp_cco_get_pco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->pco_status;
+}
+
+void
+cp_cco_set_pco_status(cp_cco_t *ctx, bool pco_status)
+{
+ dbg_assert(ctx);
+ ctx->pco_status = pco_status;
+}
+
+bool
+cp_cco_get_backup_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->backup_cco;
+}
+
+void
+cp_cco_set_backup_cco_status(cp_cco_t *ctx, bool backup_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->backup_cco = backup_cco_status;
+}
+
+bool
+cp_cco_get_user_appointed_cco_status(cp_cco_t *ctx)
+{
+ dbg_assert (ctx);
+ return ctx->user_appointed_cco_status;
+}
+
+void
+cp_cco_set_user_appointed_cco_status(cp_cco_t *ctx, bool ua_cco_status)
+{
+ dbg_assert (ctx);
+ ctx->user_appointed_cco_status = ua_cco_status;
+}
+
diff --git a/test_general/station/overide/cp/secu/Module b/test_general/station/overide/cp/secu/Module
new file mode 100644
index 0000000000..9087aae87c
--- /dev/null
+++ b/test_general/station/overide/cp/secu/Module
@@ -0,0 +1 @@
+SOURCES:=secu.c
diff --git a/test_general/station/overide/cp/secu/inc/context.h b/test_general/station/overide/cp/secu/inc/context.h
new file mode 100644
index 0000000000..f7772ad9bc
--- /dev/null
+++ b/test_general/station/overide/cp/secu/inc/context.h
@@ -0,0 +1,24 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_secu_inc_context_h
+#define cp_beacon_test_central_beacon_overide_cp_secu_inc_context_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/secu/inc/context.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+struct cp_secu_t
+{
+ bool kbc;
+ u8 eks;
+};
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_secu_inc_context_h */
diff --git a/test_general/station/overide/cp/secu/secu.h b/test_general/station/overide/cp/secu/secu.h
new file mode 100644
index 0000000000..c571679059
--- /dev/null
+++ b/test_general/station/overide/cp/secu/secu.h
@@ -0,0 +1,58 @@
+#ifndef cp_beacon_test_central_beacon_overide_cp_secu_secu_h
+#define cp_beacon_test_central_beacon_overide_cp_secu_secu_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/secu/secu.h
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+
+#include "cp/secu/secu.h"
+
+typedef struct cp_secu_t cp_secu_t;
+
+/**
+ * Initialize the security layer
+ *
+ * \return the security context.
+ */
+cp_secu_t *
+cp_secu_init (void);
+
+/**
+ * Uninitialize the seucurity layer
+ *
+ * \param ctx the security context.
+ */
+void
+cp_secu_uninit (cp_secu_t *ctx);
+
+/**
+ * Get Key being change
+ * 0 for a frame level encyption key NEK.
+ * 1 for a payload encryption key.
+ *
+ * \param ctx the security context.
+ * \return the boolean value
+ */
+bool
+cp_secu_get_kbc (cp_secu_t *ctx);
+
+/**
+ * Get the new EKS for the next beacon period.
+ *
+ * \param ctx the security context
+ * \return the eks value.
+ */
+u8
+cp_secu_get_eks (cp_secu_t *ctx);
+
+#endif /* cp_beacon_test_central_beacon_overide_cp_secu_secu_h */
diff --git a/test_general/station/overide/cp/secu/src/secu.c b/test_general/station/overide/cp/secu/src/secu.c
new file mode 100644
index 0000000000..b2fa99d671
--- /dev/null
+++ b/test_general/station/overide/cp/secu/src/secu.c
@@ -0,0 +1,74 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file cp/beacon/test/central_beacon/overide/cp/secu/src/secu.c
+ * \brief « brief description »
+ * \ingroup « module »
+ *
+ * « long description »
+ */
+#include "common/std.h"
+
+#include "cp/secu/secu.h"
+#include "cp/secu/inc/context.h"
+
+// static declaration
+static cp_secu_t secu_global;
+
+/**
+ * Initialize the security layer
+ *
+ * \return the security context.
+ */
+cp_secu_t *
+cp_secu_init (void)
+{
+ return &secu_global;
+}
+
+/**
+ * Uninitialize the seucurity layer
+ *
+ * \param ctx the security context.
+ */
+void
+cp_secu_uninit (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+}
+
+/**
+ * Get Key being change
+ * 0 for a frame level encyption key NEK.
+ * 1 for a payload encryption key.
+ *
+ * \param ctx the security context.
+ * \return the boolean value
+ */
+bool
+cp_secu_get_kbc (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->kbc;
+}
+
+/**
+ * Get the new EKS for the next beacon period.
+ *
+ * \param ctx the security context
+ * \return the eks value.
+ */
+u8
+cp_secu_get_eks (cp_secu_t *ctx)
+{
+ dbg_assert (ctx);
+
+ return ctx->eks;
+}
+
diff --git a/test_general/station/src/int_station.c b/test_general/station/src/int_station.c
index 4e958b04fe..ad038a1972 100644
--- a/test_general/station/src/int_station.c
+++ b/test_general/station/src/int_station.c
@@ -29,6 +29,7 @@
#include "hle/inc/trace.h"
#include "mac/common/ntb.h"
+#include "mac/pbproc/inc/context.h"
int_station_t int_sta_global;
@@ -65,6 +66,20 @@ int_station_t *int_station_init (void)
int_sta_global.hle = hle_init (int_sta_global.cl);
+ int_sta_global.cp.sta = cp_station_init (int_sta_global.mac_store,
+ int_sta_global.cl,
+ int_sta_global.pbproc,
+ int_sta_global.mac_config);
+
+ int_sta_global.cp.secu = cp_secu_init ();
+ int_sta_global.cp.cco = cp_cco_init ();
+
+ int_sta_global.cp.beacon = cp_beacon_init(pbproc_get_phy(int_sta_global.pbproc),
+ int_sta_global.cp.sta, int_sta_global.cp.secu,
+ pbproc_get_ca (int_sta_global.pbproc),
+ int_sta_global.pbproc, int_sta_global.mac_store,
+ int_sta_global.cp.cco);
+
// Create the Thread for the SAR.
cyg_thread_create (9, &sar_process, (cyg_addrword_t) int_sta_global.sar,
"SAR", sar_stack, CYGNUM_HAL_STACK_SIZE_TYPICAL,
@@ -86,6 +101,7 @@ int_station_t *int_station_init (void)
void int_station_uninit (int_station_t *ctx)
{
tei_node_t *tei_node;
+ uint now;
dbg_assert (ctx);
dbg_assert (ctx->mac_config);
@@ -95,13 +111,25 @@ void int_station_uninit (int_station_t *ctx)
dbg_assert (ctx->cl);
dbg_assert (ctx->hle);
+ dbg_assert (ctx->cp.secu);
+ dbg_assert (ctx->cp.cco);
+ dbg_assert (ctx->cp.sta);
+ dbg_assert (ctx->cp.beacon);
+
pbproc_activate (ctx->pbproc, false);
+ now = mac_ntb();
+ while (now < mac_ntb() + 10000);
pbproc_uninit (ctx->pbproc);
sar_uninit (ctx->sar);
cl_uninit (ctx->cl);
hle_uninit (ctx->hle);
+ cp_secu_uninit (ctx->cp.secu);
+ cp_station_uninit (ctx->cp.sta);
+ cp_cco_uninit (ctx->cp.cco);
+ cp_beacon_uninit(ctx->cp.beacon);
+
blk_release (ctx->mac_config);
while (!list_empty (&ctx->tei_list))
@@ -280,18 +308,21 @@ void int_station_link_remove (int_station_t *ctx, uint type, uint bcast,
*/
void pbproc_sched (cyg_addrword_t int_sta)
{
- create_schedule_csma_only ((int_station_t *) int_sta, 14);
- ((int_station_t *) int_sta)->sched_index ++;
+ while (true)
+ {
+ create_schedule_csma_only ((int_station_t *) int_sta, 14);
+ ((int_station_t *) int_sta)->sched_index ++;
- //create the second schedule.
- create_schedule_csma_only ((int_station_t *) int_sta, 14);
- ((int_station_t *) int_sta)->sched_index ++;
+ //create the second schedule.
+ create_schedule_csma_only ((int_station_t *) int_sta, 14);
+ ((int_station_t *) int_sta)->sched_index ++;
- //create the third schedule.
- create_schedule_csma_only ((int_station_t *) int_sta, 14);
- ((int_station_t *) int_sta)->sched_index ++;
+ //create the third schedule.
+ create_schedule_csma_only ((int_station_t *) int_sta, 14);
+ ((int_station_t *) int_sta)->sched_index ++;
- cyg_thread_delay (50);
+ cyg_thread_delay (50);
+ }
}
/**
@@ -593,3 +624,22 @@ int fc_hle_print_trace (fcall_ctx_t *fcall, fcall_param_t **param,
return true;
}
+/**
+ * Send a central beacon over the PWL.
+ *
+ * \param fcall the fcall context.
+ * \param param the fcall param
+ * \param msg the message
+ * \param data anything
+ */
+int fc_pbproc_print_trace (fcall_ctx_t *fcall, fcall_param_t **param,
+ sci_msg_t **msg, void *data)
+{
+ fcall_param_reset (*param);
+
+ trace_buffer_dbg_dump (&int_sta_global.pbproc->trace);
+
+ return true;
+
+}
+