OK, after a bit more work I have identified three header types. Type1 and Type2 are probably obsolete, but the files are loaded just fine by ElanScan. Type3 is much more directly useful and contains the raw ECM data. I am attaching a few of the older files (circa 2003) for you to examine. One is original, one has a comment added and resaved, and the third has the comment removed and saved. Take a look at the binary for these!
Here is how the formatting looks to me:
File Headers:
I have identified three types of file headers:
Type1 is 24 (0x0018) bytes long and contains no comment. The frame size byte is at index 0x17.
Type2 is 280 (0x0118) bytes long and includes a 256 byte null-padded field. The frame size byte is at index 0x117.
-- The header is prefixed by Uint32 DataByteCount and Uint32 FileID (unknown usage)
-- The DataByteCount must be multiplied by 8 and have the header length added (0x0011 or 0x0111) to equal the file size
-- The last byte of the header is the frame size identifier byte.
-- The Type2 comment size byte is at index 0x08, and the (256-byte null padded) comment text field immediately follows
-- Type1 has the sequence 0x00, 0x40, 0x00, 0x00 at index 8. I use this to seperate type 1 and 2 altho DataByteCount could also be used.
-- The data frame is composed of multiple 8-byte chunks of (currently) unknown format.
-- Each 8-byte chunk apparently represents one byte with the exception of the timestamp.
Type3 is 273 (0x0111) bytes long, and is prefixed by Uint32 DataByteCount and Uint32 FileID (assigned == 0001;)
-- The frame size byte is at index 0x109.
-- The comment size byte is at index 0x08, and the (256-byte null padded) comment text field immediately follows
If a Type1 file with no existing comment is edited to add comments is then saved in ElanScan, it is converted to type2.
If a Type2 or Type3 file is edited by ElanScan and the comments zero'd out and the file saved, the comments
still exist in the file but the length specifier is set to zero and they no longer display in ElanScan!
It seems that Type1 files are always converted to Type2 when resaved with current software versions
--For Type3, the data frame is the raw ALDL bytes minus its 3-byte header and checksum PLUS an 8-byte timestamp at the end. The timestamp is a little-endian IEEE double containing the time in seconds.
For the Elan, the ALDL data payload size is 63 bytes. The timestamp is an additional 8 bytes for a total frame size of 71 (0x47) bytes.
Gary
edited 07-feb-2018: corrected type3 frame timestamp information and a few typos
Drive home log 2.zip
You do not have the required permissions to view the files attached to this post.