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/nwkSilentJoin.h | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkSilentJoin.h (limited to 'digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkSilentJoin.h') diff --git a/digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkSilentJoin.h b/digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkSilentJoin.h new file mode 100644 index 00000000..430dc08d --- /dev/null +++ b/digital/beacon/src/Bitcloud_stack/Components/NWK/include/private/nwkSilentJoin.h @@ -0,0 +1,94 @@ +/*************************************************************************//** + \file nwkSilentJoin.h + + \brief Interface of silent join functionality. + + \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: + 2011-03-17 A. Taradov - Created. + Last change: + $Id: nwkOrphan.h 15388 2011-02-20 23:55:47Z mgekk $ + ******************************************************************************/ +#if !defined _NWK_SILENT_JOIN_H +#define _NWK_SILENT_JOIN_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include +#include +#include +#include +#include + +/****************************************************************************** + Types section + ******************************************************************************/ +typedef enum +{ + NWK_SILENT_JOIN_STATE_MIN = 0x15, + NWK_SILENT_JOIN_STATE_IDLE, + NWK_SILENT_JOIN_STATE_REQUEST_QUEUED, + NWK_SILENT_JOIN_STATE_SET_PARAMS, + NWK_SILENT_JOIN_STATE_MAX +} NwkSilentJoinState_t; + +/** Silent join memory */ +typedef struct _NwkSilentJoin_t +{ + NwkSilentJoinState_t state; + +#if defined _ROUTER_ || defined _ENDDEVICE_ + /** Request queue */ + QueueDescriptor_t queue; +#endif + +#if defined _ROUTER_ || defined _ENDDEVICE_ + /** Memory for mac requests */ + union + { + MAC_SetReq_t set; + MAC_RxEnableReq_t rxEnable; + } req; +#endif +} NwkSilentJoin_t; + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +#if (defined(_ROUTER_) || defined(_ENDDEVICE_)) && defined(_NWK_SILENT_JOIN_) +/**************************************************************************//** + \brief Silent join module reset. + ******************************************************************************/ +NWK_PRIVATE void nwkResetSilentJoin(void); + +/**************************************************************************//** + \brief Main task handler of the silent join module. + ******************************************************************************/ +NWK_PRIVATE void nwkSilentJoinTaskHandler(void); + +/**************************************************************************//** + \brief Process silent join requests. + + \param[in] req - NLME-JOIN request parameters' structure pointer. + \return None. + ******************************************************************************/ +NWK_PRIVATE void nwkSilentJoinReq(NWK_JoinReq_t *req); + +#else + +#define nwkResetSilentJoin() (void)0 +#define nwkSilentJoinTaskHandler NULL + +#endif /* (_ROUTER_ or _ENDDEVICE_) and _NWK_SILENT_JOIN_ */ +#endif /* _NWK_SILENT_JOIN_H */ + +/** eof nwkSilentJoin.h */ + -- cgit v1.2.3