summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macStart.h
blob: 62abc6eafa5512c6e1ecfcfd4314322e1d748ab5 (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
/**************************************************************************//**
  \file macStart.h
  
  \brief Types', constants' and functions' declarations for IEEE 802.15.4-2006 
    start 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 _MACSTART_H
#define _MACSTART_H

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

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

/******************************************************************************
                        Types section
******************************************************************************/
/**
 * \brief MLME-START confirm primitive's parameters structure declaration.
 * IEEE 802.15.4-2006 7.1.14.2 MLME-START.confirm.
 */
typedef struct 
{
  //! The result of the attempt to start using an updated superframe configuration.
  MAC_Status_t status;
}  MAC_StartConf_t;

/**
 * \brief MLME-START request primitive's parameters structure declaration.
 * IEEE 802.15.4-2006 7.1.14.1 MLME-START.request.
 */
typedef struct 
{
  //! Service field - for internal needs.
  MAC_Service_t service;
  //! The PAN identifier to be used by the device.
  PanId_t       panId;
  //! The logical channel on which to start using the new configuration.
  uint8_t       channel;
  //! The channel page on which to begin using the new configuration.
  uint8_t       page;
  // NOT used - superframe functionality is not implemented.
  //uint8_t     beaconOrder;
  // NOT used - superframe functionality is not implemented.
  //uint8_t     superframeOrder;
  //! If this value is TRUE, the device will become the PAN coordinator of a new PAN.
  bool          panCoordinator;
  // NOT used - superframe functionality is not implemented.
  //bool        batteryLifeExt;
  //! TRUE if a coordinator realignment command is to be transmitted prior to
  //! changing the superframe configuration or FALSE otherwise. TBD.
  bool          coordRealignment;
  //! MLME-START confirm callback fubction's pointer.
  void (*MAC_StartConf)(MAC_StartConf_t *conf);
  //! MLME-START confirm parameters' structure.
  MAC_StartConf_t confirm;
}  MAC_StartReq_t;


/******************************************************************************
                        Prototypes section
******************************************************************************/
/**************************************************************************//**
  \brief MLME-START request primitive's prototype.
  \param reqParams - MLME-START request parameters' structure pointer.
  \return none.
******************************************************************************/
void MAC_StartReq(MAC_StartReq_t *reqParams);

#endif /* _MACSTART_H */

// eof macStart.h