summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/ConfigServer/include/private/csSIB.h
blob: 618959c337f874d21b35604e868207f3799d6fc7 (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/******************************************************************************
  \file csSIB.h

  \brief
    BitCloud stack information base

  \author
    Atmel Corporation: http://www.atmel.com \n
    Support email: avr@atmel.com

  Copyright (c) 2010 , Atmel Corporation. All rights reserved.
  Licensed under Atmel's Limited License Agreement (BitCloudTM).

  \internal
    History:
    21.10.10 A. Razinkov - Created.
******************************************************************************/

#ifndef _CSSIB_H_
#define _CSSIB_H_

/******************************************************************************
                    Includes section
******************************************************************************/
#include <types.h>
#include <csDefaults.h>
#ifdef _MAC_BAN_NODE_
  #include <macBanNode.h>
#endif /* _MAC_BAN_NODE_ */
#ifndef _MAC2_
  #include <apsConfigServer.h>
  #include <nwkConfigServer.h>
#endif

/******************************************************************************
                    Types section
******************************************************************************/
/**//**
 * \brief Config Server parameter handler
 */
typedef struct _CS_MemoryItem_t
{
  union
  {
    const void FLASH_PTR* flashValue;
    void* ramValue;
  } value;
  uint16_t size;
} CS_MemoryItem_t;

/**//**
 * \brief Read-only parametres, stored in FLASH
 */
typedef struct _CS_ReadOnlyItems_t
{
  /* MAC parameters */
  uint16_t csMacFrameRxBufferSize;
#ifdef _MAC_BAN_NODE_
  MAC_BanTableSize_t csMacBanTableSize;
#endif /* _MAC_BAN_NODE_ */

  /* NWK parameters */
#ifndef _MAC2_
  NwkRouteCacheSize_t csNwkRouteCacheSize;
  NwkSizeOfNeighborTable_t csNeibTableSize;
  NwkSizeOfAddressMap_t csAddressMapTableSize;
#endif
  uint8_t csMacPanDescriptorAmount;
  uint8_t csMaxChildrenAmount;
  uint8_t csMaxChildrenRouterAmount;
  uint8_t csMaxNetworkDepth;
  uint8_t csAddressAssignmentMethod;
  uint8_t csNwkBuffersAmount;
  uint8_t csJoinIndObjAmount;
  uint8_t csRouteTableSize;
  uint8_t csRouteDiscoveryTableSize;
  uint8_t csNwkBttSize;
#ifdef _GROUP_TABLE_
  uint8_t csGroupTableSize;
#endif /* _GROUP_TABLE_ */
#ifdef _NWK_PASSIVE_ACK_
  uint8_t csPassiveAckAmount;
#endif /* _NWK_PASSIVE_ACK_ */

  /* APS parameters */
  uint8_t  csApsDataReqBuffersAmount;
  uint8_t  csApsAckFrameBuffesAmount;
  uint8_t  csDuplicateRejectionTableSize;
#ifdef _BINDING_
  uint8_t  csApsBindingTableSize;
#endif /* _BINDING_ */
#ifdef _APS_FRAGMENTATION_
  uint8_t  csApsMaxBlocksAmount;
  uint16_t csApsBlockSize;
#endif /* _APS_FRAGMENTATION_ */

  /* ZCL parameters */
#ifdef _ZCL_
  uint8_t csZclMemoryBuffersAmount;
  #ifdef _OTAU_
    uint8_t  csOtauDiscoveredServerAmount;
    uint8_t  csOtauClientSessionAmount;
    uint16_t csOtauServerPageRequestResponseSpacing;
    uint16_t csOtauServerPageSize;
    uint8_t csOtauClientMissedBlocksBufferSize;
  #endif /* _OTAU_ */
#endif /* _ZCL_ */

  /* Other parameters */
  uint32_t csStackVersion;
  uint16_t csManufacturerCode;

  /* Security parameters */
#ifdef _SECURITY_
#ifdef _TRUST_CENTRE_
  uint8_t   csMaxTcAuthenticProcessAmount;
  #ifdef _TC_PERMISSION_TABLE_
    uint8_t csMaxTcAllowedDevicesAmount;
  #endif /* _TC_PERMISSION_TABLE_ */
#endif /* _TRUST_CENTRE_ */
  uint32_t  csApsSecurityTimeoutPeriod;
#ifdef _LINK_SECURITY_ 
  #ifdef _TRUST_CENTRE_
    uint8_t csMaxTcEstablishKeyAmount;
  #endif /* _TRUST_CENTRE_ */
  uint8_t csApsKeyPairDescriptorsAmount;
#endif /* _LINK_SECURITY_ */

#endif /* _SECURITY_ */
} CS_ReadOnlyItems_t;

/**//**
 * \brief Common stack information base
 */
typedef struct _SIB_t
{
  /* MAC parameters */
  uint32_t    csMacTransactionTime;
  int8_t      csRfTxPower;
#ifdef AT86RF212
  bool        csLbtMode;
#endif /* AT86RF212 */
#ifndef _MAC2_

  /* NWK parameters */
  PanId_t     csNwkPanid;
  bool        csNwkUseMulticast;
  uint8_t     csNwkMaxLinkStatusFailures;
  uint8_t     csNwkEndDeviceMaxFailures;
  uint8_t     csNwkLogicalChannel;
  bool        csNwkPredefinedPanid;
#ifdef _NWK_CONCENTRATOR_
  uint32_t     csNwkConcentratorDiscoveryTime;
#endif

  /* ZDO parameters */
  uint32_t         csEndDeviceSleepPeriod;
  uint32_t         csFfdSleepPeriod;
  bool             csRxOnWhenIdle;
  bool             csComplexDescriptorAvailable;
  bool             csUserDescriptorAvailable;
  uint32_t         csIndirectPollRate;
  uint8_t          csZdoJoinAttempts;
  uint32_t         csZdoJoinInterval;
  UserDescriptor_t csUserDescriptor; /* to EEPROM */
  ExtPanId_t       csExtPANID; /* user-defined PAN ID */
#ifdef _TC_SWAPOUT_
  uint8_t  csZdoTcKeepAliveInterval;
#endif // _TC_SWAPOUT_

  /* APS parameters */
  uint8_t csApsMaxFrameRetries;
#ifdef _APS_FRAGMENTATION_
  uint8_t csApsMaxTransmissionWindowSize;
#endif /* _APS_FRAGMENTATION_ */

  /* PDS parameters*/
  bool    csDtrWakeup;

  /* ZCL parameters */
#ifdef _ZCL_
  uint16_t csZclAttributeReportTimerInterval;
  #ifdef _OTAU_
    ExtAddr_t csOtauDefaultServerAddress;
    uint32_t  csOtauServerDiscoveryPeriod;
    bool csOtauServerPageRequestUsage;
  #endif /* _OTAU_ */
#endif /* _ZCL_ */

  /* Other parameters */
#ifdef _COMMISSIONING_
  uint32_t csPdsStoringInterval;
  #ifdef _POWER_FAILURE_
  bool     csPowerFailure;
  #endif /* _POWER_FAILURE_ */
#endif /* _COMMISSIONING_ */

  /* Security parameters */
#ifdef _SECURITY_
  bool      csSecurityOn;
  uint8_t   csZdoSecurityStatus;
#endif /* _SECURITY_ */
#endif /* _MAC2_ */
} SIB_t;

#endif /* _CSSIB_H_ */
/* eof csSIB.h */