summaryrefslogtreecommitdiff
path: root/cesar/cp/eoc/sta/action/test/utest_eoc/src/dataplane_stub.c
blob: f8bc35fbf851cc02073babee135f04c01d0c0081 (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
/* Cesar project {{{
 *
 * Copyright (C) 2008 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    src/dataplane_stub.c
 * \brief   Data plane layers stub.
 * \ingroup test
 */
#include "common/std.h"

#include "lib/scenario/scenario.h"

#include "cl/cl_mactotei.h"
#include "mac/pbproc/pbproc.h"
#include "cp/inc/context.h"

void
sar_activate (sar_t *ctx, bool flag)
{
    scenario_event (sar_activate, param);
    test_fail_unless (flag == param->flag);
}

void
sar_cleanup (sar_t *ctx)
{
    if (!scenario.current
        || scenario.current->event_id != SCENARIO_EVENT_sar_cleanup)
        return; /* Be less strict. */
    scenario_event (sar_cleanup);
}

void
sar_store_mfs_remove (mac_store_t *mac_store, mfs_t *mfs, void *user)
{
    mac_store_mfs_remove (mac_store, mfs);
}

void
sar_sta_remove (sar_t *ctx, u8 tei)
{
    cp_t *cp = (void *) ctx;
    /* For EoC some GLID are created. */
    sta_t *sta = mac_store_sta_get (cp->mac_store, tei);
    if (sta)
    {
        mac_store_mfs_travel_by_tei (cp->mac_store, tei,
                                     sar_store_mfs_remove,
                                     ctx);
        dbg_check (mac_store_sta_remove (cp->mac_store, tei));
        blk_release (sta);
    }
}

void
pbproc_activate (pbproc_t *ctx, bool flag)
{
    scenario_event (pbproc_activate, param);
    test_fail_unless (flag == param->flag);
}


void
pbproc_parameters_adjust (pbproc_t *ctx, bool adjust)
{
    scenario_event (pbproc_parameters_adjust, param);
    test_fail_unless (adjust == param->adjust);
}

void
phy_tx_scale_adapt_exp_set (phy_t *ctx, u8 exp)
{
    dbg_assert_default ();
}

void
phy_tx_scale_adapt_set (phy_t *ctx, u16 value)
{
    dbg_assert_default ();
}