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 --- .../NWK/include/private/nwkConcentrator.h | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkConcentrator.h (limited to 'digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkConcentrator.h') diff --git a/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkConcentrator.h b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkConcentrator.h new file mode 100644 index 00000000..65e5a4a0 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkConcentrator.h @@ -0,0 +1,83 @@ +/**************************************************************************//** + \file nwkConcentrator.h + + \brief Interface of network concentrator. + + \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: + 2009-09-14 Max Gekk - Created. + Last change: + $Id: nwkConcentrator.h 17448 2011-06-09 13:53:59Z ataradov $ + ******************************************************************************/ +#if !defined _NWK_CONCENTRATOR_H +#define _NWK_CONCENTRATOR_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include +#include +#include + +/****************************************************************************** + Types section + ******************************************************************************/ +/** Internal states of the network concentrator. */ +typedef enum _NwkConcentratorState_t +{ + NWK_CONCENTRATOR_IDLE_STATE = 0x89, + NWK_CONCENTRATOR_FIRST_STATE = 0x8A, + NWK_CONCENTRATOR_START_TIMER_STATE = NWK_CONCENTRATOR_FIRST_STATE, + NWK_CONCENTRATOR_ROUTE_DISCOVERY_STATE = 0x8B, + NWK_CONCENTRATOR_LAST_STATE +} NwkConcentratorState_t; + +/** State and parameters of the network concentrator. */ +typedef struct _NwkConcentrator_t +{ + NwkConcentratorState_t state; + union + { + HAL_AppTimer_t timer; + NWK_RouteDiscoveryReq_t routeDiscovery; + } req; +} NwkConcentrator_t; + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +#if defined _NWK_CONCENTRATOR_ +/**************************************************************************//** + \brief Start the network concentrator. + + Periodic sending of route discovery commands. + ******************************************************************************/ +NWK_PRIVATE void nwkStartConcentrator(void); + +/**************************************************************************//** + \brief nwkReset module call this function when network layer is reseting. + ******************************************************************************/ +NWK_PRIVATE void nwkResetConcentrator(void); + +/**************************************************************************//** + \brief Check state of the concentrator and stop timer. + ******************************************************************************/ +NWK_PRIVATE void nwkStopConcentratorTimer(void); + +#else /* _NWK_CONCENTRATOR_ */ + +#define nwkStartConcentrator() (void)0 +#define nwkStopConcentratorTimer() (void)0 +#define nwkResetConcentrator() (void)0 + +#endif /* _NWK_CONCENTRATOR_ */ +#endif /* _NWK_CONCENTRATOR_H */ +/** eof nwkConcentrator.h */ + -- cgit v1.2.3