summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/NWK/include/private/nwkManyToOne.h
blob: 7eaf3dbc9e609e2c846a6778146a80d7f8a437ba (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
/**************************************************************************//**
  \file nwkManyToOne.h

  \brief Internal interface of the many-to-one 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:
    2010-05-13 M. Gekk - Created.
   Last change:
    $Id: nwkManyToOne.h 17448 2011-06-09 13:53:59Z ataradov $
 ******************************************************************************/
#if !defined _NWK_MANY_TO_ONE_H
#define _NWK_MANY_TO_ONE_H

/******************************************************************************
                               Includes section
 ******************************************************************************/
#include <nwkConfig.h>
#include <nwkRoutingTable.h>
#include <queue.h>

/******************************************************************************
                                Types section
 ******************************************************************************/
/* Internal variables of the many-to-one component. */
typedef struct _NwkManyToOne_t
{
  QueueDescriptor_t queue;  /**< Queue of requests from upper layer. */
} NwkManyToOne_t;

/******************************************************************************
                               Prototypes section
 ******************************************************************************/
#if defined NWK_ROUTING_CAPACITY && defined _NWK_MANY_TO_ONE_ROUTING_
/**************************************************************************//**
  \brief Main task handler of the many-to-one component.
 ******************************************************************************/
NWK_PRIVATE void nwkManyToOneTaskHandler(void);

/**************************************************************************//**
  \brief Reset the many-to-one component.
 ******************************************************************************/
NWK_PRIVATE void nwkResetManyToOne(void);

/**************************************************************************//**
  \brief Many-to-one route request from concentrator has been received.

  \param[in] entry - pointer to concentrator entry in the routing table.
  \return None.
 ******************************************************************************/
NWK_PRIVATE void nwkNewConcentratorFound(NwkRoutingTableEntry_t *const entry);

#else

#define nwkManyToOneTaskHandler NULL
#define nwkResetManyToOne() (void)0
#define nwkNewConcentratorFound(entry) (void)0

#endif /* NWK_ROUTING_CAPACITY and _NWK_MANY_TO_ONE_ROUTING_ */
#endif /* _NWK_MANY_TO_ONE_H */
/** eof nwkManyToOne.h */