#ifndef bsu_inc_interface_h #define bsu_inc_interface_h /* Cesar project {{{ * * Copyright (C) 2010 Spidcom * * <<>> * * }}} */ /** * \file bsu/inc/interface.h * \brief BSU private interface functions. * \ingroup bsu */ BEGIN_DECLS /** * Send a copy of the beacon to the upper layer. * \param ctx the module context. * \param beacon the beacon structure to fill. * \param direction the reception or transmission. */ void bsu_beacon_send_upper_layer (bsu_t *ctx, bsu_beacon_t *beacon, bsu_beacon_direction_t direction); /** * Send a beacon over the medium. * \param ctx the bsu context. * \param beacon_type the beacon type to send. * \param beacon the beacon to send. * \param bsu_params the BSU computed parameters. * \param bto_bpsto pointer address to access to the bto and bpsto. * * This function will send the beacon over the medium and to the upper layer * (it adds a reference on the beacon before providing it to the upper layer). */ void bsu_beacon_send (bsu_t *ctx, bsu_beacon_type_t beacon_type, pb_beacon_t *beacon, void *bto_bpsto); /** * Receive a beacon from the medium. * \param ctx the bsu context. * \param beacon the beacon received. * \param params the beacon phy rx params received. */ void bsu_beacon_recv (bsu_t *ctx, pb_beacon_t *beacon, pbproc_rx_beacon_params_t *params); END_DECLS #endif /* bsu_inc_interface_h */