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/nwkRouteDiscovery.h | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkRouteDiscovery.h (limited to 'digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkRouteDiscovery.h') diff --git a/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkRouteDiscovery.h b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkRouteDiscovery.h new file mode 100644 index 00000000..996edcff --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkRouteDiscovery.h @@ -0,0 +1,91 @@ +/**************************************************************************//** + \file nwkRouteDiscovery.h + + \brief Network route discovery 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-09-05 V. Panov - Created. + 2008-09-06 M. Gekk - Modified to support parallel processing. + 2010-02-06 M. Gekk - Refactoring. + Last change: + $Id: nwkRouteDiscovery.h 17448 2011-06-09 13:53:59Z ataradov $ + ******************************************************************************/ +#if !defined _NWK_ROUTE_DISCOVERY_H +#define _NWK_ROUTE_DISCOVERY_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include +#include +#include +#include + +/****************************************************************************** + Types section + ******************************************************************************/ +/** Internal states of the route discovery component. */ +typedef enum _NwkRouteDiscoveryState_t +{ + NWK_ROUTE_DISCOVERY_IDLE_STATE = 0x99, + NWK_ROUTE_DISCOVERY_PROCESS_STATE = 0x38 +} NwkRouteDiscoveryState_t; + +/** Internal state and variables of route discovery component. */ +typedef struct _NwkRouteDiscovery_t +{ + QueueDescriptor_t queue; /**< Queue of requests from other components. */ + /** Identifier of initial route request. */ + NwkRouteRequestId_t routeRequestId; +#if defined _SYS_ASSERT_ON_ + /** Finite-state machine. */ + NwkRouteDiscoveryState_t state; +#endif /* _SYS_ASSERT_ON_ */ +} NwkRouteDiscovery_t; + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +#if defined NWK_ROUTING_CAPACITY \ + && (defined _NWK_MESH_ROUTING_ || defined _NWK_CONCENTRATOR_) +/**************************************************************************//** + \brief Task handler of the route discovery component. + ******************************************************************************/ +NWK_PRIVATE void nwkRouteDiscoveryTaskHandler(void); + +/****************************************************************************** + \brief Reset the route discovery component. + ******************************************************************************/ +NWK_PRIVATE void nwkResetRouteDiscovery(void); + +/****************************************************************************** + \brief Flush all route discovery requests. + ******************************************************************************/ +NWK_PRIVATE void nwkFlushRouteDiscovery(void); + +/****************************************************************************** + \brief nwkRouteDiscovery idle checking. + + \return true, if nwkRouteDiscovery performs no activity, false - otherwise. + ******************************************************************************/ +NWK_PRIVATE bool nwkRouteDiscoveryIsIdle(void); + +#else /* no NWK_ROUTING_CAPACITY */ + +#define nwkRouteDiscoveryTaskHandler NULL +#define nwkRouteDiscoveryIsIdle NULL +#define nwkResetRouteDiscovery() (void)0 +#define nwkFlushRouteDiscovery() (void)0 + +#endif /* NWK_ROUTING_CAPACITY and (_NWK_MESH_ROUTING_ or _NWK_CONCENTRATOR_) */ +#endif /* _NWK_ROUTE_DISCOVERY_H */ +/** eof nwkRouteDiscovery.h */ + -- cgit v1.2.3