Menu

Home

looking_eye

Welcome to our wiki.

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.

Known Limitations of the Lib (aka ToDo)

  • Some block types are not yet implemented (e.g. SRBlock)
  • Big Endian byte order is only sloppy implemented and entirely untested (as I have no sample files)
  • Data in DataBlock, that overrides default endianess is not implemented
  • Only sorted MDF files are supported at the moment
  • The Exception-concept lacks a concept ;-). At some points NotImplementedException is thrown, at others a message is sent to System.err..
  • Datatypes, except UINT1 (used for bools), that do not begin at the start of a byte but at a bitposition other than the start can not be read yet
  • Strings in TXBlocks are read as long as the blocklength of the TXBlock is (they are not checked for a trailing 0-byte, as proposed by the Spec.
  • many conversion formulas are missing
  • much stuff is untested

How to use the Lib

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();

What I want to do except fixing

  • a samll data viewer, using JFreeChart is my next step
  • Code-cleanup (some blocks are read in the respecting class, some blocks are read in the class, which has the pointer to the block - this has to be refactored)
  • There is lack of a logging-concept (Log4j) and there are no unit-tests.

I am

Project Admins:

and you can download jMDFLib