IEntity.cs 631 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Aitex.Core.RT.Fsm
  6. {
  7. public interface IEntity
  8. {
  9. bool Initialize();
  10. void Terminate();
  11. void PostMsg<T>(T msg, params object[] args) where T : struct;
  12. bool Check(int msg, out string reason, params object[] args);
  13. }
  14. public interface IModuleEntity: IEntity
  15. {
  16. bool IsInit { get; }
  17. bool IsBusy { get; }
  18. bool IsIdle { get; }
  19. bool IsError { get; }
  20. int Invoke(string function, params object[] args);
  21. bool CheckAcked(int msg);
  22. }
  23. }