CHIPProjectConfig.h 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. /*
  2. *
  3. * Copyright (c) 2020 Project CHIP Authors
  4. * Copyright (c) 2019 Google LLC.
  5. * All rights reserved.
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. */
  19. /**
  20. * @file
  21. * Example project configuration file for CHIP.
  22. *
  23. * This is a place to put application or project-specific overrides
  24. * to the default configuration values for general CHIP features.
  25. *
  26. */
  27. #pragma once
  28. // Use a default setup PIN code if one hasn't been provisioned in flash.
  29. #ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE
  30. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021
  31. #endif
  32. #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
  33. // shell app uses openthread but does not have the NETWORK_COMMISSIONING cluster or zap config
  34. // Do not instantiate the NETWORK_COMMISSIONING thread driver
  35. #define _NO_NETWORK_COMMISSIONING_DRIVER_
  36. // For convenience, enable Chip Security Test Mode and disable the requirement for
  37. // authentication in various protocols.
  38. //
  39. // WARNING: These options make it possible to circumvent basic Chip security functionality,
  40. // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
  41. //
  42. #define CHIP_CONFIG_SECURITY_TEST_MODE 0
  43. /**
  44. * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
  45. *
  46. * 0xFFF1: Test vendor.
  47. */
  48. #ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
  49. #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1
  50. #endif // CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
  51. /**
  52. * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
  53. *
  54. * 0x8009: example shell
  55. */
  56. #ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
  57. #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8012
  58. #endif // CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
  59. /**
  60. * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION
  61. *
  62. * The hardware version number assigned to device or product by the device vendor. This
  63. * number is scoped to the device product id, and typically corresponds to a revision of the
  64. * physical device, a change to its packaging, and/or a change to its marketing presentation.
  65. * This value is generally *not* incremented for device software versions.
  66. */
  67. #define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1
  68. /**
  69. * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
  70. *
  71. * A string identifying the software version running on the device.
  72. * CHIP service currently expects the software version to be in the format
  73. * {MAJOR_VERSION}.0d{MINOR_VERSION}
  74. */
  75. #ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING
  76. #define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "0.1ALPHA"
  77. #endif
  78. /**
  79. * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
  80. *
  81. * Enable support for Chip-over-BLE (CHIPoBLE).
  82. */
  83. #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1
  84. /**
  85. * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
  86. *
  87. * Enables the use of a hard-coded default serial number if none
  88. * is found in Chip NV storage.
  89. */
  90. #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
  91. /**
  92. * CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI
  93. *
  94. * Enable Thread CLI interface at initialisation.
  95. */
  96. #define CHIP_DEVICE_CONFIG_THREAD_ENABLE_CLI 1
  97. /**
  98. * @def CHIP_CONFIG_MAX_FABRICS
  99. *
  100. * @brief
  101. * Maximum number of fabrics the device can participate in. Each fabric can
  102. * provision the device with its unique operational credentials and manage
  103. * its own access control lists.
  104. */
  105. // !Note - 3 is not spec compliant, only to accomodate shell test app RAM use
  106. #define CHIP_CONFIG_MAX_FABRICS 3
  107. /**
  108. * @name Interaction Model object pool configuration.
  109. *
  110. * @brief
  111. * The following definitions sets the maximum number of corresponding interaction model object pool size.
  112. *
  113. * * #CHIP_IM_MAX_NUM_COMMAND_HANDLER
  114. * * #CHIP_IM_MAX_REPORTS_IN_FLIGHT
  115. * * #CHIP_IM_MAX_NUM_WRITE_HANDLER
  116. * * #CHIP_IM_MAX_NUM_WRITE_CLIENT
  117. *
  118. * @{
  119. */
  120. /**
  121. * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER
  122. *
  123. * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server.
  124. */
  125. #define CHIP_IM_MAX_NUM_COMMAND_HANDLER 2
  126. /**
  127. * @def CHIP_IM_MAX_REPORTS_IN_FLIGHT
  128. *
  129. * @brief Defines the maximum number of Reports, limits the traffic of read and subscription transactions.
  130. */
  131. #define CHIP_IM_MAX_REPORTS_IN_FLIGHT 2
  132. /**
  133. * @def CHIP_IM_MAX_NUM_WRITE_HANDLER
  134. *
  135. * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server.
  136. */
  137. #define CHIP_IM_MAX_NUM_WRITE_HANDLER 2
  138. /**
  139. * @def CHIP_IM_MAX_NUM_WRITE_CLIENT
  140. *
  141. * @brief Defines the maximum number of WriteClient, limits the number of active write transactions on client.
  142. */
  143. #define CHIP_IM_MAX_NUM_WRITE_CLIENT 2