pamBinRead: Read Pamguard Binary Data

View source: R/pamBinRead.R

pamBinReadR Documentation

Read Pamguard Binary Data

Description

A wrapper for reading various types of binary data.

Usage

pamBinRead(
  fid,
  what = c("int8", "int16", "int32", "int64", "uint8", "uint16", "float", "double",
    "character"),
  n,
  seek = FALSE
)

Arguments

fid

The binary file being read

what

The type of data to read. Int64 is not handled natively by R, see note.

n

The number of objects to read.

seek

Whether or not to just seek instead of reading

Value

Data of the type and number specified.

Note

R does not natively support 64-bit integers. Current implementation is to read an int64 as 8 separate 1-byte raw pieces. These are converted from hexidecimal, shifted by the appropriate power of 2, then summed. Currently cannot read more than one int64 at a time, shouldn't be necessary.

Author(s)

Taiki Sakai taiki.sakai@noaa.gov


PamBinaries documentation built on April 30, 2022, 1:08 a.m.