ENVISAT Product Reader API for C |

Functions
Field Access
Basic Data Access

## Functions

const EPR_SField * | epr_get_field (const EPR_SRecord *record, const char *field_name)
| Gets a field from the given record.
uint | epr_get_num_fields (const EPR_SRecord *record)
| Gets the number of fields contained in the given record.
const EPR_SField * | epr_get_field_at (const EPR_SRecord *record, uint field_index)
| Gets a field at the specified position within the record.
const char * | epr_get_field_unit (const EPR_SField *field)
| Gets the unit of the field.
const char * | epr_get_field_description (const EPR_SField *field)
| Gets the description of the field.
uint | epr_get_field_num_elems (const EPR_SField *field)
| Gets the number of elements of the field.
const char * | epr_get_field_name (const EPR_SField *field)
| Gets the name of the field.
EPR_EDataTypeId | epr_get_field_type (const EPR_SField *field)
| Gets the type of the field.

## Detailed Description

## Function Documentation

## ◆ epr_get_field()

const EPR_SField * epr_get_field | ( | const EPR_SRecord * | record,
|  | const char * | field_name
| ) |  |

Gets a field from the given record.

The field is here identified through the given name.
It contains the field info and all corresponding values.

Parameters

  record | the record identifier, must not be `NULL`
  field_name | the the name of required field, must not be `NULL`.

Returns
  the field or `NULL` if an error occured.

## ◆ epr_get_num_fields()

uint epr_get_num_fields | ( | const EPR_SRecord * | record | ) |

Gets the number of fields contained in the given record.

Parameters

  record | the record to be analysed, must not be `NULL`

Returns
  the fields number or `0` if an error occured.

## ◆ epr_get_field_at()

const EPR_SField * epr_get_field_at | ( | const EPR_SRecord * | record,
|  | uint | field_index
| ) |  |

Gets a field at the specified position within the record.

Parameters

  record | the record from the field shall be returned, must not be `NULL`
  field_index | the zero-based index (position within record) of the field

Returns
  the field or `NULL` if an error occured.

## ◆ epr_get_field_unit()

const char * epr_get_field_unit | ( | const EPR_SField * | field | ) |

Gets the unit of the field.

Parameters

  field | the field from which the unit shall be returned, must not be `NULL`

Returns
  the field unit or `NULL` if an error occured.

## ◆ epr_get_field_description()

const char * epr_get_field_description | ( | const EPR_SField * | field | ) |

Gets the description of the field.

Parameters

  field | field from which the description shall be returned, must not be `NULL`

Returns
  the field description or `NULL` if an error occured.

## ◆ epr_get_field_num_elems()

uint epr_get_field_num_elems | ( | const EPR_SField * | field | ) |

Gets the number of elements of the field.

Parameters

  field | field to be analysed, must not be `NULL`

Returns
  the number of elements of the field or `0` if an error occured.

## ◆ epr_get_field_name()

const char * epr_get_field_name | ( | const EPR_SField * | field | ) |

Gets the name of the field.

Parameters

  field | field to be analysed, must not be `NULL`

Returns
  the field name or `NULL` if an error occured.

## ◆ epr_get_field_type()

EPR_EDataTypeId epr_get_field_type | ( | const EPR_SField * | field | ) |

Gets the type of the field.

Parameters

  field | field to be analysed, must not be `NULL`

Returns
  the field type or `0` if an error occured.