1 /* 2 * Copyright (c) 2016, The OpenThread Authors. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 3. Neither the name of the copyright holder nor the 13 * names of its contributors may be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** 30 * @file 31 * This file includes miscellaneous compile-time configuration constants for OpenThread. 32 */ 33 34 #ifndef CONFIG_MISC_H_ 35 #define CONFIG_MISC_H_ 36 37 #include "config/coap.h" 38 #include "config/srp_server.h" 39 40 /** 41 * @def OPENTHREAD_CONFIG_STACK_VENDOR_OUI 42 * 43 * The Organizationally Unique Identifier for the Thread stack. 44 * 45 */ 46 #ifndef OPENTHREAD_CONFIG_STACK_VENDOR_OUI 47 #define OPENTHREAD_CONFIG_STACK_VENDOR_OUI 0x18b430 48 #endif 49 50 /** 51 * @def OPENTHREAD_CONFIG_STACK_VERSION_REV 52 * 53 * The Stack Version Revision for the Thread stack. 54 * 55 */ 56 #ifndef OPENTHREAD_CONFIG_STACK_VERSION_REV 57 #define OPENTHREAD_CONFIG_STACK_VERSION_REV 0 58 #endif 59 60 /** 61 * @def OPENTHREAD_CONFIG_STACK_VERSION_MAJOR 62 * 63 * The Stack Version Major for the Thread stack. 64 * 65 */ 66 #ifndef OPENTHREAD_CONFIG_STACK_VERSION_MAJOR 67 #define OPENTHREAD_CONFIG_STACK_VERSION_MAJOR 0 68 #endif 69 70 /** 71 * @def OPENTHREAD_CONFIG_STACK_VERSION_MINOR 72 * 73 * The Stack Version Minor for the Thread stack. 74 * 75 */ 76 #ifndef OPENTHREAD_CONFIG_STACK_VERSION_MINOR 77 #define OPENTHREAD_CONFIG_STACK_VERSION_MINOR 1 78 #endif 79 80 /** 81 * @def OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY 82 * 83 * Specifies the default device power supply config. This config MUST use values from `otPowerSupply` enumeration. 84 * 85 * Device manufacturer can use this config to set the power supply config used by the device. This is then used as part 86 * of default `otDeviceProperties` to determine the Leader Weight used by the device. 87 * 88 */ 89 #ifndef OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY 90 #define OPENTHREAD_CONFIG_DEVICE_POWER_SUPPLY OT_POWER_SUPPLY_EXTERNAL 91 #endif 92 93 /** 94 * @def OPENTHREAD_CONFIG_ECDSA_ENABLE 95 * 96 * Define to 1 to enable ECDSA support. 97 * 98 */ 99 #ifndef OPENTHREAD_CONFIG_ECDSA_ENABLE 100 #define OPENTHREAD_CONFIG_ECDSA_ENABLE 0 101 #endif 102 103 /** 104 * @def OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE 105 * 106 * Define to 1 to generate ECDSA signatures deterministically 107 * according to RFC 6979 instead of randomly. 108 * 109 */ 110 #ifndef OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE 111 #define OPENTHREAD_CONFIG_DETERMINISTIC_ECDSA_ENABLE 1 112 #endif 113 114 /** 115 * @def OPENTHREAD_CONFIG_UPTIME_ENABLE 116 * 117 * Define to 1 to enable tracking the uptime of OpenThread instance. 118 * 119 */ 120 #ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE 121 #define OPENTHREAD_CONFIG_UPTIME_ENABLE OPENTHREAD_FTD 122 #endif 123 124 /** 125 * @def OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 126 * 127 * Define to 1 to enable the Jam Detection service. 128 * 129 */ 130 #ifndef OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 131 #define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0 132 #endif 133 134 /** 135 * @def OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 136 * 137 * Define to 1 to enable multiple instance support. 138 * 139 */ 140 #ifndef OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 141 #define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0 142 #endif 143 144 /** 145 * @def OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 146 * 147 * Define to 1 to enable Thread Test Harness reference device support. 148 * 149 */ 150 #ifndef OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 151 #define OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 0 152 #endif 153 154 /** 155 * @def OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 156 * 157 * Define to 1 to enable UDP forward support. 158 * 159 */ 160 #ifndef OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 161 #define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0 162 #endif 163 164 /** 165 * @def OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 166 * 167 * Whether use heap allocator for message buffers. 168 * 169 * @note If this is set, OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS is ignored. 170 * 171 */ 172 #ifndef OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 173 #define OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 0 174 #endif 175 176 /** 177 * @def OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 178 * 179 * The number of message buffers in the buffer pool. 180 * 181 */ 182 #ifndef OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 183 #define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 44 184 #endif 185 186 /** 187 * @def OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE 188 * 189 * The size of a message buffer in bytes. 190 * 191 * Message buffers store pointers which have different sizes on different 192 * system. Setting message buffer size according to the CPU word length 193 * so that message buffer size will be doubled on 64bit system compared 194 * to that on 32bit system. As a result, the first message always have some 195 * bytes left for small packets. 196 * 197 * Some configuration options can increase the buffer size requirements, including 198 * OPENTHREAD_CONFIG_MLE_MAX_CHILDREN and OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE. 199 * 200 */ 201 #ifndef OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE 202 #define OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE (sizeof(void *) * 32) 203 #endif 204 205 /** 206 * @def OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 207 * 208 * The default IEEE 802.15.4 transmit power (dBm). 209 * 210 */ 211 #ifndef OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 212 #define OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 0 213 #endif 214 215 /** 216 * @def OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE 217 * 218 * Define as 1 for OpenThread to drop a message (and not send any remaining fragments of the message) if all transmit 219 * attempts fail for a fragment of the message. For a direct transmission, a failure occurs after all MAC transmission 220 * attempts for a given fragment are unsuccessful. For an indirect transmission, a failure occurs after all data poll 221 * triggered transmission attempts for a given fragment fail. 222 * 223 * If set to zero (disabled), OpenThread will attempt to send subsequent fragments, whether or not all transmission 224 * attempts fail for a given fragment. 225 * 226 */ 227 #ifndef OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE 228 #define OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE 1 229 #endif 230 231 /** 232 * @def OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT 233 * 234 * The reassembly timeout between 6LoWPAN fragments in seconds. 235 * 236 */ 237 #ifndef OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT 238 #define OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT 2 239 #endif 240 241 /** 242 * @def OPENTHREAD_CONFIG_JOINER_UDP_PORT 243 * 244 * The default Joiner UDP port. 245 * 246 */ 247 #ifndef OPENTHREAD_CONFIG_JOINER_UDP_PORT 248 #define OPENTHREAD_CONFIG_JOINER_UDP_PORT 1000 249 #endif 250 251 /** 252 * @def OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS 253 * 254 * The maximum number of state-changed callback handlers (set using `otSetStateChangedCallback()`). 255 * 256 */ 257 #ifndef OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS 258 #define OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS 1 259 #endif 260 261 /** 262 * @def OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD 263 * 264 * The value ahead of the current frame counter for persistent storage. 265 * 266 */ 267 #ifndef OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD 268 #define OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD 1000 269 #endif 270 271 /** 272 * @def OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 273 * 274 * Define as 1 to enable builtin-mbedtls. 275 * 276 * Note that the OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS determines whether to use builtin-mbedtls as well as 277 * whether to manage mbedTLS internally, such as memory allocation and debug. 278 * 279 */ 280 #ifndef OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 281 #define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 1 282 #endif 283 284 /** 285 * @def OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT 286 * 287 * Define as 1 to enable builtin mbedtls management. 288 * 289 * OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT determines whether to manage mbedTLS memory 290 * allocation and debug config internally. If not configured, the default is to enable builtin 291 * management if builtin mbedtls is enabled and disable it otherwise. 292 * 293 */ 294 #ifndef OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT 295 #define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 296 #endif 297 298 /** 299 * @def OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE 300 * 301 * The size of heap buffer when DTLS is enabled. 302 * 303 */ 304 #ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE 305 #if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 306 // Internal heap doesn't support size larger than 64K bytes. 307 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (63 * 1024) 308 #elif OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE 309 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (3136 * sizeof(void *)) 310 #else 311 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (1616 * sizeof(void *)) 312 #endif 313 #endif 314 315 /** 316 * @def OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 317 * 318 * The size of heap buffer when DTLS is disabled. 319 * 320 */ 321 #ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 322 #if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE 323 // Internal heap doesn't support size larger than 64K bytes. 324 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS (63 * 1024) 325 #elif OPENTHREAD_CONFIG_ECDSA_ENABLE 326 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 2600 327 #else 328 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 384 329 #endif 330 #endif 331 332 /** 333 * @def OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 334 * 335 * Enable the external heap. 336 * 337 */ 338 #ifndef OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 339 #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0 340 #endif 341 342 /** 343 * @def OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH 344 * 345 * The size of dtls application data when the CoAP Secure API is enabled. 346 * 347 */ 348 #ifndef OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH 349 #define OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH 1400 350 #endif 351 352 /** 353 * @def OPENTHREAD_CONFIG_ASSERT_ENABLE 354 * 355 * Define as 1 to enable assert function `OT_ASSERT()` within OpenThread code and its libraries. 356 * 357 */ 358 #ifndef OPENTHREAD_CONFIG_ASSERT_ENABLE 359 #define OPENTHREAD_CONFIG_ASSERT_ENABLE 1 360 #endif 361 362 /** 363 * @def OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 364 * 365 * Define as 1 to enable assert check of pointer-type API input parameters against null. 366 * 367 * Enabling this feature can increase code-size significantly due to many assert checks added for all API pointer 368 * parameters. It is recommended to enable and use this feature during debugging only. 369 * 370 */ 371 #ifndef OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 372 #define OPENTHREAD_CONFIG_ASSERT_CHECK_API_POINTER_PARAM_FOR_NULL 0 373 #endif 374 375 /** 376 * @def OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 377 * 378 * Enable the "Debug Uart" platform feature. 379 * 380 * In the embedded world, the CLI application uses a UART as a console 381 * and the NCP application can be configured to use either a UART or 382 * a SPI type device to transfer data to the host. 383 * 384 * The Debug UART is or requires a second uart on the platform. 385 * 386 * The Debug Uart has two uses: 387 * 388 * Use #1 - for random 'debug printf' type messages a developer may need 389 * Use #2 (selected via DEBUG_LOG_OUTPUT) is a log output. 390 * 391 * See #include <openthread/platform/debug_uart.h> for more details 392 */ 393 #ifndef OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 394 #define OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 0 395 #endif 396 397 /** 398 * @def OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH 399 * 400 * The settings storage path on posix platform. 401 * 402 */ 403 #ifndef OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH 404 #define OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH "tmp" 405 #endif 406 407 /** 408 * @def OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 409 * 410 * Define to 1 to enable otPlatFlash* APIs to support non-volatile storage. 411 * 412 * When defined to 1, the platform MUST implement the otPlatFlash* APIs instead of the otPlatSettings* APIs. 413 * 414 */ 415 #ifndef OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 416 #define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 0 417 #endif 418 419 /** 420 * @def OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS 421 * 422 * This setting configures the number of consecutive MCPS.DATA-Confirms having Status NO_ACK 423 * that cause a Child-to-Parent link to be considered broken. 424 * 425 */ 426 #ifndef OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS 427 #define OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS 4 428 #endif 429 430 /** 431 * @def OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE 432 * 433 * This setting configures the default buffer size for IPv6 datagram destined for an attached SED. 434 * A Thread Router MUST be able to buffer at least one 1280-octet IPv6 datagram for an attached SED according to 435 * the Thread Conformance Specification. 436 * 437 */ 438 #ifndef OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE 439 #define OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE 1280 440 #endif 441 442 /** 443 * @def OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT 444 * 445 * This setting configures the default datagram count of 106-octet IPv6 datagram per attached SED. 446 * A Thread Router MUST be able to buffer at least one 106-octet IPv6 datagram per attached SED according to 447 * the Thread Conformance Specification. 448 * 449 */ 450 #ifndef OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT 451 #define OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT 1 452 #endif 453 454 /** 455 * @def OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES 456 * 457 * The number of fragment priority entries. 458 * 459 */ 460 #ifndef OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES 461 #define OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES 8 462 #endif 463 464 /** 465 * @def OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE 466 * 467 * Define to 1 to enable delay-aware queue management for the send queue. 468 * 469 * When enabled device will monitor time-in-queue of messages in the direct tx queue and if the wait time is lager than 470 * specified thresholds it may update ECN flag (if message indicates it is ECN-capable) or drop the message. 471 * 472 */ 473 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE 474 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE \ 475 (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3) 476 #endif 477 478 /** 479 * @OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL 480 * 481 * Specifies the time-in-queue threshold interval in milliseconds to mark ECN on a message if it is ECN-capable or 482 * drop the message if not ECN-capable. 483 * 484 */ 485 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL 486 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL 500 487 #endif 488 489 /** 490 * @OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL 491 * 492 * Specifies the time-in-queue threshold interval in milliseconds to drop a message. 493 * 494 */ 495 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL 496 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL 1000 497 #endif 498 499 /** 500 * OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME 501 * 502 * Specifies the max retain time in seconds of a mesh header fragmentation tag entry in the list. 503 * 504 * The entry in list is used to track whether an earlier fragment of same message was dropped by the router and if so 505 * the next fragments are also dropped. The entry is removed once last fragment is processed or after the retain time 506 * specified by this config parameter expires. 507 * 508 */ 509 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME 510 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME (4 * 60) // 4 minutes 511 #endif 512 513 /** 514 * OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE 515 * 516 * Specifies the number of mesh header fragmentation tag entries in the list for delay-aware queue management. 517 * 518 * The list is used to track whether an earlier fragment of same message was dropped by the router and if so the next 519 * fragments are also dropped. 520 * 521 */ 522 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE 523 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE 16 524 #endif 525 526 /** 527 * @def OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE 528 * 529 * Specifies the maximum number of frames in direct tx queue before new direct tx messages are dropped. 530 * 531 * If set to zero then the behavior is disabled, i.e., no check is performed on tx queue length. 532 * 533 */ 534 #ifndef OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE 535 #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3) 536 #define OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE 100 537 #else 538 #define OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE 0 539 #endif 540 #endif 541 542 /** 543 * @def OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT 544 * 545 * Define to 1 to support proprietary radio configurations defined by platform. 546 * 547 * @note If this setting is set to 1, the channel range is defined by the platform. Choosing this option requires 548 * the following configuration options to be defined by Platform: 549 * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_PAGE, 550 * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_MIN, 551 * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_MAX and, 552 * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_MASK. 553 * 554 * @def OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 555 * 556 * Define to 1 to support OQPSK modulation in 915MHz frequency band. The physical layer parameters are defined in 557 * section 6 of IEEE802.15.4-2006. 558 * 559 * @note If this setting is set to 1, the IEEE 802.15.4 channel range is 1 to 10. 560 * 561 * @def OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 562 * 563 * Define to 1 to support OQPSK modulation in 2.4GHz frequency band. The physical layer parameters are defined in 564 * section 6 of IEEE802.15.4-2006. 565 * 566 * @note If this settings is set to 1, the IEEE 802.15.4 channel range is 11 to 26. 567 * 568 * @note At least one of these settings must be set to 1. The platform must support the modulation and frequency 569 * band configured by the setting. 570 */ 571 #ifndef OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT 572 #ifndef OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 573 #ifndef OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 574 #define OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT 0 575 #define OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 0 576 #define OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 1 577 #endif 578 #endif 579 #endif 580 581 /** 582 * @def OPENTHREAD_CONFIG_DEFAULT_CHANNEL 583 * 584 * The default IEEE 802.15.4 channel. 585 * 586 */ 587 #ifndef OPENTHREAD_CONFIG_DEFAULT_CHANNEL 588 #if OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 589 #define OPENTHREAD_CONFIG_DEFAULT_CHANNEL 11 590 #else 591 #if OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 592 #define OPENTHREAD_CONFIG_DEFAULT_CHANNEL 1 593 #endif // OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 594 #endif // OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 595 #endif // OPENTHREAD_CONFIG_DEFAULT_CHANNEL 596 597 /** 598 * @def OPENTHREAD_CONFIG_OTNS_ENABLE 599 * 600 * Define to 1 to enable OTNS interactions. 601 * 602 */ 603 #ifndef OPENTHREAD_CONFIG_OTNS_ENABLE 604 #define OPENTHREAD_CONFIG_OTNS_ENABLE 0 605 #endif 606 607 /** 608 * @def OPENTHREAD_CONFIG_DUA_ENABLE 609 * 610 * Define as 1 to support Thread 1.2 Domain Unicast Address feature. 611 * 612 */ 613 #ifndef OPENTHREAD_CONFIG_DUA_ENABLE 614 #define OPENTHREAD_CONFIG_DUA_ENABLE 0 615 #endif 616 617 /** 618 * @def OPENTHREAD_CONFIG_MLR_ENABLE 619 * 620 * Define as 1 to support Thread 1.2 Multicast Listener Registration feature. 621 * 622 */ 623 #ifndef OPENTHREAD_CONFIG_MLR_ENABLE 624 #define OPENTHREAD_CONFIG_MLR_ENABLE 0 625 #endif 626 627 /** 628 * @def OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE 629 * 630 * Define as 1 to enable support for Neighbor Discover Agent. 631 * 632 */ 633 #ifndef OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE 634 #define OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE 0 635 #endif 636 637 /** 638 * @def OPENTHREAD_CONFIG_ALLOW_EMPTY_NETWORK_NAME 639 * 640 * Define as 1 to enable support for an empty network name (zero-length: "") 641 * 642 */ 643 #ifndef OPENTHREAD_CONFIG_ALLOW_EMPTY_NETWORK_NAME 644 #define OPENTHREAD_CONFIG_ALLOW_EMPTY_NETWORK_NAME 0 645 #endif 646 647 #endif // CONFIG_MISC_H_ 648