I have a record that contains multiple bytes/arrays of bytes:
type
TRdmPacket = record
sc: byte;
subSc: byte;
msgLength: byte;
destUID: array[0..5] of byte;
srcUID: array[0..5] of byte;
transNum: byte;
portID: byte;
msgCount: byte;
subDevice: array[0..1] of byte;
cc: byte;
pid: array[0..1] of byte;
pdl: byte;
end;
I have a single record of this type and I need to loop over the bytes inside (to create a simple checksum by adding each byte to the checksum). Is there a simple way to do this in a loop or will I need to go over each element inside the record individually?