CompleteDataFn
From University of Washington - Ubicomp Research Page
Jump to navigationJump to search
parse_uwar_dir does not write data files out to MATLAB binary data files. Instead data files are written to binary blobs (sensorname.bin) and associated ASCII .meta files (sensorname.meta). Meta files provide a description of the binary data blob and the .bin files contain a data only binary blob.
completeDataFn
-
There are two versions of completeDataFn an older version '@completeDataFn' and the newer version 'completeDataFn.m'
@completeDataFn/ (which is a matlab class directory)
-
This is an older version of the code that reads in the .bin and .meta data files and makes them available as memory mapped data objects. This code works with all recent versions of Matlab R2006 and on. It handles only data members that are coded into it. It has functions for mapping the data and reading in appropriate meta data about the data objects.
completeDataFn.m
-
This is a re-write that does away with the older version. It analyzes data directories and loads what appears to be good data .bin/.meta data pairs. This version requires Matlab R2008b (it will not work with older versions) because it uses hash tables, which they finally just added in. It also has some knowledge of what MSB2 data directories look like and modifies them to do away with an annoying corner case where .accel, .mag, etc data members have to be presented as 1 data object but in reality are 3 different physical binary blob files. It does this by REWRITING new .bin and .meta data files that store the XYZ data as a single unified binary blob.
It also supports a user selectable memory model. @completeDataFn used memmapfile only and all files were mapped on object creation. completeDataFn.m's default behavior is to not map data until you ask for it, which speeds things up and avoids problems with running out of file handles. It also has user selectable memory modes: (see the help for the function) <matlab>% '-globalmemorymode', 'mode' % default memory loading mode for sensors selected from: % - 'default' memmap on first access % - 'memmap' memmap at object creation time % - 'load' load data on first access % - 'preload' load data at object creation % - 'auto' memmap or load on first access using memmapthreshold % - 'preauto' memmap or load at object creation using memmapthreshold </matlab>