eaarl-io  1.0.1+71abbd4
EAARL Input/Output Library (Public API)
Data Structures | Macros | Functions
raster.h File Reference

Constants, structures, and utility functions for EAARL raster data. More...

#include "eaarlio/memory.h"
#include "eaarlio/pulse.h"
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  eaarlio_raster
 EAARL raster record. More...
 

Macros

#define eaarlio_raster_empty()
 Empty eaarlio_raster value. More...
 

Functions

eaarlio_error eaarlio_raster_free (struct eaarlio_raster *raster, struct eaarlio_memory *memory)
 Free memory allocated to fields in eaarlio_raster. More...
 

Detailed Description

Constants, structures, and utility functions for EAARL raster data.

This header provides the structures used for working with EAARL raster data. These structures are used throughout the rest of the TLD related parts of the API.

Some utility functions are also included for releasing memory allocated for eaarlio_raster and eaarlio_pulse records.


Data Structure Documentation

◆ eaarlio_raster

struct eaarlio_raster
Data Fields
uint8_t digitizer Digitizer used: 0 or 1.
struct eaarlio_pulse * pulse Pulse records.

The size is specified by eaarlio_raster::pulse_count.

uint16_t pulse_count Number of pulses in this raster.
uint32_t sequence_number Sequence number, ignore.

This value cycles and repeats and is thus not suitable for uniquely identifying rasters. The value is not used for anything and should be ignored.

uint32_t time_fraction Fractional seconds component of timestamp.

Use eaarlio_units_raster_time to derive floating point time

uint32_t time_seconds Integer seconds component of timestamp.

Use eaarlio_units_raster_time to derive floating point time

Macro Definition Documentation

◆ eaarlio_raster_empty

#define eaarlio_raster_empty ( )
Value:
(struct eaarlio_raster) \
{ \
0, 0, 0, 0, 0, NULL \
}
EAARL raster record.
Definition: raster.h:23

Empty eaarlio_raster value.

All numeric fields will contain zero values. The pointer will be null.

Examples:
eaarlio_yaml.c, example_flight_read_raster_pulse.c, and example_flight_read_rasters.c.

Function Documentation

◆ eaarlio_raster_free()

eaarlio_error eaarlio_raster_free ( struct eaarlio_raster raster,
struct eaarlio_memory memory 
)

Free memory allocated to fields in eaarlio_raster.

Parameters
[in,out]rasterRaster with memory to release
[in]memoryMemory handler, or NULL for stdlib
Returns
On success, EAARLIO_SUCCESS.
On failure, eaarlio_error representing the failure condition.
Postcondition
On success, raster->pulse will be null.
On success, any memory that was allocated for raster->pulse has been released.
Remarks
The pointer to raster is not released.
raster->pulse may be null. If so, it is left alone.
Examples:
eaarlio_yaml.c, example_file_tld_opener.c, example_flight_read_raster_pulse.c, and example_flight_read_rasters.c.