Poll.cs 668 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Wayne_Pump_Dart.MessageEntity.Outgoing
  7. {
  8. public class Poll : MessageBase
  9. {
  10. public Poll(byte address, byte blockSeqNumber)
  11. {
  12. base.Adrs = address;
  13. base.BlockSeqNumber = blockSeqNumber;
  14. base.ControlCharacter = ControlCharacter.POLL;
  15. }
  16. public override string ToLogString()
  17. {
  18. return "(Adrs: 0x" + this.Adrs.ToString("X").PadLeft(2, '0') + ", SeqNo: 0x"
  19. + this.BlockSeqNumber.ToString("X").PadLeft(2, '0') + ")";
  20. }
  21. }
  22. }