summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macSync.h
blob: a91a4fed7446ea57c6d8f78e33c0286dfa0ebbd8 (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
/**************************************************************************//**
  \file macSync.h

  \brief Types', constants' and functions' declarations for IEEE 802.15.4-2006
    sync primitives.

  \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:
      18/06/07 ALuzhetsky - Created.
******************************************************************************/

#ifndef _MACSYNC_H
#define _MACSYNC_H

/******************************************************************************
                        Includes section
******************************************************************************/

/******************************************************************************
                        Defines section
******************************************************************************/

/******************************************************************************
                        Types section
******************************************************************************/
//! Set of loss indication reasons. IEEE 802.15.4-2006 Table 75.
typedef enum
{
  MAC_PAN_ID_CONFLICT = 0,
  MAC_REALIGNMENT     = 1,
  MAC_BEACON_LOSS     = 2
} MAC_SyncLossReason_t;

//! MLME-SYNC_LOSS indication structure. IEEE 802.15.4-2006 7.1.15.2
typedef struct
{
  //! The reason that synchronization was lost.
  MAC_SyncLossReason_t reason;
  //! The PAN identifier with which the device lost synchronization or to which
  //! it was realigned.
  PanId_t              panId;
  //! The logical channel on which the device lost synchronization or to which it
  //! was realigned.
  uint8_t              logicalChannel;
  //! The channel page on which the device lost synchronization or to which it
  //! was realigned.
  uint8_t              channelPage;
}  MAC_SyncLossInd_t;


/******************************************************************************
                        Prototypes section
******************************************************************************/
/**************************************************************************//**
  \brief MLME-SYNC_LOSS indication primitive's prototype.
  \param indParams - MLME-SYNC_LOSS indication parameters' structure pointer.
  \return none.
******************************************************************************/
extern void MAC_SyncLossInd(MAC_SyncLossInd_t *indParams);

#endif /* _MACSYNC_H */

// eof macSync.h