Amaury Posted June 9, 2007 Report Share Posted June 9, 2007 I am logging data in binary files by creating typedefs which bundle my relevant data and then writing these straight to binary files. I am running into issues that I can not change my typedefs without breaking all of my log readers. This is mostly inevitable, but there should be some clever ways to encapsulate some meta data in the file and create update mechanisms for older logs. I would like to be able to write a VI that updates from typedef A to its new revision typedef B. The problem is that if typedef A depends on typedef C and tyepdef C get modified, it is not enough so save a copy of typedef A, a copy of typedef C must be made (typedef D) and typedefs A and B must be made to point to D and C respectively in order to be able to have separate typedefs. Perhapse there exists some tool that may help me with the situation. Otherwise, I was going to try and create a typedef database utility. Indexed by type descriptor this database would contain archives of any unique typedef it was ever presented with stored in its entierty (where entirety implies the whole typedef hierachy has been duplicated and saved off). I am looking for a way to programatically save a whole typedef hierarchy with unique names. I hope this makes sense! Thanks Quote Link to comment
Yair Posted June 9, 2007 Report Share Posted June 9, 2007 You might wish to read this. Quote Link to comment
Michael Aivaliotis Posted June 10, 2007 Report Share Posted June 10, 2007 The key is the generic file header that can always be accessible by any reader. Once you determine which version of the file you are reading, you would then need to select the appropriate datatype to use. Quote Link to comment
Ton Plomp Posted June 10, 2007 Report Share Posted June 10, 2007 QUOTE(Michael_Aivaliotis @ Jun 9 2007, 07:28 PM) The key is the generic file header that can always be accessible by any reader. Once you determine which version of the file you are reading, you would then need to select the appropriate datatype to use. How long would it take before: Tomi says LVOOP Aristos says LVOOP Herbert says TDMS ..... Do a search for a thread called 'http://forums.lavag.org/So-many-binary-file-options-t5506.html' target="_blank">so many binary options' Ton Quote Link to comment
Yair Posted June 10, 2007 Report Share Posted June 10, 2007 QUOTE(tcplomp @ Jun 9 2007, 08:41 PM) How long would it take before:Tomi says LVOOP Aristos says LVOOP Herbert says TDMS ..... :laugh: Quote Link to comment
Aristos Queue Posted June 10, 2007 Report Share Posted June 10, 2007 LabVIEW classes know how to translate old versions of themselves into the current data format. Typedefs do not have this expertise. So if you flatten an instance of a LV class, then edit the class (add a field, reorder the fields, delete a field), and then read the old version, the same changes that you made to the class (add a field, reorder fields, delete a field) will be applied to the read data in order to make it match the new version (any added field is added with the default value). QUOTE(tcplomp @ Jun 9 2007, 12:41 PM) How long would it take before:Aristos says LVOOP A bit over 4 hours... Quote Link to comment
Michael Aivaliotis Posted June 11, 2007 Report Share Posted June 11, 2007 QUOTE(Aristos Queue @ Jun 9 2007, 02:35 PM) LabVIEW classes know how to translate old versions of themselves into the current data format. Does this work in an executable? Quote Link to comment
Aristos Queue Posted June 12, 2007 Report Share Posted June 12, 2007 QUOTE(Michael_Aivaliotis @ Jun 9 2007, 08:17 PM) Does this work in an executable? Yes. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.