nimble_l2cap_test_conf.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (C) 2019 Freie Universität Berlin
  3. *
  4. * This file is subject to the terms and conditions of the GNU Lesser
  5. * General Public License v2.1. See the file LICENSE in the top level
  6. * directory for more details.
  7. */
  8. /**
  9. * @ingroup tests
  10. * @{
  11. *
  12. * @file
  13. * @brief Shared configuration for NimBLE L2CAP tests
  14. *
  15. * @author Hauke Petersen <hauke.petersen@fu-berlin.de>
  16. */
  17. #ifndef NIMBLE_L2CAP_TEST_CONF_H
  18. #define NIMBLE_L2CAP_TEST_CONF_H
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. /**
  23. * @name Calculate values for the application specific mbuf pool
  24. * @{
  25. */
  26. #define MBUFSIZE_OVHD (sizeof(struct os_mbuf) + \
  27. sizeof(struct os_mbuf_pkthdr))
  28. #define MBUFS_PER_MTU (APP_MTU / APP_BUF_CHUNKSIZE)
  29. #define MBUFSIZE (APP_BUF_CHUNKSIZE + MBUFSIZE_OVHD)
  30. #define MBUFCNT (APP_BUF_NUM * MBUFS_PER_MTU)
  31. /** @} */
  32. /**
  33. * @name Default parameters for selected test cases
  34. * @{
  35. */
  36. #define PKTSIZE_DEFAULT (100U)
  37. #define FLOOD_DEFAULT (50U)
  38. /** @} */
  39. /**
  40. * @name Field offsets and type values for test packet payloads
  41. * @{
  42. */
  43. #define TYPE_INCTEST (0x17192123)
  44. #define TYPE_FLOODING (0x73829384)
  45. #define POS_TYPE (0U)
  46. #define POS_SEQ (1U)
  47. /** @} */
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51. #endif /* NIMBLE_L2CAP_TEST_CONF_H */
  52. /** @} */