AllowedNozzleNumbersRequest.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. /// <summary>
  9. /// NOZ1-n specifies the logical nozzle numbers that is allowed for filling.
  10. /// The transaction is used when a pump is authorized.
  11. /// E.g. if nozzle 1-3 is allowed, the transaction contains 1, 2, 3.
  12. /// </summary>
  13. public class AllowedNozzleNumbersRequest : MessageBase
  14. {
  15. /// <summary>
  16. ///
  17. /// </summary>
  18. /// <param name="address"></param>
  19. /// <param name="blockSeqNumber"></param>
  20. /// <param name="nozzleLogicalNumbers">range from 0x00 to 0x0F</param>
  21. public AllowedNozzleNumbersRequest(byte address, byte blockSeqNumber, IEnumerable<byte> nozzlePhysicalIds)
  22. {
  23. base.Adrs = address;
  24. base.BlockSeqNumber = blockSeqNumber;
  25. base.ControlCharacter = ControlCharacter.DATA;
  26. base.TransactionDatas = new List<TransactionData>()
  27. {
  28. new TransactionData()
  29. {
  30. TransactionNumber = 0x02,
  31. RawData = nozzlePhysicalIds.ToList()
  32. }
  33. };
  34. }
  35. }
  36. }