Globals.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. *
  3. * Copyright (c) 2021 Project CHIP Authors
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. #pragma once
  18. #include <credentials/FabricTable.h>
  19. #include <lib/core/CHIPCore.h>
  20. #include <lib/support/TestPersistentStorageDelegate.h>
  21. #include <messaging/ExchangeMgr.h>
  22. #include <protocols/secure_channel/MessageCounterManager.h>
  23. #include <transport/SessionHolder.h>
  24. #include <transport/SessionManager.h>
  25. #include <transport/raw/TCP.h>
  26. #include <transport/raw/UDP.h>
  27. #if INET_CONFIG_ENABLE_TCP_ENDPOINT
  28. inline constexpr size_t kMaxTcpActiveConnectionCount = 4;
  29. inline constexpr size_t kMaxTcpPendingPackets = 4;
  30. #endif
  31. inline constexpr chip::System::Clock::Timeout kResponseTimeOut = chip::System::Clock::Seconds16(1);
  32. extern chip::FabricTable gFabricTable;
  33. extern chip::secure_channel::MessageCounterManager gMessageCounterManager;
  34. extern chip::Messaging::ExchangeManager gExchangeManager;
  35. extern chip::SessionManager gSessionManager;
  36. extern chip::Inet::IPAddress gDestAddr;
  37. extern chip::SessionHolder gSession;
  38. extern chip::TestPersistentStorageDelegate gStorage;
  39. extern chip::FabricIndex gFabricIndex;
  40. #if INET_CONFIG_ENABLE_TCP_ENDPOINT
  41. extern chip::TransportMgr<chip::Transport::TCP<kMaxTcpActiveConnectionCount, kMaxTcpPendingPackets>> gTCPManager;
  42. #endif
  43. extern chip::TransportMgr<chip::Transport::UDP> gUDPManager;