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.

56 lines
886 B

4 years ago
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. #ifndef FSM_COMMON_H
  9. #define FSM_COMMON_H
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. // error values
  14. /**
  15. * @enum fsm_error
  16. *
  17. * @brief TODO
  18. *
  19. */
  20. typedef enum _fsm_error {
  21. // these error values are corresponding to
  22. // PEP_SYNC_STATEMACHINE_ERROR - value
  23. invalid_state = -2,
  24. invalid_event = -3,
  25. invalid_condition = -4,
  26. invalid_action = -5,
  27. inhibited_event = -6,
  28. cannot_send = -7,
  29. // out of memory condition
  30. out_of_memory = -128,
  31. } fsm_error;
  32. // common
  33. enum {
  34. End = -1,
  35. None = 0,
  36. Init = 1,
  37. Extra = 128 // messages will be below this ID
  38. };
  39. enum {
  40. SHUTDOWN = 0
  41. };
  42. #ifdef __cplusplus
  43. }
  44. #endif
  45. #endif