summaryrefslogtreecommitdiff
path: root/hle/test/overide/cl/inc/cl.h
blob: ab3585ca33e0a78c185d63e67dbc0118f131907f (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
90
91
92
93
94
95
96
97
98
99
100
101
#ifndef overide_cl_inc_cl_h
#define overide_cl_inc_cl_h
/* Cesar project {{{
 *
 * Copyright (C) 2007 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    overide/cl/inc/cl.h
 * \brief   « brief description »
 * \ingroup « module »
 *
 * « long description »
 */

/** data tx structure. */
struct cl_data_tx_t
{
    /** the callback function to use once the data hab been sent. */
    cl_data_send_done_cb_t cb;
    /** user data to provide with the callback. */
    void *user;
};
typedef struct cl_data_tx_t cl_data_tx_t;

/** data tx structure. */
struct cl_data_rx_t
{
    /** callback to call the upperlayer once the CL receives a data. */
    cl_data_recv_cb_t cb;
    /** user value to provide with the function callback. */
    void *user;
};
typedef struct cl_data_rx_t cl_data_rx_t;

/** MME tx structure to the upper layer*/
struct cl_mme_tx_t
{
    /** function to call when a mme is for the driver */
    cl_data_recv_cb_t cb;
    /** user data */
    void *user;
    /** mme buffer address */
    u8 *mme_buffer;
};
typedef struct cl_mme_tx_t cl_mme_tx_t; 


struct cl_mme_recv_t
{
    /** The buffer received previously */
    u8 *buffer;
    /** From which layer it comes. */
    bool sar;
};

/** cl mme context */
struct cl_mme_t
{
    /** The Call back to inform the upper layer when a MME has been processed 
     * */
    cl_mme_ul_recv_done_cb_t ul_mme_recv_done;
    void *ul_mme_recv_done_user_data;

    /** Callback to use to add a buffer to the CP. */
    cl_mme_buffer_add_cb_t mme_buffer_add_cb;
    /** The user data to provide with the bellow callback. */
    void *mme_buffer_add_user_data;
        
    /** Data corresponding to the mme_recv message send to the CP. */
    cl_mme_recv_t mme_recv;
};
typedef struct cl_mme_t cl_mme_t;

struct cl_t
{
    /** The sar context use to send the MME or data. */
    sar_t *sar;
    
    /** Mac store reference. */
    mac_store_t *mac_store;
    
    /** MME module to use to send or receive the MME to the CP. */
    cl_mme_t mme;
    
    /** send data context. */
    cl_data_tx_t data_tx;
    
    /** recevie data context. */
    cl_data_rx_t data_rx;
    
    /** When a MME is send as data to the local tei */
    cl_mme_tx_t mme_ul_send;
    
    /** MME buffer to provide to the SAR */
    u8 mme_buffer [2048] __attribute__((aligned(2048)));
};

#endif /* overide_cl_inc_cl_h */