From b24866225a6301d3a663f874725e83c012dc25d3 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 26 Dec 2012 17:36:00 +0100 Subject: digital/beacon: add bitcloud stack into common directory digital/zigbit --- .../Components/MAC_PHY/include/macDisassociate.h | 129 +++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macDisassociate.h (limited to 'digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macDisassociate.h') diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macDisassociate.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macDisassociate.h new file mode 100644 index 00000000..81e22edf --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macDisassociate.h @@ -0,0 +1,129 @@ +/**************************************************************************//** + \file macDisassociate.h + + \brief Types', constants' and functions' declarations for IEEE 802.15.4-2006 + disassociation primitives. + + \author + Atmel Corporation: http://www.atmel.com \n + Support email: avr@atmel.com + + Copyright (c) 2008-2011, Atmel Corporation. All rights reserved. + Licensed under Atmel's Limited License Agreement (BitCloudTM). + + \internal + History: + 18/06/07 ALuzhetsky - Created. +******************************************************************************/ + +#ifndef _MACDISASSOCIATE_H +#define _MACDISASSOCIATE_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include + +/****************************************************************************** + Defines section +******************************************************************************/ + + +/****************************************************************************** + Types section +******************************************************************************/ +/**************************************************************************//** + \brief Disassociation possible reasons. + + IEEE 802.15.4-2006 7.3.3.2 Disassociation Reason field. +******************************************************************************/ +typedef enum +{ + MAC_COORDINATOR_WISHES_DEVICE_LEAVE_PAN_REASON = 0x01, + MAC_DEVICE_WISHES_LEAVE_PAN_REASON = 0x02, +} MAC_DeassociateReason_t; + +/**************************************************************************//** + \brief MLME-DISASSOCIATE confirm primitive's parameters structure declaration. + + IEEE 802.15.4-2006 7.1.4.3 MLME-DISASSOCIATE.confirm. +******************************************************************************/ +typedef struct +{ + //! The status of the disassociation attempt. + MAC_Status_t status; + //! The addressing mode of the device that has either requested + //! disassociation or been instructed to disassociate by its coordinator. + MAC_AddrMode_t deviceAddrMode; + //! The PAN identifier of the device that has either requested disassociation or + //! been instructed to disassociate by its coordinator. + PanId_t devicePanId; + //! The address of the device that has either requested disassociation or + //! been instructed to disassociate by its coordinator. + MAC_Addr_t deviceAddr; +} MAC_DisassociateConf_t; + +/**************************************************************************//** + \brief MLME-DISASSOCIATE request primitive's parameters structure declaration. + + IEEE 802.15.4-2006 7.1.4.3 MLME-DISASSOCIATE.confirm. +******************************************************************************/ +typedef struct +{ + //! Service field - for internal needs. + MAC_ServiceTransaction_t service; + //! The addressing mode of the device to which to send the disassociation + //! notification command. + MAC_AddrMode_t deviceAddrMode; + //! The PAN identifier of the device to which to send the disassociation + //! notification command. + PanId_t devicePanId; + //! The address of the device to which to send the disassociation notification command. + MAC_Addr_t deviceAddr; + //! The reason for the disassociation. + MAC_DeassociateReason_t reason; + //! TRUE if the disassociation notification command is to be sent indirectly. + bool txIndirect; + //! MLME-DISASSOCIATE confirm callback fubction's pointer. + void (*MAC_DisassociateConf)(MAC_DisassociateConf_t *conf); + //! MLME-DISASSOCIATE confirm parameters' structure. + MAC_DisassociateConf_t confirm; +} MAC_DisassociateReq_t; + +/*************************************************************************//** + \brief MLME-DISASSOCIATE indication primitive's parameters. + + IEEE 802.15.4-2006 7.1.4.2 MLME-DISASSOCIATE.indication. +*****************************************************************************/ +typedef struct +{ + //! The address of the device requesting disassociation. + ExtAddr_t extAddr; + //! The reason for the disassociation. + MAC_DeassociateReason_t reason; +} MAC_DisassociateInd_t; + + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief MLME-DISASSOCIATE request primitive's prototype. + + \param reqParams - MLME-DISASSOCIATE request parameters' structure pointer. + \return none. +******************************************************************************/ +void MAC_DisassociateReq(MAC_DisassociateReq_t *reqParams); + +/**************************************************************************//** + \brief MLME-DISASSOCIATE indication primitive's prototype. + + \param indParams - MLME-DISASSOCIATE indication parameters' structure pointer. + \return none. +******************************************************************************/ +extern void MAC_DisassociateInd(MAC_DisassociateInd_t *indParams); + +#endif /* _MACDISASSOCIATE_H */ + +// eof macDisassociate.h -- cgit v1.2.3