summaryrefslogtreecommitdiff
path: root/cp/interf/src/interf_cl_layer.c
blob: 468121ad39966f9b5140a9b8e213389858b6b1a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
                );
*/
}