/** * @file * * @brief semi automatic generated wrapper code for callback functions * * $Id: callback_wrapper.c,v 1.16 2006/12/22 06:35:05 sschneid Exp $ * */ /** * \author * Atmel Corporation: http://www.atmel.com * Support email: avr@atmel.com */ /* * Copyright (c) 2006, Atmel Corporation All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. The name of ATMEL may not be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* === Includes ============================================================ */ #include #include "board.h" #include "cmdif.h" #include "mac.h" #if APP_TYPE >= APP_L3 #include "wpan_nwk.h" #endif #if APP_TYPE == APP_L2 #include "wpan_mac.h" #endif #if (APP_TYPE == APP_L1) || (APP_TYPE == APP_SNIFFER) || (APP_TYPE == APP_SCRPT_SNF) #include "wpan_phy.h" #endif #if APP_TYPE == APP_L0 #include "wpan_hal.h" #endif /* === Globals ============================================================= */ /* === Prototypes ========================================================== */ /* === Implementation ====================================================== */ #if (APP_TYPE >= APP_L2 && APP_TYPE < APP_L3) || defined(DOXYGEN) /* ==== MANUAL MODIFIED GENERATED CODE ==== */ /** * @brief wrapper function for messages of type mcps_data_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mcps_data_ind(uint8_t * m) { mcps_data_ind_t *pmsg = (mcps_data_ind_t *) m; wpan_mcpsdata_addr_t addr; addr.SrcAddrMode = pmsg->SrcAddrMode; addr.SrcPANId = pmsg->SrcPANId; addr.SrcAddr = pmsg->SrcAddr; addr.DstAddrMode = pmsg->DstAddrMode; addr.DstPANId = pmsg->DstPANId; addr.DstAddr = pmsg->DstAddr; usr_mcps_data_ind(&addr, pmsg->mpduLinkQuality, pmsg->SecurityUse, pmsg->ACLEntry, pmsg->msduLength, &(pmsg->data[1])); } /* ==== AUTO GENERATED CODE ==== */ /** * @brief wrapper function for messages of type mcps_data_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mcps_data_conf(uint8_t * m) { mcps_data_conf_t *pmsg; pmsg = (mcps_data_conf_t *) m; usr_mcps_data_conf(pmsg->msduHandle, pmsg->status); } /** * @brief wrapper function for messages of type mcps_purge_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mcps_purge_conf(uint8_t * m) { mcps_purge_conf_t *pmsg; pmsg = (mcps_purge_conf_t *) m; usr_mcps_purge_conf(pmsg->msduHandle, pmsg->status); } /** * @brief wrapper function for messages of type mlme_associate_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_associate_conf(uint8_t * m) { mlme_associate_conf_t *pmsg; pmsg = (mlme_associate_conf_t *) m; usr_mlme_associate_conf(pmsg->AssocShortAddress, pmsg->status); } /** * @brief wrapper function for messages of type mlme_associate_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_associate_ind(uint8_t * m) { mlme_associate_ind_t *pmsg; pmsg = (mlme_associate_ind_t *) m; usr_mlme_associate_ind(pmsg->DeviceAddress, pmsg->CapabilityInformation, pmsg->SecurityUse, pmsg->ACLEntry); } /** * @brief wrapper function for messages of type mlme_beacon_notify_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_beacon_notify_ind(uint8_t * m) { mlme_beacon_notify_ind_t *pmsg; pmsg = (mlme_beacon_notify_ind_t *) m; usr_mlme_beacon_notify_ind(pmsg->BSN, pmsg->PANDescriptor, pmsg->PendAddrSpec, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type mlme_comm_status_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_comm_status_ind(uint8_t * m) { mlme_comm_status_ind_t *pmsg; wpan_commstatus_addr_t msg_addr; pmsg = (mlme_comm_status_ind_t *) m; msg_addr.PANId = pmsg->PANId; msg_addr.SrcAddrMode = pmsg->SrcAddrMode; msg_addr.SrcAddr = pmsg->SrcAddr; msg_addr.DstAddrMode = pmsg->DstAddrMode; msg_addr.DstAddr = pmsg->DstAddr; usr_mlme_comm_status_ind(&msg_addr, pmsg->status); } /** * @brief wrapper function for messages of type mlme_disassociate_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_disassociate_conf(uint8_t * m) { mlme_disassociate_conf_t *pmsg; pmsg = (mlme_disassociate_conf_t *) m; usr_mlme_disassociate_conf(pmsg->status); } /** * @brief wrapper function for messages of type mlme_disassociate_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_disassociate_ind(uint8_t * m) { mlme_disassociate_ind_t *pmsg; pmsg = (mlme_disassociate_ind_t *) m; usr_mlme_disassociate_ind(pmsg->DeviceAddress, pmsg->DisassociateReason, pmsg->SecurityUse, pmsg->ACLEntry); } /** * @brief wrapper function for messages of type mlme_get_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_get_conf(uint8_t * m) { mlme_get_conf_t *pmsg; pmsg = (mlme_get_conf_t *) m; usr_mlme_get_conf(pmsg->status, pmsg->PIBAttribute, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type mlme_gts_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_gts_conf(uint8_t * m) { mlme_gts_conf_t *pmsg; pmsg = (mlme_gts_conf_t *) m; usr_mlme_gts_conf(pmsg->GTSCharacteristics, pmsg->status); } /** * @brief wrapper function for messages of type mlme_gts_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_gts_ind(uint8_t * m) { mlme_gts_ind_t *pmsg; pmsg = (mlme_gts_ind_t *) m; usr_mlme_gts_ind(pmsg->DevAddress, pmsg->GTSCharacteristics, pmsg->SecurityUse, pmsg->ACLEntry); } /** * @brief wrapper function for messages of type mlme_orphan_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_orphan_ind(uint8_t * m) { mlme_orphan_ind_t *pmsg; pmsg = (mlme_orphan_ind_t *) m; usr_mlme_orphan_ind(pmsg->OrphanAddress, pmsg->SecurityUse, pmsg->ACLEntry); } /** * @brief wrapper function for messages of type mlme_poll_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_poll_conf(uint8_t * m) { mlme_poll_conf_t *pmsg; pmsg = (mlme_poll_conf_t *) m; usr_mlme_poll_conf(pmsg->status); } /** * @brief wrapper function for messages of type mlme_reset_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_reset_conf(uint8_t * m) { mlme_reset_conf_t *pmsg; pmsg = (mlme_reset_conf_t *) m; usr_mlme_reset_conf(pmsg->status); } /** * @brief wrapper function for messages of type mlme_rx_enable_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_rx_enable_conf(uint8_t * m) { mlme_rx_enable_conf_t *pmsg; pmsg = (mlme_rx_enable_conf_t *) m; usr_mlme_rx_enable_conf(pmsg->status); } /** * @brief wrapper function for messages of type mlme_scan_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_scan_conf(uint8_t * m) { mlme_scan_conf_t *pmsg; pmsg = (mlme_scan_conf_t *) m; usr_mlme_scan_conf(pmsg->status, pmsg->ScanType, pmsg->UnscannedChannels, pmsg->ResultListSize, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type mlme_set_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_set_conf(uint8_t * m) { mlme_set_conf_t *pmsg; pmsg = (mlme_set_conf_t *) m; usr_mlme_set_conf(pmsg->status, pmsg->PIBAttribute); } /** * @brief wrapper function for messages of type mlme_start_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_start_conf(uint8_t * m) { mlme_start_conf_t *pmsg; pmsg = (mlme_start_conf_t *) m; usr_mlme_start_conf(pmsg->status); } /** * @brief wrapper function for messages of type mlme_sync_loss_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void mlme_sync_loss_ind(uint8_t * m) { mlme_sync_loss_ind_t *pmsg; pmsg = (mlme_sync_loss_ind_t *) m; usr_mlme_sync_loss_ind(pmsg->LossReason); } #endif #if (APP_TYPE >= APP_L1 && APP_TYPE < APP_L2) || defined(DOXYGEN) /** * @brief wrapper function for messages of type pd_data_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void pd_data_conf(uint8_t * m) { pd_data_conf_t *pmsg; pmsg = (pd_data_conf_t *) m; usr_pd_data_conf(pmsg->status); } /** * @brief wrapper function for messages of type pd_data_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void pd_data_ind(uint8_t * m) { pd_data_ind_t *pmsg; pmsg = (pd_data_ind_t *) m; usr_pd_data_ind(pmsg->psduLength, pmsg->ppduLinkQuality, pmsg->timestamp, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type plme_cca_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void plme_cca_conf(uint8_t * m) { plme_cca_conf_t *pmsg; pmsg = (plme_cca_conf_t *) m; usr_plme_cca_conf(pmsg->status); } /** * @brief wrapper function for messages of type plme_ed_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void plme_ed_conf(uint8_t * m) { plme_ed_conf_t *pmsg; pmsg = (plme_ed_conf_t *) m; usr_plme_ed_conf(pmsg->status, pmsg->EnergyLevel); } /** * @brief wrapper function for messages of type plme_get_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void plme_get_conf(uint8_t * m) { plme_get_conf_t *pmsg; pmsg = (plme_get_conf_t *) m; usr_plme_get_conf(pmsg->status, pmsg->PIBAttribute, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type plme_set_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void plme_set_conf(uint8_t * m) { plme_set_conf_t *pmsg; pmsg = (plme_set_conf_t *) m; usr_plme_set_conf(pmsg->PIBAttribute, pmsg->status); } /** * @brief wrapper function for messages of type plme_set_trx_state_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void plme_set_trx_state_conf(uint8_t * m) { plme_set_trx_state_conf_t *pmsg; pmsg = (plme_set_trx_state_conf_t *) m; usr_plme_set_trx_state_conf(pmsg->status); } #endif #if (APP_TYPE >= APP_L3) || defined(DOXYGEN) /** * @brief wrapper function for messages of type nlde_data_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlde_data_conf(uint8_t * m) { nlde_data_conf_t *pmsg; pmsg = (nlde_data_conf_t *) m; usr_nlde_data_conf(pmsg->NsduHandle, pmsg->status); } /** * @brief wrapper function for messages of type nlde_data_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlde_data_ind(uint8_t * m) { nlde_data_ind_t *pmsg; pmsg = (nlde_data_ind_t *) m; usr_nlde_data_ind(pmsg->SrcAddr, pmsg->NsduLength, pmsg->LinkQuality, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type nlme_direct_join_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_direct_join_conf(uint8_t * m) { nlme_direct_join_conf_t *pmsg; pmsg = (nlme_direct_join_conf_t *) m; usr_nlme_direct_join_conf(pmsg->DeviceAddress, pmsg->status); } /** * @brief wrapper function for messages of type nlme_get_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_get_conf(uint8_t * m) { nlme_get_conf_t *pmsg; pmsg = (nlme_get_conf_t *) m; usr_nlme_get_conf(pmsg->status, pmsg->NIBAttribute, pmsg->NIBAttributeLength, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type nlme_join_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_join_conf(uint8_t * m) { nlme_join_conf_t *pmsg; pmsg = (nlme_join_conf_t *) m; usr_nlme_join_conf(pmsg->PANId, pmsg->status); } /** * @brief wrapper function for messages of type nlme_join_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_join_ind(uint8_t * m) { nlme_join_ind_t *pmsg; pmsg = (nlme_join_ind_t *) m; usr_nlme_join_ind(pmsg->ShortAddress, pmsg->ExtendedAddress, pmsg->CapabilityInformation, pmsg->SecureJoin); } /** * @brief wrapper function for messages of type nlme_leave_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_leave_conf(uint8_t * m) { nlme_leave_conf_t *pmsg; pmsg = (nlme_leave_conf_t *) m; usr_nlme_leave_conf(pmsg->DeviceAddress, pmsg->status); } /** * @brief wrapper function for messages of type nlme_leave_ind_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_leave_ind(uint8_t * m) { nlme_leave_ind_t *pmsg; pmsg = (nlme_leave_ind_t *) m; usr_nlme_leave_ind(pmsg->DeviceAddress); } /** * @brief wrapper function for messages of type nlme_network_discovery_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_network_discovery_conf(uint8_t * m) { nlme_network_discovery_conf_t *pmsg; pmsg = (nlme_network_discovery_conf_t *) m; usr_nlme_network_discovery_conf(pmsg->NetworkCount, pmsg->status, &pmsg->data[1], pmsg->data[0]); } /** * @brief wrapper function for messages of type nlme_network_formation_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_network_formation_conf(uint8_t * m) { nlme_network_formation_conf_t *pmsg; pmsg = (nlme_network_formation_conf_t *) m; usr_nlme_network_formation_conf(pmsg->status); } /** * @brief wrapper function for messages of type nlme_permit_joining_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_permit_joining_conf(uint8_t * m) { nlme_permit_joining_conf_t *pmsg; pmsg = (nlme_permit_joining_conf_t *) m; usr_nlme_permit_joining_conf(pmsg->status); } /** * @brief wrapper function for messages of type nlme_reset_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_reset_conf(uint8_t * m) { nlme_reset_conf_t *pmsg; pmsg = (nlme_reset_conf_t *) m; usr_nlme_reset_conf(pmsg->status); } /** * @brief wrapper function for messages of type nlme_set_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_set_conf(uint8_t * m) { nlme_set_conf_t *pmsg; pmsg = (nlme_set_conf_t *) m; usr_nlme_set_conf(pmsg->status, pmsg->NIBAttribute); } /** * @brief wrapper function for messages of type nlme_start_router_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_start_router_conf(uint8_t * m) { nlme_start_router_conf_t *pmsg; pmsg = (nlme_start_router_conf_t *) m; usr_nlme_start_router_conf(pmsg->status); } /** * @brief wrapper function for messages of type nlme_sync_conf_t * * (function is autogenerated by Tools/msgtypes2cbfunction.py) * * @param m pointer to message structure * @return None */ void nlme_sync_conf(uint8_t * m) { nlme_sync_conf_t *pmsg; pmsg = (nlme_sync_conf_t *) m; usr_nlme_sync_conf(pmsg->status); } #endif /* EOF */