summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkStartRouter.h
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-26 17:36:00 +0100
committerFlorent Duchon2013-02-13 21:21:12 +0100
commitb24866225a6301d3a663f874725e83c012dc25d3 (patch)
treeca527a2aab9abcdfbaf244c53ca63f0c531892b0 /digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkStartRouter.h
parent2ba279f4eb2f23fa08a7c13465d16ae6ba5d0f96 (diff)
digital/beacon: add bitcloud stack into common directory digital/zigbit
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkStartRouter.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkStartRouter.h89
1 files changed, 89 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkStartRouter.h b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkStartRouter.h
new file mode 100644
index 00000000..cb1f3fe9
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkStartRouter.h
@@ -0,0 +1,89 @@
+/**************************************************************************//**
+ \file nwkStartRouter.h
+
+ \brief Start router header file.
+
+ \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-27 V. Panov - Created.
+ 2008-12-10 M. Gekk - Reduction of usage of the RAM at separate compiling.
+ 2009-03-19 M. Gekk - Refactoring.
+ Last change:
+ $Id: nwkStartRouter.h 17448 2011-06-09 13:53:59Z ataradov $
+ ******************************************************************************/
+#if !defined _NWK_START_ROUTER_H
+#define _NWK_START_ROUTER_H
+
+/******************************************************************************
+ Includes section
+ ******************************************************************************/
+#include <nwkConfig.h>
+#include <queue.h>
+
+/******************************************************************************
+ Types section
+ ******************************************************************************/
+/** Internal states of NLME-START-ROUTER component */
+typedef enum _NwkStartRouterState_t
+{
+ NWK_START_ROUTER_IDLE_STATE = 0x9A,
+ NWK_START_ROUTER_FIRST_STATE = 0x45,
+ NWK_START_ROUTER_BEGIN_STATE = NWK_START_ROUTER_FIRST_STATE,
+ NWK_START_ROUTER_MAC_REQ_STATE = 0x46,
+ NWK_START_ROUTER_CONFIRM_STATE = 0x47,
+ NWK_START_ROUTER_LAST_STATE
+} NwkStartRouterState_t;
+
+/** Internal parameters of NLME-START-ROUTER */
+typedef struct _NwkStartRouter_t
+{
+ NwkStartRouterState_t state; /**< Finite-state machine */
+ QueueDescriptor_t queue; /**< Queue of requests from upper layer */
+ bool coordRealignment;
+} NwkStartRouter_t;
+
+/******************************************************************************
+ Prototypes section
+ ******************************************************************************/
+#if defined _ROUTER_
+/**************************************************************************//**
+ \brief Main task handler of NLME-START-ROUTER component
+ ******************************************************************************/
+NWK_PRIVATE void nwkStartRouterTaskHandler(void);
+
+/**************************************************************************//**
+ \brief Reset NLME-START-ROUTER component.
+ ******************************************************************************/
+NWK_PRIVATE void nwkResetStartRouter(void);
+
+/******************************************************************************
+ \brief nwkStartRouter idle checking.
+
+ \return true, if nwkStartRouter performs no activity, false - otherwise.
+ ******************************************************************************/
+NWK_PRIVATE bool nwkStartRouterIsIdle(void);
+
+#if defined NWK_COORD_REALIGNMENT
+/**************************************************************************//**
+ \brief Is network configuration realignment allowed or not?
+ ******************************************************************************/
+NWK_PRIVATE bool nwkRealignmentIsAllowed(void);
+#endif /* NWK_COORD_REALIGNMENT */
+
+#else /* _ROUTER_ */
+
+#define nwkStartRouterTaskHandler NULL
+#define nwkStartRouterIsIdle NULL
+#define nwkResetStartRouter() (void)0
+
+#endif /* _ROUTER_ */
+#endif /* _NWKSTARTROUTER_H */
+/** eof nwkStartRouter.h */
+