ENVISAT Product Reader API for C

Functions
Record Access

Functions

EPR_SRecordepr_create_record (EPR_SDatasetId *dataset_id)
 Creates a new, empty record with a structure compatible with the dataset specified by dataset_id.
 
EPR_SRecordepr_read_record (EPR_SDatasetId *dataset_id, uint record_index, EPR_SRecord *record)
 Reads a record of a dataset specified by dataset_id.
 
void epr_free_record (EPR_SRecord *record)
 Frees the memory allocated through the given record.
 

Detailed Description

Function Documentation

◆ epr_create_record()

EPR_SRecord * epr_create_record ( EPR_SDatasetId dataset_id)

Creates a new, empty record with a structure compatible with the dataset specified by dataset_id.

Such a record is typically used in subsequent calls to epr_read_record.

Parameters
dataset_idthe dataset identifier, must not be NULL
Returns
the new record instance or NULL if an error occured.

◆ epr_read_record()

EPR_SRecord * epr_read_record ( EPR_SDatasetId dataset_id,
uint  record_index,
EPR_SRecord record 
)

Reads a record of a dataset specified by dataset_id.

The record is identified through the given dataset identifier and the given zero-based record index. In order to reduce memory reallocation, a record (pre-) created by the function epr_create_record can be passed to this function. Data is then read into this given record. If no record (NULL) is given, the function initiates a new one. In both cases, the record in which the data is read into will be returned.

Parameters
dataset_idthe dataset identifier, must not be NULL
record_indexthe zero-based record index
recorda pre-created record to reduce memory reallocation, can be NULL to let the function allocate a new record
Returns
the record in which the data has been read into or NULL if an error occured.

◆ epr_free_record()

void epr_free_record ( EPR_SRecord record)

Frees the memory allocated through the given record.

After calling this function the given record pointer becomes invalid and should not be used anymore.


Generated on Wed Jan 3 2024 20:04:50

ENVISAT Product Reader C API

Written by Brockmann Consult, © 2002     Brockmann Consult      Eropean Space Agency