summaryrefslogtreecommitdiff
path: root/cesar/mac/pbproc/test/maximus/inc/test_pbproc.h
blob: 6cb16c87d0c0782af1f414ddb776da6f937ef207 (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
#ifndef inc_test_pbproc_h
#define inc_test_pbproc_h
/* Cesar project {{{
 *
 * Copyright (C) 2007 Spidcom
 *
 * <<<Licence>>>
 *
 * }}} */
/**
 * \file    inc/test_pbproc.h
 * \brief   PBProc test on Maximus.
 * \ingroup test
 */
#include "mac/pbproc/pbproc.h"

/* Forward declaration. */
typedef struct test_pbproc_t test_pbproc_t;

/**
 * Helper for parameter binding.
 * \param  name  parameter string
 * \param  var  parameter storage
 * \return  true if binding successful
 */
#define test_pbproc_fcall_bind(name, var) \
    (fcall_param_bind (*param, *msg, (name), sizeof (var), &(var)) \
     == sizeof (var))

#define test_pbproc_fcall_bind_long(name, var) \
    (fcall_param_bind_long (*param, *msg, (name), &(var)) == sizeof (var))

/**
 * Helper for parameter adding.
 * \param  name  parameter string
 * \param  var  parameter storage
 */
#define test_pbproc_fcall_add(name, var) \
    dbg_check (fcall_param_add (&param, &msg, (name), sizeof (var), &(var)) \
               != -1)

#define test_pbproc_fcall_add_long(name, var) \
    dbg_check (fcall_param_add_long (&param, &msg, (name), &(var)) != -1)

BEGIN_DECLS

void
test_pbproc_default_rx_cb (void *user, mfs_t *mfs, mfs_t *mfs_mme,
                           const pbproc_rx_params_t *rx_params,
                           pb_t *pb_first, pb_t *pb_last, uint pb_nb,
                           pb_t *chandata_first, uint chandata_nb);

END_DECLS

#endif /* inc_test_pbproc_h */