summaryrefslogtreecommitdiff
path: root/cesar/bsu/test/utest/src/ca.c
blob: 28332962a7be7e6277b053cc2f2507e8cafcd2ed (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
/* Cesar project {{{
 *
 * Copyright (C) 2010 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    bsu/test/utest/src/ca.c
 * \brief   CA stub functions.
 * \ingroup bsu
 */
#include "common/std.h"
#include "mac/ca/ca.h"
#include "bsu/test/utest/tests.h"

static ca_schedule_t ca_sched[CA_SCHEDULE_NB];

void
ca_mfs_add (ca_t *ctx, mfs_tx_t *mfs)
{
}

void
ca_mfs_hold (ca_t *ctx, mfs_tx_t *mfs)
{
}

ca_schedule_t *
ca_alloc_get_schedule (ca_t *ctx, uint index)
{
    dbg_assert (index < CA_SCHEDULE_NB);
    return &ca_sched[index];
}

void
ca_alloc_update_beacon_periods (ca_t *ctx,
                                ca_beacon_period_t *beacon_periods,
                                uint beacon_periods_nb)
{
    uint i;
    bsu_test_ca_t *t = (bsu_test_ca_t *) ctx;
    dbg_assert (beacon_periods);
    dbg_assert (beacon_periods_nb < CA_BEACON_PERIOD_NB);
    for (i = 0; i < beacon_periods_nb; i++)
        t->beacon_periods[i] = beacon_periods[i];
    t->nb_beacon_periods = beacon_periods_nb;
}

void
ca_mfs_remove (ca_t *ca, mfs_tx_t *mfs)
{
}