eaarl-io  1.0.1+71abbd4
EAARL Input/Output Library (Public API)
edb.h
Go to the documentation of this file.
1 #ifndef EAARLIO_EDB_H
2 #define EAARLIO_EDB_H
3 
24 #include "eaarlio/error.h"
25 #include "eaarlio/memory.h"
26 #include "eaarlio/stream.h"
27 #include <stdint.h>
28 
29 /******************************************************************************/
30 
43  uint32_t time_seconds;
44 
50  uint32_t time_fraction;
51 
53  uint32_t record_offset;
54 
56  uint32_t record_length;
57 
59  int16_t file_index;
60 
62  uint8_t pulse_count;
63 
65  uint8_t digitizer;
66 };
67 
73 #define eaarlio_edb_record_empty() \
74  (struct eaarlio_edb_record) \
75  { \
76  0, 0, 0, 0, 0, 0, 0 \
77  }
78 
85 struct eaarlio_edb {
87  uint32_t record_count;
88 
90  uint32_t file_count;
91 
94 
96  char **files;
97 };
98 
104 #define eaarlio_edb_empty() \
105  (struct eaarlio_edb) \
106  { \
107  0, 0, NULL, NULL \
108  }
109 
127  struct eaarlio_memory *memory);
128 
156  struct eaarlio_edb *edb,
157  struct eaarlio_memory *memory,
158  int include_records,
159  int include_files);
160 
172  struct eaarlio_edb const *edb);
173 
174 #endif
uint8_t digitizer
Digitizer used: 0 or 1.
Definition: edb.h:65
eaarlio_error eaarlio_edb_write(struct eaarlio_stream *stream, struct eaarlio_edb const *edb)
Write an EDB file.
Memory handler.
eaarlio_error
Definition: error.h:16
uint32_t record_count
Number of records in eaarlio_edb::records.
Definition: edb.h:87
int16_t file_index
Index into eaarlio_edb::files for this record&#39;s TLD file.
Definition: edb.h:59
EDB index data.
Definition: edb.h:85
uint8_t pulse_count
Number of pulses in this raster.
Definition: edb.h:62
uint32_t time_seconds
Integer seconds component of timestamp.
Definition: edb.h:43
char ** files
Names of the TLD files.
Definition: edb.h:96
eaarlio_error eaarlio_edb_read(struct eaarlio_stream *stream, struct eaarlio_edb *edb, struct eaarlio_memory *memory, int include_records, int include_files)
Read an entire EDB file.
eaarlio_error eaarlio_edb_free(struct eaarlio_edb *edb, struct eaarlio_memory *memory)
Free memory allocated to fields in eaarlio_edb.
Memory handler structure.
Definition: memory.h:41
Stream interface for working with files.
Error codes and handling.
uint32_t file_count
Number of files in eaarlio_edb::files.
Definition: edb.h:90
struct eaarlio_edb_record * records
Record entries for the TLD rasters.
Definition: edb.h:93
EDB record.
Definition: edb.h:37
uint32_t time_fraction
Fractional seconds component of timestamp.
Definition: edb.h:50
uint32_t record_offset
Byte offset in TLD file to this record.
Definition: edb.h:53
uint32_t record_length
Byte length of this record (including the header)
Definition: edb.h:56
Stream interface.
Definition: stream.h:47