state_machine_config.proto 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. syntax = "proto3";
  2. option optimize_for = LITE_RUNTIME;
  3. package fsmproto;
  4. message Action {
  5. string type = 1;
  6. map<string, string> params = 2;
  7. }
  8. message ConditionValue {
  9. string param_name = 1;
  10. string symbol = 2;
  11. string compare_value = 3;
  12. }
  13. message ConditionData {
  14. repeated ConditionValue values = 1;
  15. }
  16. message Transition {
  17. string src = 1;
  18. string dst = 2;
  19. string event = 3;
  20. repeated ConditionData condition = 4;
  21. repeated Action before_switch_actions = 5;
  22. repeated Action after_switch_actions = 6;
  23. }
  24. message State {
  25. string name = 1;
  26. repeated Action entry = 2;
  27. repeated Action idle = 3;
  28. repeated Action exit = 4;
  29. string fsm_name = 5;
  30. string state_delegate_key = 6;
  31. }
  32. message Param {
  33. string type = 1;
  34. string default_value = 2;
  35. }
  36. message StateMachine {
  37. string init_state_name = 1;
  38. string machine_type = 2;
  39. map<string, Param> params = 3;
  40. repeated State states = 4;
  41. repeated Transition transitions = 5;
  42. }