summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macOrphan.h
blob: a4dfa05b77e508e33be9d222083b0f48c911d0d7 (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
/**************************************************************************//**
  \file macOrphan.h
  
  \brief Types', constants' and functions' declarations for IEEE 802.15.4-2006 
    orphan 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 _MACORPHAN_H
#define _MACORPHAN_H

/******************************************************************************
                        Includes section.
******************************************************************************/
#include <macAddr.h>
#include <macCommon.h>
#include <macCommStatus.h>

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

/******************************************************************************
                        Types section.
******************************************************************************/
//! MLME-ORPHAN indication primitive's parameters. IEEE 802.15.4-2006 7.1.8.1
typedef struct
{
  //! The address of the orphaned device.
  ExtAddr_t extAddr;
}  MAC_OrphanInd_t;

//! MLME-ORPHAN response pritive's parameters. IEEE 802.15.4-2006 7.1.8.2
typedef struct
{
  //! Service field - for internal needs.
  MAC_Service_t service;
  //! The address of the orphaned device.
  ExtAddr_t     extAddr;
  //! The 16-bit short address allocated to the orphaned device if it is
  //! associated with this coordinator.
  ShortAddr_t   shortAddr;
  //! TRUE if the orphaned device is associated with this coordinator or FALSE otherwise.
  bool          associate;
  //! MLME-ORPHAN response callback function pointer.
  void (*MAC_CommStatusInd)(MAC_CommStatusInd_t *commStat);
  // MLME-COMM_STATUS parameters' structure.
  MAC_CommStatusInd_t commStatus;
}  MAC_OrphanResp_t;


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

/**************************************************************************//**
  \brief  MLME-ORPHAN response primitive's prototype.
  \param respParams - MLME-ORPHAN response parameters' structure pointer.
  \return none.
******************************************************************************/
void MAC_OrphanResp(MAC_OrphanResp_t *respParams);

#endif // _MACORPHAN_H

// eof macOrphan.h