summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkSilentJoin.h
diff options
context:
space:
mode:
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkSilentJoin.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkSilentJoin.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkSilentJoin.h b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkSilentJoin.h
new file mode 100644
index 00000000..430dc08d
--- /dev/null
+++ b/digital/zigbit/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 <nwkConfig.h>
+#include <queue.h>
+#include <nlmeJoin.h>
+#include <macSetGet.h>
+#include <macRxEnable.h>
+
+/******************************************************************************
+ 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 */
+