-
Notifications
You must be signed in to change notification settings - Fork 0
/
capture.h
64 lines (50 loc) · 1.07 KB
/
capture.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#pragma once
#include <stddef.h>
#include <stdint.h>
#include "wfm.h"
struct Capture *make_capture(int nch, char **wfm_paths,
double debounce);
int destroy_capture(struct Capture *cap);
static int calc_stats(struct Capture *cap, size_t f, size_t n,
double debounce);
struct Channel {
double min;
double max;
double base;
double top;
double midpoint;
double rising_frequency;
double rising_period;
double falling_frequency;
double falling_period;
uint32_t nrising;
uint32_t nfalling;
int16_t *raw_data;
double *data;
uint32_t *rising_edges;
uint32_t *falling_edges;
double *rising_times;
double *falling_times;
};
struct Frame {
struct Channel *ch;
};
struct Capture {
uint32_t nch;
uint32_t nframes;
uint32_t record_bytes;
/* in pts */
uint32_t record_len;
uint32_t data_len;
uint32_t precharge_len;
uint32_t postcharge_len;
double t_scale;
double t_offset;
double *v_scale;
double *v_offset;
double *times;
struct Frame *frames;
struct Wfm **wfms;
struct Channel *all_channels;
double *all_data;
};