summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/ZCL/include/zclZllScan.h
blob: 9ccd82c9cbc11376647b905ad316944d6239f3b7 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/**************************************************************************//**
  \file zclZllScan.h

  \brief
    ZLL Scan functions 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:
    17.03.10 A. Taradov - Created.
******************************************************************************/
#ifndef _ZCLZLLSCAN_H
#define	_ZCLZLLSCAN_H

/******************************************************************************
                    Includes section
******************************************************************************/
#include <zclZll.h>
#include <zclZllIB.h>
#include <intrpData.h>

/******************************************************************************
                    Definitions section
******************************************************************************/

/******************************************************************************
                    Types section
******************************************************************************/

typedef struct _ZCL_ZllScanDeviceInfo_t
{
  // Device Information Table entry
  uint64_t     ieee;
  uint8_t      ep;
  uint16_t     profileId;
  uint16_t     deviceId;
  uint8_t      version;
  uint8_t      groupIds;
  uint8_t      sort;

  // Common fields
  uint8_t      rssiCorrection;
  ZclZllZigBeeInfo_t zigBeeInfo;
  ZclZllInfo_t zllInfo;
  uint16_t     keyBitMask;
  uint32_t     responseId;
  uint64_t     extPanId;
  uint8_t      nwkUpdateId;
  uint8_t      channel;
  uint16_t     panId;
  uint16_t     networkAddress;
  uint8_t      numberSubDevices;
  uint8_t      totalGroupIds;
  uint64_t     ieeeRelayerScanRequest;
  int8_t       rssi;
} ZCL_ZllScanDeviceInfo_t;

typedef struct _ZCL_ZllScanConf_t
{
  ZCL_ZllScanDeviceInfo_t info;
  ZCL_ZllStatus_t         status;
  bool                    stopScan;
} ZCL_ZllScanConf_t;

typedef struct _ZCL_ZllScanReq_t
{
  ZCL_ZllScanConf_t confirm;
  void (*ZCL_ZllScanConf)(ZCL_ZllScanConf_t *conf);
} ZCL_ZllScanReq_t;

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

/**************************************************************************//**
\brief Reset ZLL Scan.
******************************************************************************/
void ZCL_ZllScanReset(void);

/**************************************************************************//**
\brief ZLL Scan request. Should be called only by end devices.

The function is called on end devices to discover other devices by scanning
supported radio channels. Before calling this function the device should be 
prepared to handle Inter-PAN messages: call the ZCL_ZllInterPanStartReq() 
function first.

The callback function specified in the parameters is called once for
each discovered device.

\param req - request parameters
******************************************************************************/
void ZCL_ZllScanReq(ZCL_ZllScanReq_t *req);

/**************************************************************************//**
\brief INTRP-DATA.indication primitive
\param[in] ind - indication parameters
******************************************************************************/
void ZCL_ZllScanReqDataInd(INTRP_DataInd_t *ind);

#endif // _ZCLZLLSCAN_H

// eof zclZllScan.h