summaryrefslogtreecommitdiff
path: root/cesar/cp2/cco
diff options
context:
space:
mode:
authorboure2008-05-28 15:27:22 +0000
committerboure2008-05-28 15:27:22 +0000
commitaecaf9b668efe583f5533ded264373f5d687c6b3 (patch)
treefe0932c322252e7cf4bf35b3560901e83290c45e /cesar/cp2/cco
parent68a3e0924abf5bf31e4cf8a962f17cba1366f3f0 (diff)
add conn_stub.c
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2130 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2/cco')
-rw-r--r--cesar/cp2/cco/bw/test/src/conn_stub.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/cesar/cp2/cco/bw/test/src/conn_stub.c b/cesar/cp2/cco/bw/test/src/conn_stub.c
new file mode 100644
index 0000000000..1ce7735e1d
--- /dev/null
+++ b/cesar/cp2/cco/bw/test/src/conn_stub.c
@@ -0,0 +1,75 @@
+ /* Cesar project {{{
+ *
+ * Copyright (C) 2008 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file conn_stub.c
+ * \brief conn stub
+ * \ingroup cp2_conn
+ *
+ * Control the schedule of the becon period
+ */
+#include "common/std.h"
+#include "cp2/cp.h"
+#include "cp2/inc/context.h"
+#include "cp2/conn/conn.h"
+#include "cp2/conn/link.h"
+#include "lib/blk.h"
+
+cp_conn_t*
+cp_conn_get_conn(cp_t *ctx, u8 cid)
+{
+ cp_conn_t *conn;
+ conn = blk_alloc();
+ conn->cid = cid;
+ conn->conn_state = OUT;
+ conn->flid = cp_link_init();
+ return conn;
+}
+/**
+ * initialise the memory needed buy the link
+ * \return \todo fill this
+ *
+ */
+cp_link_t*
+cp_link_init (void)
+{
+ cp_link_t link;
+ cp_link_ble_interval_t table_ble[10];
+ blk_t *tmp_blk,*last_blk;
+
+ int i=0;
+ link.cinfo = blk_alloc();
+
+ link.ble = blk_alloc_desc();
+ last_blk = blk_alloc_desc();
+ link.ble = blk_alloc_desc_range(10, &last_blk);
+ tmp_blk = link.ble;
+
+ for(i=0;i<10;i++)
+ {
+ table_ble[i].ble=i*10;
+ table_ble[i].ble=i*100;
+
+ (cp_link_ble_interval_t*)tmp_blk->data = &table_ble[i];
+ tmp_blk = tmp_blk->next;
+ }
+ dbg_assert(blk_check_memory);
+ return NULL;
+}
+
+/**
+ * del a connection regarding to its CID.
+ * \param ctx conn context.
+ * \param lid Connection identifier
+ *
+ */
+void
+cp_link_uninit (cp_link_t *link)
+{
+}
+
+