summaryrefslogtreecommitdiff
path: root/cesar/test_general/station/common/src/ce_stub.c
blob: d02d92bdeca13577d38e5cc411d88ffbd14bcb78 (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
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    src/ce_stub.c
 * \brief   « brief description »
 * \ingroup « module »
 *
 * « long description »
 */
#include "common/std.h"
#include "ce/rx.h"
#include "cp/cp.h"
#include "mac/sar/sar.h"

static rxce_t rxce;

bool
ce_measurement (void *user, pbproc_rx_params_t *rx_params,
                uint pb_nb, blk_t **first_blk, blk_t **last_blk,
                pb_t *chan_data, uint nb_chandata, uint *blk_offset)
{
    // Add a ref on the rx_params to release it in this function.
    blk_addref (rx_params);
    blk_release (rx_params);

    if (nb_chandata)
        blk_release_desc_range_nb ((blk_t *) chan_data, nb_chandata);

    return false;
}

rxce_t *
rxce_init (sar_t *sar, mac_store_t *mac_store_ctx, mac_config_t *mac_config_ctx, cp_t *cp_ctx)
{
    sar_init_measure_context (sar, &rxce);
    sar_init_measurement_cb (sar, ce_measurement);

    return &rxce;
}

void
rxce_uninit (rxce_t *ce)
{
    dbg_assert (ce);
}