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.

53 lines
844 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. /**
  2. * @file src/fsm_common.h
  3. * @brief Generate state machine code
  4. * @license GNU General Public License 3.0 - see LICENSE.txt
  5. * @copyleft (c) 2017-2018, pEp foundation
  6. * @author Volker Birk
  7. */
  8. #pragma once
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. // error values
  13. /**
  14. * @enum fsm_error
  15. *
  16. * @brief TODO
  17. *
  18. */
  19. typedef enum _fsm_error {
  20. // these error values are corresponding to
  21. // PEP_SYNC_STATEMACHINE_ERROR - value
  22. invalid_state = -2,
  23. invalid_event = -3,
  24. invalid_condition = -4,
  25. invalid_action = -5,
  26. inhibited_event = -6,
  27. cannot_send = -7,
  28. // out of memory condition
  29. out_of_memory = -128,
  30. } fsm_error;
  31. // common
  32. enum {
  33. End = -1,
  34. None = 0,
  35. Init = 1,
  36. Extra = 128 // messages will be below this ID
  37. };
  38. enum {
  39. SHUTDOWN = 0
  40. };
  41. #ifdef __cplusplus
  42. }
  43. #endif