coap_timer.h 651 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _COAP_TIMER_H
  2. #define _COAP_TIMER_H 1
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include "node.h"
  7. #define SYS_TIME_MAX (0xFFFFFFFF / 1000)
  8. #define COAP_DEFAULT_RESPONSE_TIMEOUT 2 /* response timeout in seconds */
  9. #define COAP_DEFAULT_MAX_RETRANSMIT 4 /* max number of retransmissions */
  10. #define COAP_TICKS_PER_SECOND 1000 // ms
  11. #define DEFAULT_MAX_TRANSMIT_WAIT 90
  12. void coap_timer_elapsed(coap_tick_t *diff);
  13. void coap_timer_setup(coap_queue_t ** queue, coap_tick_t t);
  14. void coap_timer_stop(void);
  15. void coap_timer_update(coap_queue_t ** queue);
  16. void coap_timer_start(coap_queue_t ** queue);
  17. #ifdef __cplusplus
  18. }
  19. #endif
  20. #endif