示例#1
0
 public SetRstrPacket([NotNull] PhysicalAddress mac, byte scoreboardType, uint messageId,
                      [NotNull] RstrData data)
 {
     _mac            = mac;
     _scoreboardType = scoreboardType;
     _messageId      = messageId;
     _data           = data;
 }
示例#2
0
        public AnsRstrPacket(byte[] bytes)
        {
            SubArray <byte> mac = new SubArray <byte>(bytes, 0, 6);

            _mac            = new PhysicalAddress(mac.ToArray());
            _scoreboardType = bytes[7];
            SubArray <byte> messageId = new SubArray <byte>(bytes, 8, 4);

            _messageId = BitConverter.ToUInt32(messageId.ToArray(), 0);
            SubArray <byte> data = new SubArray <byte>(bytes, 12, RstrData.DataLength);

            _data = new RstrData(data.ToArray());
        }