summaryrefslogtreecommitdiff
path: root/cesar/cp/interf/src/interf_cl_layer.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp/interf/src/interf_cl_layer.c')
-rw-r--r--cesar/cp/interf/src/interf_cl_layer.c89
1 files changed, 89 insertions, 0 deletions
diff --git a/cesar/cp/interf/src/interf_cl_layer.c b/cesar/cp/interf/src/interf_cl_layer.c
new file mode 100644
index 0000000000..468121ad39
--- /dev/null
+++ b/cesar/cp/interf/src/interf_cl_layer.c
@@ -0,0 +1,89 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2007 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+
+#include "common/std.h"
+
+#include "cp/beacon/inc/bentry.h"
+#include "cp/beacon/inc/beacons_ctx.h"
+#include "cp/beacon/forward.h"
+#include "cp/beacon/inc/beacons_work.h"
+
+#include "cp/interf/inc/interf_cl_layer.h"
+
+extern cl_t *m_cl_ctx;
+extern mac_store_t *m_mac_store_ctx;
+
+void interf_cl_layer_init (void)
+{
+// u8 *buf;
+// int i;
+ // get the mac store context
+ // get the cl context
+ // register the receive callback at the cl
+ //cl_mme_recv_init (m_cl_ctx, interf_receive, NULL);
+ // transmit some buffer to the cl
+/* for(i=0 ; i<3 ; i++)
+ {
+ buf = (u8 *) interf_give_buf();
+ cl_mme_recv_done (m_cl_ctx, buf);
+ }*/
+}
+
+void interf_cl_layer_add_buf (msg_mme_t *msg)
+{
+ /*
+ dbg_assert(m_mac_store_ctx);
+ dbg_assert (m_cl_ctx);
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+*/
+}
+
+void
+interf_cl_layer_send_buf (
+ const msg_mme_t *msg,
+ const uint length,
+ const msg_param_t msg_param,
+ const tei_t tei
+ )
+{
+ /*
+ mfs_tx_t *mfs_tx;
+ bool added;
+
+ dbg_assert(m_mac_store_ctx);
+ dbg_assert (m_cl_ctx);
+ dbg_assert ( !msg_check_wrong_mme_const_values (msg));
+
+ // Retrieve the TX MFS.
+ mfs_tx = mac_store_mfs_get_tx (m_mac_store_ctx,
+ msg_param.mnbf,
+ true,
+ MAC_LID_NONE,
+ tei
+ );
+ if( ! mfs_tx)
+ {
+ mfs_tx = mac_store_mfs_add_tx (m_mac_store_ctx,
+ msg_param.mnbf,
+ true,
+ MAC_LID_NONE,
+ tei,
+ &added
+ );
+ dbg_assert(added);
+ }
+ // Send the MME to the PLC
+ cl_mme_send (m_cl_ctx,
+ (u8 *) msg,
+ length,
+ mfs_tx,
+ interf_release_buf,
+ (void *) msg
+ );
+*/
+}