summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/ZDO/include/private/zdoTcKeepAlive.h
blob: 57e3f13d03f1b472052643c390120c4c5686ea8d (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
/************************************************************************//**
  \file zdoTcKeepAlive.h

  \brief
    The TC keep-alive mechanism interface.

  \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:
    20.01.10 A. Taradov - Created.
******************************************************************************/
#ifndef _ZDO_TC_KEEP_ALIVE_H
#define _ZDO_TC_KEEP_ALIVE_H

#ifdef _TC_SWAPOUT_

/******************************************************************************
                   Includes section
******************************************************************************/
#include <zdo.h>
#include <zcl.h>

/******************************************************************************
                        Types section
******************************************************************************/
typedef enum _ZdoKeepAliveState_t
{
  ZDO_TC_KEEP_ALIVE_STARTED_STATE,
  ZDO_TC_KEEP_ALIVE_STOPPED_STATE,
} ZdoTcKeepAliveState_t;

typedef enum _ZdoKeepAliveReqState_t
{
  ZDO_TC_KEEP_ALIVE_REQ_FREE_STATE,
  ZDO_TC_KEEP_ALIVE_REQ_BUSY_STATE,
} ZdoTcKeepAliveReqState_t;

typedef struct _ZdoTcKeepAlive_t
{
  ZdoTcKeepAliveState_t    state;
  ZdoTcKeepAliveReqState_t reqState;
  ZCL_Request_t            req;
  HAL_AppTimer_t           timer;
  uint8_t                  pingsFailed;
  Endpoint_t               localEndpoint;
  Endpoint_t               remoteEndpoint;
} ZdoTcKeepAlive_t;

/******************************************************************************
                        Prototypes section
******************************************************************************/

/******************************************************************************
  Reset TC keep-alive module
  Parameters:
    none
  Return:
    none
******************************************************************************/
void zdoTcKeepAliveReset(void);

#endif // _TC_SWAPOUT_

#endif // _ZDO_TC_KEEP_ALIVE_H

// eof zdoTcKeepAlive.h