-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathproject-conf.h
More file actions
262 lines (200 loc) · 8.61 KB
/
Copy pathproject-conf.h
File metadata and controls
262 lines (200 loc) · 8.61 KB
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
/*
* Copyright (c) 2013, CETIC.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/**
* \file
* 6LBR-Demo Project Configuration
* \author
* 6LBR Team <6lbr@cetic.be>
*/
#ifndef CETIC_6LBR_DEMO_PROJECT_CONF_H
#define CETIC_6LBR_DEMO_PROJECT_CONF_H
/*---------------------------------------------------------------------------*/
/* COAP */
/*---------------------------------------------------------------------------*/
#define COAP_SERVER_PORT 5683
/* Unless compiling in LARGE mode, only a few resources can be enabled at a time */
#if defined CONTIKI_TARGET_SKY || (defined CONTIKI_TARGET_Z1 && ! MSP430_20BITS)
#define REST_CONF_RES_BATTERY 1
#define REST_CONF_RES_BATTERY_PERIODIC 0
#define REST_CONF_RES_BUTTON 0
#define REST_CONF_RES_BUTTON_EVENT 0
#define REST_CONF_RES_DEVICE_MODEL_SW 1
#define REST_CONF_RES_DEVICE_UPTIME 1
#define REST_CONF_RES_HUMIDITY 0
#define REST_CONF_RES_HUMIDITY_PERIODIC 0
#define REST_CONF_RES_LED_R 1
#define REST_CONF_RES_LED_G 0
#define REST_CONF_RES_LED_B 0
#define REST_CONF_RES_LIGHT_SOLAR 1
#define REST_CONF_RES_LIGHT_SOLAR_PERIODIC 1
#define REST_CONF_RES_LIGHT_PHOTO 0
#define REST_CONF_RES_LIGHT_PHOTO_PERIODIC 0
#define REST_CONF_RES_TEMP 0
#define REST_CONF_RES_TEMP_PERIODIC 0
#define REST_CONF_RES_RADIO_LQI 0
#define REST_CONF_RES_RADIO_LQI_PERIODIC 0
#define REST_CONF_RES_RADIO_RSSI 0
#define REST_CONF_RES_RADIO_RSSI_PERIODIC 0
/* Disable .well-known/core filtering to save code */
#undef COAP_LINK_FORMAT_FILTERING
#define COAP_LINK_FORMAT_FILTERING 0
/* Uncomment to remove /.well-known/core resource to save code */
//#define WITH_WELL_KNOWN_CORE 0
#else
#define REST_CONF_RES_BATTERY 1
#define REST_CONF_RES_BATTERY_PERIODIC 1
#define REST_CONF_RES_BUTTON 1
#define REST_CONF_RES_BUTTON_EVENT 1
#define REST_CONF_RES_DEVICE_MODEL_SW 1
#define REST_CONF_RES_DEVICE_UPTIME 1
#define REST_CONF_RES_HUMIDITY 1
#define REST_CONF_RES_HUMIDITY_PERIODIC 1
#define REST_CONF_RES_LED_R 1
#define REST_CONF_RES_LED_G 1
#define REST_CONF_RES_LED_B 1
#define REST_CONF_RES_LIGHT_SOLAR 1
#define REST_CONF_RES_LIGHT_SOLAR_PERIODIC 1
#define REST_CONF_RES_LIGHT_PHOTO 1
#define REST_CONF_RES_LIGHT_PHOTO_PERIODIC 1
#define REST_CONF_RES_TEMP 1
#define REST_CONF_RES_TEMP_PERIODIC 1
#define REST_CONF_RES_RADIO_LQI 1
#define REST_CONF_RES_RADIO_LQI_PERIODIC 1
#define REST_CONF_RES_RADIO_RSSI 1
#define REST_CONF_RES_RADIO_RSSI_PERIODIC 1
#endif
/* COAP content type definition */
#define REST_TYPE_TEXT_PLAIN
//#define REST_TYPE_APPLICATION_XML
//#define REST_TYPE_APPLICATION_JSON
/* Chunk size == 128 is troublesome on Z1, maybe related to 6LoWPAN fragmentation */
/* Not sure why, set it to 64 */
#define REST_MAX_CHUNK_SIZE 64
/*---------------------------------------------------------------------------*/
/* UDP-CLIENT */
/*---------------------------------------------------------------------------*/
#define CETIC_6LBR_NODE_INFO_PORT 3000
/* Report LQI and RSSI only for parent node */
#define UDP_CLIENT_STORE_RADIO_INFO 1
/*---------------------------------------------------------------------------*/
/* DTLS */
/*---------------------------------------------------------------------------*/
#define DTLS_PEER_MAX 3
#define DTLS_CONF_CONN_TIMEOUT 10
//#define DTLS_CONF_PSK_KEY "secretPSK"
//#define DTLS_CONF_PSK_KEY_LENGTH 9
/*---------------------------------------------------------------------------*/
/* DTLS ECHO */
/*---------------------------------------------------------------------------*/
#define DTLS_ECHO_PORT 20220
/*---------------------------------------------------------------------------*/
/* UIP Buffers */
/*---------------------------------------------------------------------------*/
#if !UIP_CONF_IPV6_RPL
#undef UIP_CONF_ROUTER
#define UIP_CONF_ROUTER 0
#endif
#undef QUEUEBUF_CONF_NUM
#define QUEUEBUF_CONF_NUM 5
#undef UIP_CONF_BUFFER_SIZE
#define UIP_CONF_BUFFER_SIZE 260
#undef UIP_CONF_RECEIVE_WINDOW
#define UIP_CONF_RECEIVE_WINDOW 60
/*---------------------------------------------------------------------------*/
/* WEBSERVER */
/*---------------------------------------------------------------------------*/
#undef WEBSERVER_CONF_CFS_CONNS
#define WEBSERVER_CONF_CFS_CONNS 2
/* Reserve space for a file name (default is to not use file name) */
#undef WEBSERVER_CONF_CFS_PATHLEN
#define WEBSERVER_CONF_CFS_PATHLEN 80
/*---------------------------------------------------------------------------*/
/* RADIO */
/*---------------------------------------------------------------------------*/
#undef NETSTACK_CONF_MAC
#define NETSTACK_CONF_MAC nullmac_driver /*csma_driver*/
#undef NETSTACK_CONF_RDC
#define NETSTACK_CONF_RDC nullrdc_driver
#undef SKY_CONF_MAX_TX_POWER
#define SKY_CONF_MAX_TX_POWER 31
#if CONTIKI_TARGET_ECONOTAG
#undef NULLRDC_CONF_802154_AUTOACK
#define NULLRDC_CONF_802154_AUTOACK_HW 1
#else
#undef NULLRDC_CONF_802154_AUTOACK
#define NULLRDC_CONF_802154_AUTOACK 1
#endif
/*---------------------------------------------------------------------------*/
/* RPL & Network */
/*---------------------------------------------------------------------------*/
#undef RPL_CONF_INIT_LINK_METRIC
#define RPL_CONF_INIT_LINK_METRIC 3
#define RPL_MAX_DAG_PER_INSTANCE 2
#define RPL_MAX_INSTANCES 1
/* Z1 platform has limited RAM */
#if defined CONTIKI_TARGET_Z1
#define RPL_CONF_MAX_PARENTS_PER_DAG 12
#define NEIGHBOR_CONF_MAX_NEIGHBORS 12
#undef UIP_CONF_DS6_NBR_NBU
#define UIP_CONF_DS6_NBR_NBU 12
//Deprecated, for old DS6 Route API, use UIP_CONF_MAX_ROUTES instead
#undef UIP_CONF_DS6_ROUTE_NBU
#define UIP_CONF_DS6_ROUTE_NBU 12
#undef UIP_CONF_MAX_ROUTES
#define UIP_CONF_MAX_ROUTES 12
#else
#define RPL_CONF_MAX_PARENTS_PER_DAG 24
#define NEIGHBOR_CONF_MAX_NEIGHBORS 24
#undef UIP_CONF_DS6_NBR_NBU
#define UIP_CONF_DS6_NBR_NBU 24
//Deprecated, for old DS6 Route API, use UIP_CONF_MAX_ROUTES instead
#undef UIP_CONF_DS6_ROUTE_NBU
#define UIP_CONF_DS6_ROUTE_NBU 24
#undef UIP_CONF_MAX_ROUTES
#define UIP_CONF_MAX_ROUTES 24
#endif
/*---------------------------------------------------------------------------*/
/* Miscellaneous */
/*---------------------------------------------------------------------------*/
/* Disable ENERGEST to save code */
#undef ENERGEST_CONF_ON
#define ENERGEST_CONF_ON 0
#ifdef CETIC_TESTBED
#undef REST_CONF_RES_LED_R
#define REST_CONF_RES_LED_R 0
#undef REST_CONF_RES_BATTERY
#define REST_CONF_RES_BATTERY 0
#undef REST_CONF_RES_LIGHT_SOLAR
#define REST_CONF_RES_LIGHT_SOLAR 0
#undef REST_CONF_RES_RADIO_LQI
#define REST_CONF_RES_RADIO_LQI 1
#undef REST_CONF_RES_RADIO_RSSI
#define REST_CONF_RES_RADIO_RSSI 1
#endif
#endif /* CETIC_6LBR_DEMO_PROJECT_CONF_H */