LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dr. Damien's Development - Object Based File I/O VI - Implementation I

This time, a few tweaks to design and start implementation of the base classes.

 

Top Level Design

 

FileIOClassDiagram.png

 

  • Location — Add Open, OpenAs, and Close methods to open and close locations in the file. Open is only usable on self–describing files. OpenAs specifies the data type on non–self–describing files and overrides the data type (if possible) on self–describing files.
  • Data — Moved data into children so that they could contain an array of instances of their parents.
  • DataArray and DataScalar — Added containedData and accessors.
  • Processing — Added internal data to determine whether the processing is on read, write, or both.

In thinking about the location format, I came to the conclusion that the hierarchical path format given last week cannot be used for a raw binary file. The only information of import is the location in the file. This can be specified in bytes or numbers of a certain data type, but a “path” is not appropriate. I could coerce it into some sort of path format, but this would be equivalent to creating a formatted binary file, such as TDMS or HDF5, and that is not the intent of this exercise. The path format is appropriate for the other file types.

 

Attached is the start of an implementation of the base classes. All base classes are all created and inheritance is in place. Base icons have been created. The icons file attached includes these so you can use them in your icon creation, as well (feel free to do a nicer job 😉 ). Note that the icons include an area at the bottom to enable customization for the file type. Only one or two of the methods have been created.

 

Next time, I will try to finish off the implementation of the base classes. If time permits, I will start on a vertical slice through the binary file type. After that, the next file type is up for discussion. INI, TDMS, ZIP, HDF5, ??? What would you like to see implemented?

 

Previous Posts In This Series:

  1. Representative File Types with conversation on design
  2. Requirements
  3. Top Level Design
  4. Design II
  5. Design III
Message 1 of 2
(3,255 Views)

Get the next one in this series here.

Message 2 of 2
(3,144 Views)