eaarl-io  1.0.1+71abbd4
EAARL Input/Output Library (Public API)
pulse.h
Go to the documentation of this file.
1 #ifndef EAARLIO_PULSE_H
2 #define EAARLIO_PULSE_H
3 
9 #include "eaarlio/error.h"
10 #include "eaarlio/memory.h"
11 #include <stdint.h>
12 
18 #define EAARLIO_MAX_RX_COUNT 4
19 
23 struct eaarlio_pulse {
29  uint32_t time_offset;
30 
36  uint8_t rx_count;
37 
44 
51  uint16_t range;
52 
59  uint8_t thresh_tx;
60 
67  uint8_t thresh_rx;
68 
70  uint8_t bias_tx;
71 
74 
76  uint8_t tx_len;
77 
80 
82  unsigned char *tx;
83 
85  unsigned char *rx[EAARLIO_MAX_RX_COUNT];
86 };
87 
93 #define eaarlio_pulse_empty() \
94  (struct eaarlio_pulse) \
95  { \
96  .time_offset = 0, .rx_count = 0, .scan_angle_counts = 0, .range = 0, \
97  .thresh_tx = 0, .thresh_rx = 0, .bias_tx = 0, \
98  .bias_rx = { 0, 0, 0, 0 }, .tx_len = 0, .tx = NULL, \
99  .rx_len = { 0, 0, 0, 0 }, .rx = { \
100  NULL, \
101  NULL, \
102  NULL, \
103  NULL \
104  } \
105  }
106 
124  struct eaarlio_memory *memory);
125 
126 #endif
uint16_t rx_len[EAARLIO_MAX_RX_COUNT]
Lengths of eaarlio_pulse::rx.
Definition: pulse.h:79
Memory handler.
#define EAARLIO_MAX_RX_COUNT
Maximum number of return waveforms that are possible for TLD data.
Definition: pulse.h:18
eaarlio_error
Definition: error.h:16
eaarlio_error eaarlio_pulse_free(struct eaarlio_pulse *pulse, struct eaarlio_memory *memory)
Release memory held within an eaarlio_pulse.
Memory handler structure.
Definition: memory.h:41
uint8_t bias_rx[EAARLIO_MAX_RX_COUNT]
Channel range bias in nanoseconds.
Definition: pulse.h:73
Error codes and handling.
uint8_t thresh_rx
Return waveform hardware threshold failure.
Definition: pulse.h:67
uint16_t range
Range measurement for laser.
Definition: pulse.h:51
uint8_t thresh_tx
Transmit waveform hardware threshold failure.
Definition: pulse.h:59
uint8_t bias_tx
Transmit range bias in nanoseconds.
Definition: pulse.h:70
uint8_t tx_len
Length of eaarlio_pulse::tx.
Definition: pulse.h:76
uint8_t rx_count
Number of return waveforms.
Definition: pulse.h:36
int16_t scan_angle_counts
Angle of scanner, in hardware units.
Definition: pulse.h:43
EAARL pulse record.
Definition: pulse.h:23
unsigned char * tx
Transmit waveform.
Definition: pulse.h:82
uint32_t time_offset
Additional fractional time elapsed since raster timestamp.
Definition: pulse.h:29
unsigned char * rx[EAARLIO_MAX_RX_COUNT]
Return waveforms.
Definition: pulse.h:85