jMDFLib Wiki
This is a small Java library which reads MDF Files up to Version 3.00
Status: Alpha
Brought to you by:
looking_eye
If you would like to join the (as for now one-man-)team, feel free to contact me (dirk.herrling@tu-clausthal.de). There are several tasks at hand and I could use some assistance.
There is a very limited interface to the Lib, called MDFLib with a matching implementation called MDF.
public interface MDFLib {
/**
* Load an MDF File.
* @param file the file to be read
*/
public void loadMDFFile(File file);
/**
* @return A Vector<String> of all signal short names found in the MDF file
*/
public Vector<String> signalShortNames();
/**
* @return a Vector<CNBlock> of all channels in the MDF file
*/
public Vector<CNBlock> getAllCNBlock();
}
This interface will be extended at some point in time. If you need read access to other values, you might want to use the Lib-Interface. This represents the whole MDF-file as a Java object tree. You can see the MDF file structure in the MDF format specification.
So if you instantiate Lib in the following manner, you will be able to walk through the tree, as shown below.
String path = "res/SWMT00.dat";
Lib lib = new Lib(new File(path));
lib.init();
HDBlock hdBlock = lib.getHdBlock();
I am
and you can download jMDFLib