Message.cs 874 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace MECF.Framework.Common.Communications
  7. {
  8. public abstract class MessageBase
  9. {
  10. public bool IsResponse { get; set; }
  11. public bool IsAck { get; set; }
  12. public bool IsError { get; set; }
  13. public bool IsEvent { get; set; }
  14. public bool IsComplete { get; set; }
  15. public bool IsFormatError { get; set; }
  16. public bool IsBusy { get; set; }
  17. public bool IsNak { get; set; }
  18. public int MutexTag { get; set; }
  19. }
  20. public class AsciiMessage : MessageBase
  21. {
  22. public string RawMessage { get; set; }
  23. public string[] MessagePart { get; set; }
  24. }
  25. public class BinaryMessage : MessageBase
  26. {
  27. public byte[] RawMessage { get; set; }
  28. }
  29. }