NXM Help FILES

From ICE Enterprises
Jump to navigation Jump to search
Go to the full list of NXM Help pages.

FILES - NeXtMidas file system support

The NeXtMidas environment was designed to provide a natural interace to any type of file on a system. The STATUS and DATALIST commands will work with any file supported on the system. File names are case sensitive, and should not have embedded white space.

The filename extension is used to determine the file group, where each group is handled by a different subclass of the BaseFile class. The file groups include Text, Image, Shape, Zip, Jar, and Midas Data files.

The underlying source of the data bytes is defined by the URL prefix. Each URL prefix is handled by a different subclass of the IOResource class. These include file:, http:, udp:, ram:, nfile:, stp:.

Auxes - How NeXtMidas finds files.

An AUX, or auxiliary, may be a directory or a URL. A collection of AUXES, the "read AUX list" is searched when looking for a file.

Auxes may be short strings or numbers in string form. Since X-Midas auxes must be numbers, many installations that use both will use numbers on the NeXtMidas side for consistency.

Example aux table:

WRITE - Aux name where new files are to be written      
READ  - Comma seperated list of aux names to search
CWD   - The current working directory
HOME  - Home path, where user (%) macros are kept.
DAT   - The SYS option tree DAT area.
RAM   - RAM memory 
1     - User path (i.e. /user/midas/+/)
9     - ICE RamDisk
99    - The X-Midas install ../xm/dat/ area
WEB   - A WEB URL, configure this for your server

READ and WRITE are special reserved names that define the list of aux names currently in use.

Examples:
TBD

Groups - Definition of Midas file groups.

File groups in NextMidas consist of:
  1. Data files (1000, 2000, ...)
  2. Image Files (.GIF, .TIF,...)
  3. Text Files (.XML, .TXT,...)

Resources - Definition of file resources

Types - Types of Midas Data files

There are a number of file types supported by NeXtMidas including:
Type 1000, 2000, 3000, 5000, ...
Type1000 - One dimensional data 
Type2000 - Two dimensional data frames
Type3000 - Record Oriented data structures
Type4000 - Multiple Key=Value records
Type5000 - Record Oriented with reference frame information
Type6000 - Extended type3000 format

Type1000 - One dimensional data

This is typical for samples vs time data.

Type2000 - Two dimensional data frames

This is typical for samples vs time data.

Type3000 - Record Oriented data structures

This is typical for flat database files.

Type4000 - Multiple Key=Value records

This is typical for non-flat database files, or data with event keywords.

Type5000 - Record Oriented with reference frame information

This is typical for positions or orbit tracks to be plotted on maps.

Type6000 - Extended type3000 format

This is typical for flat database files.

TRIMMERS - Using trimmers to thin files in-line.

Trimmers of the form (offset1:offset2), where OFFSET1 is INCLUSIVE and OFFSET2 is EXCLUSIVE may be appended to a file name to indicate a subset of data within the file. Note that X-Midas used the form (start:end). This is a confusing construct with zero based accounting.

See User's Guide -> Files -> File Trimmers for more information and examples.

For example;

nM> noop datafile(3:10) outputfile

creates a file consisting of 7 elements starting at element 3 and including element 9. The THIN command uses the same principal of inclusive and exclusive offsets. See explain on THIN for more examples.

If the second arg starts with a "+", it is a relative distance to offset2, or the length of the segment.

If an argument starts with a "-", it is the offset relative to the end of the file. Thus file(-1:+1) refers to the last element of the file.

The trimmers can be registered in abscissa addressing by preceding the value with a tilde. By default, they are indexed. For instance:

nM> fft datafile(0:~10) outputfile

will FFT the first 10 seconds of the file, where

nM> fft datafile(~1:~10) outputfile

will FFT 10 seconds of the file starting 1 second into the file, where

If the arg to the left of the : is blank, the beginning of file is used. If the arg to the right of the : is blank, the end of file is used.

Trimmers must come before qualifiers. For example,

nM> noop datafile(0:nels){aux=cwd} outputfile

uses the AUX qualifier to indicate the file to be used is in the CWD (current working directory) AUX.