Example #1
0
 internal override IEnumerable<byte> AsBytes()
 {
     List<byte> list = new List<byte>();
     list.Add(0x02);
     list.Add(0x00);
     list.Add(0x00);
     list.Add((byte)RecordType);
     list.Add((RecordType == HexRecordType.ExtendedLinearAddress) ? (byte)(Address >> 24) : (byte)(Address >> 12));
     list.Add((RecordType == HexRecordType.ExtendedLinearAddress) ? (byte)(Address >> 16) : (byte)(Address >> 4));
     list.Add(list.Checksum());
     return list;
 }
Example #2
0
        internal override IEnumerable<byte> AsBytes()
        {
            List<byte> list = new List<byte>();
            list.Add((byte)Data.Length);
            list.Add((byte)(Address >> 8));
            list.Add((byte)(Address));
            list.Add((byte)RecordType);
            foreach (var b in Data)
                list.Add(b);
            list.Add(list.Checksum());

            return list;
        }