This provides an example of how to read rasters using eaarlio_file_flight.
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
if(argc < 3 || 0 == strncmp(argv[1], "-h", 3) || 0 == strncmp(argv[1], "--help", 7)) {
printf("Usage: example_flight_read_rasters [-h] <edb file> <raster number> [...]\n");
printf("Example of reading raster data using eaarlio_flight\n");
printf("\n");
printf(" -h, --help display this help and exit\n");
printf(" <edb file> EDB file for dataset\n");
printf(" <raster number> raster numbers to read\n");
return 1;
}
char const *edb_file = argv[1];
int32_t time_offset = 0;
int failed;
int i;
int raster_number;
int include_pulses = 0;
int include_waveforms = 0;
if(failed)
return 1;
for(i = 2; i < argc; i++) {
raster_number = atoi(argv[i]);
printf("raster_number: %d\n", raster_number);
raster_number, include_pulses, include_waveforms);
if(failed)
return 1;
printf(
"digitizer: %" PRIu8
"\n", raster.
digitizer);
printf(
"pulse_count: %" PRIu16
"\n", raster.
pulse_count);
printf("edb_time_offset: %" PRIi32 "\n", time_offset);
failed =
if(failed)
return 1;
printf("\n");
}
failed =
if(failed)
return 1;
return 0;
}