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 --- .../stack/Components/NWK/include/private/nwkBTT.h | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkBTT.h (limited to 'digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkBTT.h') diff --git a/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkBTT.h b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkBTT.h new file mode 100644 index 00000000..881b5576 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkBTT.h @@ -0,0 +1,86 @@ +/**************************************************************************//** + \file nwkBTT.h + + \brief Broadcast transaction table. + + \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: + 2007-09-01 V. Panov - Created. + 2008-11-17 M. Gekk - Correct clearing of record in BTT. In case of overflow + of the table function nwkCheckBTT returns an error. + BTT moved in ConfigServer. + 2009-04-29 M. Gekk - Refactoring. + 2009-11-24 Igor Vagulin - reimplemented using sysDuplicateTable. + Last change: + $Id: nwkBTT.h 17946 2011-07-13 09:26:59Z mgekk $ + ******************************************************************************/ +#if !defined _NWK_BTT_H +#define _NWK_BTT_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include +#include +#include + +/****************************************************************************** + Types section + ******************************************************************************/ +/** Broadcast transaction table */ +typedef struct _NwkBTT_t +{ + /** Pointer to BTT sysDuplicateTable descriptor */ + SYS_DuplicateTable_t btt; +} NwkBTT_t; + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +/**************************************************************************//** + \brief Reseting of the broadcast transaction table. + ******************************************************************************/ +NWK_PRIVATE void nwkResetBTT(void); + +/**************************************************************************//** + \brief Check entry for short address and sequence number. + + \param[in] shortAddr - source address of broadcast packet. + \param[in] sequenceNumber - a sequence number of broadcast packet. + ******************************************************************************/ +NWK_PRIVATE SysDuplicateTableAnswer_t nwkCheckBTT(const ShortAddr_t shortAddr, + const uint8_t sequenceNumber); + +/**************************************************************************//** + \brief Clear the existing entry in the broadcast transaction table. + + \param[in] shortAddr - a short address of broadcast packet, + \param[in] sequenceNumber - a sequence number of broadcast packet. + + \return None. + ******************************************************************************/ +NWK_PRIVATE void nwkClearBTR(const ShortAddr_t shortAddr, + const uint8_t sequenceNumber); + +/**************************************************************************//** + \brief Add new BTR to BTT with own address and given sequence number + + \param[in] sequenceNumber - a sequence number of broadcast packet. + \return None. + ******************************************************************************/ +#if !defined NWK_ALWAYS_REJECT_OWN_BROADCAST +NWK_PRIVATE void nwkAddOwnBTR(const uint8_t sequenceNumber); + +#else +#define nwkAddOwnBTR(sequenceNumber) (void)0 +#endif /* NWK_ALWAYS_REJECT_OWN_BROADCAST */ +#endif /* _NWK_BTT_H */ +/** eof nwkBTT.h */ + -- cgit v1.2.3