STATUS
Revision as of 18:05, 27 April 2020 by ConvertBot (talk | contribs) (outputs the header information of a Midas or other file types)
outputs the header information of a Midas or other file types
<file> - name of file (Midas BLUE, text, shape, image,...) Outputs the header of the file named <file> to the terminal. Typically, this is used on Midas BLUE files but in NeXtMidas one can status any file that extends nxm.sys.lib.BaseFile and implements a listHeader method. For example: nM> status world.shp works because nxm.sys.lib.ShapeFile has a listHeader method. Other examples of classes with this ability are: * BaseFile.java - The default implementation * CsvFile.java - For CSV files (CSV) * DataFile.java - For Midas files (TMP,PRM) * DbfFile.java - Companions to shape files (DBF) * ImageFile.java - Image files: JPEG, PNG,... * JarFile.java - Java Archive (JAR) files * TextFile.java - Text files (TXT) * ZipFile.java - Compressed Zip Files (ZIP) If the user supplies other arguments of the form TAG=LABEL, these values will be written to the results table and the terminal output is skipped. NOTE: For most of the tags (except some legacy tags to match X-Midas), you will not find them in the STATUS intrinsic itself. Java reflection is used to find any "get" method in the class. For instance, nM> stat world.shp type=xxx finds the getType method in nxm.sys.lib.ShapeFile. Where appropriate, digraphs or trigraphs can be used to provide shorter syntax. For instance, the NC tag finds the method getNumberComponents in DataFile for type 5000 files. The NSR tag finds the method getNumberSubRecords in DataFile for type 3000 files. While short tags are convenient from the command line, generally, it is recommended that the full method name is used in macros. For 3000 and 5000 record oriented files, the record formats are also shown. For 5000 files, the frame of reference and any information pertinent to the frame is displayed. Common tags in the DataFile class (all Midas BLUE files) are: TAG Longname Description ------------------------------------------------------------------------------ TYPE TYPE Type of file SIZE SIZE Size in logical elements SZ SIZE Same as SIZE. Special tag for X-Midas backward compatibility DS DATASTART Data start in bytes (usually 512) DR DATAREP Data representation FORM FORMAT Data Format -- XUNITSNAME X or Abscissa units name (PREFERRED) XS XSTART X or Abscissa start XD XDELTA X or Abscissa delta -- YUNITSNAME Y or Abscissa units name (PREFERRED) YS YSTART Y or Secondary start YD YDELTA Y or Secondary delta TC TIMECODE Timecode also available through tags are: TAG Longname Description ------------------------------------------------------------------------------ FS FRAMESIZE Frame size RL RECLENGTH Record length (type 3000/5000) NSR NUMBERSUBRECORDS Number of subrecords (3000/5000) SR(NAME) N/A Subrec specs table by name (PREFERRED)(3000/5000) SR(i) N/A Subrec specs table {NAME,FORMAT,OFFSET}: i=1..n NC NUMBERCOMPONENTS Number of components (type 5000) RF REFERENCEFRAME Frame of Reference (type 5000) C(i) N/A Component specs table: i=1..n {NAME,FORMAT,TYPE,UNITS} QW(i) N/A One-based version of QUADWORD(i) for legacy X-Midas compatibility: i=1..n -- QUADWORD(i) Quadword value: i=0..n-1 (type 5000) QW(0)=ref frame QW(1)=altitude QW(2)=latitude, QW(3)=longitude QW(4)=azimuth QW(5)=elevation, QW(6)=roll, QW(7)=unused QW(8)=unused, QW(9)=epoch_year QW(10)=epoch_sec QW(11)=epoch_hour_angle common PIPE tags are: TAG Longname Description ------------------------------------------------------------------------------ PS PIPESIZE Pipesize in bytes INB INBYTE Pipe input or writer byte OUTB OUTBYTE Pipe output or reader byte DEPRECATED tags: TAG Longname Description ------------------------------------------------------------------------------ XU XUNITS X or Abscissa units number (Use XUNITSNAME instead) YU YUNITS Y or Secondary units number (Use YUNITSNAME instead) The tags may be used in conjunction with the file command. See example below. The EXIST qualifier may be used to change the behavior of the exists algorithm. For example, nM> status http://localhost/nextmidas/nxm/sys/dat/world.prm{EXIST=NONE} turns off explicit existence checking, i.e. assume file exists. The EXIST qualifiers are CGI,STATUS,LIST and NONE and ALL may be used to select no or all options, respectively. See help qualifiers for more details. Examples: * Put the frame size in result NFRAME. nM> status myfile framesize=nframe * Test for a specific Midas file type and format. nM> file open/d mytag testxy3000 nM> if mytag.type eq 3000 and mytag.format eqs "NH" then * List information about the NeXtMidas version.txt text file nM> stat ^{ENV.NMROOT}/nxm/sys/version.txt TextFile : file:/home/midas/nxmxxx//nxm/sys/version.txt Size : 457.0 bytes Switches: /ALL List additional main header fields for debugging (since 3.1.1) /D=n List n elements of data after the header (using DATALIST) /DATA=n Equivalent to /D (since 2.7.3) /K Equivalent to /KEY /KEY Show keywords in the main and extended headers /PREC=n Equivalent to /PRECISION= (since 3.3.0) /PRECISION=n Used only with /TIME to specify the number of decimal places to display for timeline entries. (since 3.3.0) [DEF=3] /T Equivalent to /TIME /TIME Show a dump of any TimeLine keywords See Also: FILE, HEADERMOD, nxm.sys.lib.DataFile, nxm.sys.lib.BaseFile