123456789101112131415161718192021222324252627282930313233343536373839 |
- using Edge.Core.Parser.BinaryParser.Util;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Wayne_Pump_Dart.MessageEntity.Outgoing
- {
-
-
-
-
-
- public class PriceUpdateRequest : MessageBase
- {
-
-
-
-
-
-
- public PriceUpdateRequest(byte address, byte blockSeqNumber, IEnumerable<int> newPrices)
- {
- if (newPrices.Any(p => p.ToString().Length > 6)) throw new ArgumentException("Price must <= 6 digits");
- base.Adrs = address;
- base.BlockSeqNumber = blockSeqNumber;
- base.ControlCharacter = ControlCharacter.DATA;
- base.TransactionDatas = new List<TransactionData>()
- {
- new TransactionData()
- {
- TransactionNumber = 0x05,
- RawData = newPrices.Select(p=>p.GetBCDBytes(3)).SelectMany(s=>s).ToList()
- }
- };
- }
- }
- }
|