R/readStdModuleHeader.R

Defines functions readStdModuleHeader

Documented in readStdModuleHeader

#' @title Read Standard Module Header
#' 
#' @description Reads the module header information common to all modules.
#'   Differs from the legacy code in that it does not read in or skip any
#'   information specific to a module.
#'   
#' @param file binary file to be read
#' 
#' @return header information common to all modules
#' 
#' @author Taiki Sakai \email{taiki.sakai@@noaa.gov}
#' 
readStdModuleHeader <- function(file) {
    header <- list()
    header$length <- pamBinRead(file, 'int32', n=1)
    header$identifier <- pamBinRead(file, 'int32', n=1)
    header$version <- pamBinRead(file, 'int32', n=1)
    header$binaryLength <- pamBinRead(file, 'int32', n=1)
    return(header)
}

Try the PamBinaries package in your browser

Any scripts or data that you put into this service are public.

PamBinaries documentation built on Feb. 16, 2023, 7:38 p.m.