summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_ENV/include/macenvMem.h
blob: fcc8da32f5ab9ac2a75e37df8afc21e6171d4c47 (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
110
111
112
113
114
/**************************************************************************//**
  \file macenvMem.h

  \brief MAC and PHY PIB memory.

  \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:
      23/04/08 A. Mandychev - Created.
******************************************************************************/

#ifndef _MACENVMEM_H
#define _MACENVMEM_H

/******************************************************************************
                    Includes section
******************************************************************************/
#include <types.h>
#include <phy.h>
#include <macAddr.h>

/******************************************************************************
                    Define(s) section
******************************************************************************/

/******************************************************************************
                    Types section
******************************************************************************/
//! PHY PIB attributes.
typedef struct
{
  uint8_t         channel;
  uint32_t        channelsSupported; // Just one row for current page.
  int8_t          transmitPower;
  PHY_CcaMode_t   ccaMode;
  uint8_t         currentPage;
  uint16_t        maxFrameDuration;
  uint8_t         shrDuration;
  uint8_t         symbolsPerOctet;
} PhyPibAttr_t;

//! MAC PIB attributes.
typedef struct
{
  uint32_t        ackWaitDuration;
  bool            associatedPanCoord;
#ifdef _FFD_
  bool            associationPermit;
#endif // _FFD_
  bool            autoRequest;
  //bool          battLifeExt;
  //uint8_t       battLifeExtPeriods;
#ifdef _FFD_
  uint8_t         *beaconPayload;
  uint8_t         beaconPayloadLength;
  //uint8_t       beaconOrder;
  //uint32_t      beaconTxTime;
  uint8_t         bsn;
#endif // _FFD_
  ExtAddr_t       coordExtAddr;
  ShortAddr_t     coordShortAddr;
  uint8_t         dsn;
  //bool          gtsPermit;
  uint8_t         maxBe;
  uint8_t         maxCsmaBackoffs;
  //uint8_t       maxFrameTotalWaitTime;
  uint8_t         maxFrameRetries;
  uint8_t         minBe;
  //uint8_t       minLifsPeriod;
  //uint8_t       minSifsPeriod;
  PanId_t         panId;
#ifdef _FFD_
  //bool          promiscuousMode;
#endif // _FFD_
  uint8_t         responseWaitTime;
  bool            rxOnWhenIdle;
  bool            securityEnabled;
  ShortAddr_t     shortAddr;
#ifdef _FFD_
  //uint8_t       superframeOrder;
  //uint8_t       syncSymbolOffset;
#endif // _FFD_
  //bool          timestampSupported;
#ifdef _FFD_
  //uint16_t        transactionPersistenceTime;
#endif // _FFD_
  /************************************************************/
  // Additional attributes. NOT described in the standard.
  ExtAddr_t       extAddr;  // Device own extended address.
  bool            panCoordinator;
  // For PanServer needs.
#ifdef _FFD_
  bool            beaconTxEnable;
#endif //_FFD_
/** Duration in milliseconds of maximum length frame transferring. */
  uint8_t         maxFrameTransmissionTime;
} MacPibAttr_t;

//! MAC and PHY PIB attributes.
typedef struct
{
  MacPibAttr_t macAttr;
  PhyPibAttr_t phyAttr;
} PIB_t;

#endif /*_MACENVMEM_H*/

// eof macphyPibMem.h