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 --- .../Components/NWK/include/private/nwkDataReq.h | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkDataReq.h (limited to 'digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkDataReq.h') diff --git a/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkDataReq.h b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkDataReq.h new file mode 100644 index 00000000..e0fe02a7 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkDataReq.h @@ -0,0 +1,92 @@ +/**************************************************************************//** + \file nwkDataReq.h + + \brief Interface of the data request component. + + \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-08-29 M. Gekk - Created. + Last change: + $Id: nwkDataReq.h 17448 2011-06-09 13:53:59Z ataradov $ + ******************************************************************************/ +#if !defined _NWK_DATA_REQ_H +#define _NWK_DATA_REQ_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include +#include +#include +#include + +/****************************************************************************** + Define(s) section + ******************************************************************************/ +/** Transmission parameters of data packets. */ +#define NWK_UNICAST_DATA_TX_PARAMETERS \ + {NWK_TX_DELAY_UNICAST_DATA, NULL, nwkConfirmDataTx, false} +#define NWK_BROADCAST_DATA_TX_PARAMETERS \ + {NWK_TX_DELAY_BROADCAST, NULL, nwkConfirmDataTx, false} +#define NWK_MULTICAST_MEMBER_TX_PARAMETERS \ + {NWK_TX_DELAY_INITIAL_MULTICAST, NULL, nwkConfirmDataTx, false} + +/****************************************************************************** + Types section + ******************************************************************************/ +/** Internal states of data confirmation. */ +typedef enum _NwkDataConfState_t +{ + NWK_DATA_CONF_IDLE_STATE = 0x41, + NWK_DATA_CONF_FIRST_STATE = 0x03, + NWK_DATA_CONF_PROCESS_STATE = NWK_DATA_CONF_FIRST_STATE, + NWK_DATA_CONF_LAST_STATE +} NwkDataConfState_t; + +/** Internal variables of this component. */ +typedef struct _NwkDataConf_t +{ + QueueDescriptor_t queue; + NwkDataConfState_t state; +} NwkDataConf_t; + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +/**************************************************************************//** + \brief Reset the data request component. + ******************************************************************************/ +NWK_PRIVATE void nwkResetDataConf(void); + +/**************************************************************************//** + \brief Main task handler of the data request component. + ******************************************************************************/ +NWK_PRIVATE void nwkDataConfTaskHandler(void); + +/**************************************************************************//** + \brief Confirmation of data transmission. + + \param[in] outPkt - pointer to output packet. + \param[in] status - network status of data transmission. + \return None. + ******************************************************************************/ +NWK_PRIVATE void nwkConfirmDataTx(NwkOutputPacket_t *const outPkt, + const NWK_Status_t status); + +/****************************************************************************** + \brief nwkDataReq idle checking. + + \return true, if nwkDataReq performs no activity, false - otherwise. + ******************************************************************************/ +NWK_PRIVATE bool nwkDataReqIsIdle(void); + +#endif /* _NWK_DATA_REQ_H */ +/** eof nwkDataReq.h */ + -- cgit v1.2.3