>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  INGEST_BINDATA
Libraries

INGEST_BINDATA

INGEST_BINDATA

Name


      INGEST_BINDATA

Purpose


      Ingest binary data in a byte array into a structure.

Category


Calling Sequence


      s = ingest_bindata(text, bindata)

Inputs


      text = String array with data description. in
      bindata = Byte array with binary data. in

Keyword Parameters


Keywords


        COMMENTS=cmt Returned array of comments for each tag.
        /REVBITS means extract bit fields starting from most
          significant bit (else least).
        /SWAP_ENDIAN means swap endian of each item.
          (does not apply to extracted bit fields).
        /CHECK means check text for total bytes.
          Returns check text in s. Does not extract data.
          Use TOT_BYTES=nbyts to return total number of bytes.
        LENCHECK=maxlen check tag names for length (def=8 char).
          Use /COMMENT to check comment lengths (def=48).
        /QUIET do not list check text for /CHECK mode or LENCHECK
            mode. Still lists any error messages.
        /DETAILS gives details on text description.
        /NOCOPY do not grab lines with + in column 1.
        ERROR=err Error count (0=none).

Outputs


      s = Returned structure. out

Common Blocks


Notes


      Note: Ex comment check: t=ingest_bindata(txt,bin,comment=cmt)
                            more,tag_names(t)+' --- '+cmt
        From the total number of bytes returned by TOT_BYTES in
        /CHECK can get a structure for directly reading the data:
        s=ingest_bindata(text,bytarr(nrec),comment=cmt)
        (Can do direct reads only if there are no bit extractions)

Modification History


      R. Sterner, 2002 Oct 10
      R. Sterner, 2002 Oct 22 --- Added LENCHECK=maxlen, COMMENT=cmt.
      R. Sterner, 2002 Nov 19 --- Added + to copy text to structure (/nocopy).
      R. Sterner, 2002 Nov 20 --- Added comment check to /lencheck.
      R. Sterner, 2003 Jan 17 --- Returned total number of bytes.
      R. Sterner, 2003 May 02 --- Changed default comments length to 48.
      R. Sterner, 2004 Oct 12 --- Cleared up some help text.
      R. Sterner, 2011 May 25 --- Converted () to [].
      R. Sterner, 2011 May 25 --- Adjusted /CHECK listing width.
      R. Sterner, 2011 May 27 --- Mentioned portable data types in help text.
      R. Sterner, 2011 May 29 --- Handled Modify Commands in data description.
  Copyright (C) 2002, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us