From a54ad9edce697133a024aff096e50f7e4f389d5b Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Sun, 18 Mar 2012 12:22:02 +0100 Subject: digital/beacon: import Zigbit stack (bitcloud) & avr sources --- .../Components/NWK/include/private/nwkStatusInd.h | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkStatusInd.h (limited to 'digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkStatusInd.h') diff --git a/digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkStatusInd.h b/digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkStatusInd.h new file mode 100644 index 00000000..ee464c82 --- /dev/null +++ b/digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkStatusInd.h @@ -0,0 +1,86 @@ +/**************************************************************************//** + \file nwkStatusInd.h + + \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-06-14 V. Panov - Created + 2009-06-16 M. Gekk - Refactoring. + Last change: + $Id: nwkStatusInd.h 17448 2011-06-09 13:53:59Z ataradov $ + ******************************************************************************/ +#if !defined _NWK_STATUS_IND_H +#define _NWK_STATUS_IND_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include +#include +#include +#include + +/****************************************************************************** + Inline functions section + ******************************************************************************/ +/**************************************************************************//** + \brief Wrapper for NLME-NWK-STATUS indication primitive. + + \param[in] shortAddr - a network address of the device associated with + the status information. + \param[in] status - error code associated with the status indication. + \return None. + ******************************************************************************/ +INLINE void nwkStatusIndicate(const ShortAddr_t shortAddr, + const NWK_StatusIndErrorCodes_t status) +{ + NWK_NwkStatusInd_t ind; + + ind.shortAddress = shortAddr; + ind.status = status; + NWK_NwkStatusInd(&ind); +} + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +#if defined(_ROUTER_) || defined(_COORDINATOR_) +/**************************************************************************//** + \brief NWK status command has been received. + + \param[in] payload - pointer to status code field and destination address. + \param[in] header - NWK header of the network status command. + \param[in] parse - parsed NWK header. + \return 'true' if continue processing of command packet otherwise 'false'. + ******************************************************************************/ +NWK_PRIVATE bool nwkStatusFrameInd(const uint8_t *const payload, + const NwkFrameHeader_t *const header, const NwkParseHeader_t *const parse); + +#else /* _ROUTER_ or _COORDINATOR_ */ +#define nwkStatusFrameInd NULL +#endif /* _ROUTER_ or _COORDINATOR_ */ + +#if defined NWK_ROUTING_CAPACITY && defined _NWK_MANY_TO_ONE_ROUTING_ +/**************************************************************************//** + \brief Is it the input many-to-one network status. + + \param[in] inPkt - pointer to the input packet + + \return 'true' if the input packet is network status command with status code + equal to many-to-one route error otherwise 'false'. + ******************************************************************************/ +NWK_PRIVATE +bool nwkIsManyToOneNetworkStatus(const NwkInputPacket_t *const inPkt); + +#else +#define nwkIsManyToOneNetworkStatus(inPkt) false +#endif /* NWK_ROUTING_CAPACITY and _NWK_MANY_TO_ONE_ROUTING_ */ +#endif /* _NWK_STATUS_IND_H */ +/** eof nwkStatusInd.h */ + -- cgit v1.2.3