summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkRx.h
blob: 5366119fe73e8e69cc65eb2af5535dcce21c401b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/**************************************************************************//**
  \file nwkRx.h

  \brief Functions of processing of input data

  \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-14 V. Panov - Created.
    2008-11-25 M. Gekk  - Counters of buffers have been remote.
    2008-12-10 M. Gekk  - Memory optimization.
    2009-07-08 M. Gekk  - Redesign.
   Last change:
    $Id: nwkRx.h 18298 2011-08-19 12:42:09Z mgekk $
 ******************************************************************************/
#if !defined _NWK_RX_H
#define _NWK_RX_H

/******************************************************************************
                               Includes section
 ******************************************************************************/
#include <nwkConfig.h>
#include <nwkCommon.h>
#include <nwkSystem.h>
#include <nwkFrame.h>
#include <nldeData.h>
#include <nwkTx.h>
#if defined _SECURITY_
#include <sspSfp.h>
#endif /* _SECURITY_ */

/******************************************************************************
                              Definition section
 ******************************************************************************/
#define NWK_UNICAST_COMMAND_TRANSIT_TX_PARAMETERS \
  {NWK_TX_DELAY_UNICAST_COMMAND, NULL, NULL, true}
#define NWK_UNICAST_DATA_TRANSIT_TX_PARAMETERS \
  {NWK_TX_DELAY_TRANSIT_DATA, NULL, NULL, true}
#define NWK_BROADCAST_TRANSIT_TX_PARAMETERS \
  {NWK_TX_DELAY_BROADCAST, NULL, NULL, true}
#define NWK_MULTICAST_MEMBER_TRANSIT_TX_PARAMETERS \
  {NWK_TX_DELAY_MULTICAST, NULL, NULL, true}

/******************************************************************************
                                 Types section
 ******************************************************************************/
/** Input packet meta information. */
typedef struct _NwkInputPacket_t
{
  bool retransmit      : 1;
  bool decryptRequired : 1;
  bool indicate        : 1;
  NwkBitField_t txId   : 5;
  uint8_t *data;
  NwkLength_t length;
  NwkParseHeader_t parsedHeader;
  union
  {
    NWK_DataInd_t dataInd;
#if defined _SECURITY_
    SSP_DecryptFrameReq_t decryptReq;
#endif /* _SECURITY_ */
  } primitive;
} NwkInputPacket_t;

/******************************************************************************
                             Prototypes section
 ******************************************************************************/
/**************************************************************************//**
  \brief The upper layer has completed data processing.

  \param[in] resp - NLDE-DATA indication primitive's parameters structure.
  \return None.
 ******************************************************************************/
void NWK_DataResp(NWK_DataResp_t *resp);

#endif /* _NWK_RX_H */
/** eof nwkRx.h */