Trying to understand file streaming, i'm using POLs, CFile class, which is basically a thin wrapper over the streaming api.
My usage of these calls is very basic, i first do a call like: Open(0,"MyFile",'MYID','DATA',fileModeReadWrite); (FileOpen) ..then i read serial data in an event handler and write it out: Write(pData,nCount); (FileWrite) ..and when i'm done, i close the file: Close(); (FileClose) ...seems simple, and it does create a file, but not what i expected. My test created a 51k pdb file. I thought a streaming PDB would be one large record chunk of pure data, but that is not the case. It created 13 records of 4k (4096 bytes) each and there was some overhead data in each record. The 1st record looked like: 'D','B','L','K',0x00,0x00,0x10,0x00, 16 bytes date stamp, then my user data Subsequent records looked like this: 2nd record: user data,'D','B','L','K',0x00,0x00,0x10,0x00,user data,... 3rd record: user data,user data,'D','B','L','K',0x00,0x00,0x10,0x00,user data,... 4th record: user data,user data,user data,'D','B','L','K',0x00,0x00,0x10,0x00,user data,... ..the odd part is "'D','B','L','K',0x00,0x00,0x10,0x00" shows up in each record and increases the offset in each subsequent record by 1. This is how my conduit reads the record (i also used PDBingo and eyeballed the hex file to check this is how data is stored and thats what i see) ...is this correct ? ...i can parse out this overhead, but looks to be more of a pain then i thought it would be. ..thanks -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
