Implement a secure ICS protocol targeting LoRa Node151 microcontroller for controlling irrigation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

125 lines
3.0 KiB

  1. /*!
  2. * \file LoRaMacClassBConfig.h
  3. *
  4. * \brief LoRa MAC Class B configuration
  5. *
  6. * \copyright Revised BSD License, see section \ref LICENSE.
  7. *
  8. * \code
  9. * ______ _
  10. * / _____) _ | |
  11. * ( (____ _____ ____ _| |_ _____ ____| |__
  12. * \____ \| ___ | (_ _) ___ |/ ___) _ \
  13. * _____) ) ____| | | || |_| ____( (___| | | |
  14. * (______/|_____)_|_|_| \__)_____)\____)_| |_|
  15. * (C)2013 Semtech
  16. *
  17. * ___ _____ _ ___ _ _____ ___ ___ ___ ___
  18. * / __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
  19. * \__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
  20. * |___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
  21. * embedded.connectivity.solutions===============
  22. *
  23. * \endcode
  24. *
  25. * \author Miguel Luis ( Semtech )
  26. *
  27. * \author Gregory Cristian ( Semtech )
  28. *
  29. * \author Daniel Jaeckle ( STACKFORCE )
  30. *
  31. * \defgroup LORAMACCLASSB LoRa MAC Class B configuration
  32. * This header file contains parameters to configure the class b operation.
  33. * By default, all parameters are set according to the specification.
  34. * \{
  35. */
  36. #ifndef __LORAMACCLASSBCONFIG_H__
  37. #define __LORAMACCLASSBCONFIG_H__
  38. #ifdef __cplusplus
  39. extern "C"
  40. {
  41. #endif
  42. /*!
  43. * Defines the beacon interval in ms
  44. */
  45. #define CLASSB_BEACON_INTERVAL 128000
  46. /*!
  47. * Beacon reserved time in ms
  48. */
  49. #define CLASSB_BEACON_RESERVED 2120
  50. /*!
  51. * Beacon guard time in ms
  52. */
  53. #define CLASSB_BEACON_GUARD 3000
  54. /*!
  55. * Beacon window time in ms
  56. */
  57. #define CLASSB_BEACON_WINDOW 122880
  58. /*!
  59. * Beacon window time in numer of slots
  60. */
  61. #define CLASSB_BEACON_WINDOW_SLOTS 4096
  62. /*!
  63. * Ping slot length time in ms
  64. */
  65. #define CLASSB_PING_SLOT_WINDOW 30
  66. /*!
  67. * Maximum allowed beacon less time in ms
  68. */
  69. #define CLASSB_MAX_BEACON_LESS_PERIOD 7200000
  70. /*!
  71. * Delay time for the BeaconTimingAns in ms
  72. */
  73. #define CLASSB_BEACON_DELAY_BEACON_TIMING_ANS 30
  74. /*!
  75. * Default symbol timeout for beacons and ping slot windows
  76. */
  77. #define CLASSB_BEACON_SYMBOL_TO_DEFAULT 8
  78. /*!
  79. * Maximum symbol timeout for beacons
  80. */
  81. #define CLASSB_BEACON_SYMBOL_TO_EXPANSION_MAX 255
  82. /*!
  83. * Maximum symbol timeout for ping slots
  84. */
  85. #define CLASSB_PING_SLOT_SYMBOL_TO_EXPANSION_MAX 30
  86. /*!
  87. * Symbol expansion value for beacon windows in case of beacon
  88. * loss in symbols
  89. */
  90. #define CLASSB_BEACON_SYMBOL_TO_EXPANSION_FACTOR 2
  91. /*!
  92. * Defines the default window movement time
  93. */
  94. #define CLASSB_WINDOW_MOVE_DEFAULT 2
  95. /*!
  96. * Defines the maximum time for the beacon movement
  97. */
  98. #define CLASSB_WINDOW_MOVE_EXPANSION_MAX 256
  99. /*!
  100. * Defines the expansion factor for the beacon movement
  101. */
  102. #define CLASSB_WINDOW_MOVE_EXPANSION_FACTOR 2
  103. #ifdef __cplusplus
  104. }
  105. #endif
  106. #endif // __LORAMACCLASSBCONFIG_H__