ftp.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version="1.0" ?>
  2. <fsm fsm_version="1.3"
  3. idle_work="1" allow_actions="1"
  4. init="init" final="unsafe">
  5. <state id="init">
  6. <event name="CheckParameters" type="boolean">
  7. <next result="true" state="offline" />
  8. <next result="false" state="init" />
  9. </event>
  10. <!--event name="Progress">
  11. <next action="CheckParameters" />
  12. </event-->
  13. </state>
  14. <state id="offline">
  15. <event name="CheckParameters" type="boolean">
  16. <next result="true" state="offline" />
  17. <next result="false" state="init" />
  18. </event>
  19. <event name="Connect" type="boolean">
  20. <next result="true" state="online" />
  21. <next result="false" state="unsafe" />
  22. </event>
  23. <event name="Progress">
  24. <next action="Connect" />
  25. </event>
  26. </state>
  27. <state id="online">
  28. <event name="Close" type="boolean">
  29. <next result="true" state="offline" />
  30. <next result="false" state="unsafe" />
  31. </event>
  32. <event name="Login" type="boolean">
  33. <next result="true" state="live" />
  34. <next result="false" state="unsafe" />
  35. </event>
  36. <event name="Progress">
  37. <next action="Login" />
  38. </event>
  39. </state>
  40. <state id="live">
  41. <event name="Close" type="boolean">
  42. <next result="true" state="offline" />
  43. <next result="false" state="unsafe" />
  44. </event>
  45. <event name="Chdir" type="boolean">
  46. <next result="true" state="ready" />
  47. <next result="false" state="unsafe" />
  48. </event>
  49. <event name="Get" type="int">
  50. <next result="FTP_FINISHED" state="live" />
  51. <next result="FTP_FAILED" state="unsafe" />
  52. <next result="FTP_MOREDATA" state="active" />
  53. </event>
  54. <event name="Put" type="int">
  55. <next result="FTP_FINISHED" state="live" />
  56. <next result="FTP_FAILED" state="unsafe" />
  57. <next result="FTP_MOREDATA" state="active" />
  58. </event>
  59. <event name="Progress">
  60. <next action="Chdir" />
  61. </event>
  62. </state>
  63. <state id="ready">
  64. <event name="Get" type="string">
  65. <next result="FTP_FINISHED" state="live" action="Close" />
  66. <next result="FTP_MOREDATA" state="active" />
  67. <next result="FTP_FAILED" state="unsafe" />
  68. </event>
  69. <event name="Progress">
  70. <next action="Get" />
  71. </event>
  72. </state>
  73. <state id="active">
  74. <event name="close" type="boolean">
  75. <next result="true" state="offline" />
  76. <next result="false" state="unsafe" />
  77. </event>
  78. <event name="Continue" type="int">
  79. <next result="FTP_FINISHED" state="live" action="Close" />
  80. <next result="FTP_FAILED" state="unsafe" />
  81. <next result="FTP_MOREDATA" state="active" />
  82. </event>
  83. <event name="Progress">
  84. <next action="Continue" />
  85. </event>
  86. </state>
  87. <state id="unsafe" type="void" />
  88. </fsm>