Skip to contents

This function processes a specified version of the SeaSonde file header. It identifies the appropriate header function for the given version, processes the header, and then updates the accumulating pool of header data. Specifically:

Usage

process_version_header(
  pool,
  version,
  specs,
  connection,
  endian = "big",
  prev_data = NULL
)

Arguments

pool

List. An accumulating list of processed headers from prior versions.

version

Integer. The specific version of the header to be processed. E.g., for version 3, the function seasonder_readSeaSondeCSFileHeaderV3 should be present.

specs

List. Header specifications for each version. Each entry should correspond to a version number and contain the required information to process that version's header.

connection

Connection object. The file connection pointing to the SeaSonde file.

endian

Character string. Specifies the byte order for reading data. Can be "big" (default)

prev_data

previous header data or "little". Use the appropriate value depending on the system architecture and the file's source.

Value

List. A combination of the initial pool and the processed header for the given version. Fields in the current header will overwrite or append to the pool as described above.

Details

  1. For fields in the current header that overlap with the accumulated pool, the current header's values overwrite those in the pool.

  2. Fields that are unique to the current header are appended to the pool.

Assumptions

This function assumes that the desired version-specific seasonder_readSeaSondeCSFileHeaderV* functions are available in the global environment.