SciSDK Library
SDK for SciCompiler projects
scisdk_defines.h
Go to the documentation of this file.
1 #ifndef HEADER_H_SCISDK_DEFINES
2 #define HEADER_H_SCISDK_DEFINES
3 #include <stdint.h>
4 #include <stdlib.h>
5 
20  typedef struct {
21  uint32_t magic;
22  int32_t *analog;
23  uint8_t *digital;
24  uint32_t trigger_position;
25  uint64_t timecode;
26  struct {
27  uint32_t samples_analog;
28  uint32_t samples_digital;
31  uint32_t channels;
32  } info;
34 
40  typedef struct {
41  uint32_t magic;
42  uint32_t *data;
43  uint32_t zero_position;
44  uint32_t trigger_position;
45  uint64_t timecode;
46  struct {
47  uint32_t buffer_size;
48  uint32_t samples_analog;
49  uint32_t samples_digital;
52  uint32_t channels;
53  } info;
55 
70  typedef struct {
71  uint32_t magic;
72  int32_t *analog;
73  uint8_t *digital;
74  uint32_t trigger_position;
75  uint64_t timecode;
76  struct {
77  uint32_t samples_analog;
78  uint32_t samples_digital;
81  uint32_t channels;
82  } info;
84 
90  typedef struct {
91  uint32_t magic;
92  uint32_t *data;
93  uint32_t zero_position;
94  uint32_t trigger_position;
95  uint64_t timecode;
96  struct {
97  uint32_t buffer_size;
98  uint32_t samples_analog;
99  uint32_t samples_digital;
102  uint32_t channels;
103  } info;
105 
106 
107  typedef struct {
108  bool armed;
109  bool ready;
110  bool running;
112 
118  typedef struct {
119  uint32_t magic;
120  int32_t *analog;
121  uint64_t hits;
122  uint64_t timecode;
123  uint32_t counter;
124  uint32_t user;
125  struct {
126  uint32_t samples;
127  uint32_t valid_samples;
128  uint32_t channels;
129  uint32_t enabled_channels;
130  } info;
132 
138  typedef struct {
139  uint32_t magic;
140  int32_t *data;
141  struct {
142  uint32_t buffer_size;
143  uint32_t samples;
144  uint32_t valid_samples;
145  uint32_t channels;
146  } info;
148 
149 
155  typedef struct {
156  uint32_t magic;
157  char *data;
158  struct {
159  uint32_t buffer_size;
160  uint32_t samples;
161  uint32_t valid_samples;
162  uint32_t channels;
163  } info;
165 
177  typedef struct {
178  uint32_t *row;
179  uint32_t n;
181 
187  typedef struct {
188  uint32_t magic;
190  struct {
191  uint32_t buffer_size;
192  uint32_t packet_size;
193  uint32_t valid_data;
194  } info;
196 
197 
204  typedef struct {
205  uint32_t magic;
206  uint32_t *data;
207  struct {
208  uint32_t buffer_size;
209  uint32_t valid_data;
210  } info;
212 
218  typedef struct {
219  uint32_t magic;
220  double *data;
221  struct {
222  uint32_t buffer_size;
223  uint32_t valid_data;
224  uint32_t nchannels;
225  }info;
227 
228  typedef enum {
232 
238  typedef struct {
239  uint32_t magic;
240  uint32_t *data;
241  uint64_t timecode;
242  uint32_t inttime;
243  struct {
244  uint32_t buffer_size;
245  uint32_t total_bins;
246  uint32_t valid_bins;
247  } info;
249 
254  typedef struct {
255  bool running;
256  bool completed;
257  uint32_t progress;
258  uint32_t peak_max;
259  uint32_t total_counter;
262 
263 
269  typedef struct {
270  uint32_t magic;
271  uint32_t* data;
272  uint64_t timecode;
273  uint32_t inttime;
274  struct {
275  uint32_t buffer_size;
276  uint32_t total_bins;
277  uint32_t valid_bins;
278  uint32_t binsX;
279  uint32_t binsY;
280  } info;
282 
288  typedef struct {
289  uint32_t magic;
290  double *mag;
291  double *ph;
292  uint64_t timecode;
293  struct {
294  uint32_t samples;
295  uint32_t channels;
296  } info;
298 
304  typedef struct {
305  uint32_t magic;
306  uint32_t *data;
309  uint64_t timecode;
310  struct {
311  uint32_t buffer_size;
312  uint32_t samples;
313  uint32_t channels;
314  } info;
316 
317  typedef struct {
318  bool armed;
319  bool ready;
320  bool running;
322 
323 
330  typedef struct {
331  uint32_t *pixel;
332  uint32_t n;
333  struct {
334  uint64_t timestamp;
335  uint64_t trigger_count;
336  uint64_t event_count;
337  uint64_t hits;
338  } info;
340 
346  typedef struct {
347  uint32_t magic;
349  struct {
350  uint32_t buffer_size;
351  uint32_t valid_data;
352  } info;
354 
360  typedef struct {
361  uint32_t magic;
362  uint32_t *data;
363  struct {
364  uint32_t buffer_size;
365  uint32_t packet_size;
366  uint32_t valid_data;
367  } info;
369 
370  typedef struct {
371  uint16_t hg;
372  uint16_t lg;
373  uint8_t hit;
375  typedef struct {
377  uint32_t n;
378  struct {
379  uint8_t asic;
382  uint32_t event_id;
383  uint32_t trigger_count;
385  uint32_t flags;
386  }info;
388 
389  typedef struct {
390  uint32_t magic;
392  struct {
393  uint32_t buffer_size;
394  uint32_t valid_data;
395  } info;
397 
398  typedef struct {
399  uint32_t magic;
400  uint32_t *data;
401  struct {
402  uint32_t buffer_size;
403  uint32_t packet_size;
404  uint32_t valid_data;
405  } info;
407 
408 
409  typedef struct {
410  uint16_t charge;
411  uint16_t fine;
412  uint16_t coarse;
413  uint8_t hit;
415  typedef struct {
417  uint32_t n;
418  struct {
419  uint8_t asic;
422  uint32_t event_id;
423  uint32_t trigger_count;
425  uint32_t flags;
426  }info;
428 
429  typedef struct {
430  uint32_t magic;
432  struct {
433  uint32_t buffer_size;
434  uint32_t valid_data;
435  } info;
437 
438  typedef struct {
439  uint32_t magic;
440  uint32_t *data;
441  struct {
442  uint32_t buffer_size;
443  uint32_t packet_size;
444  uint32_t valid_data;
445  } info;
447 
448 
454  typedef struct {
455  uint64_t timestamp;
456  uint32_t trigger_id;
457  size_t event_size;
458  uint16_t** waveform;
461  size_t* n_samples;
463  unsigned n_channels;
465 
466 
467 
468 
474  typedef struct {
475  uint8_t channel;
476  uint64_t timestamp;
477  uint64_t timestamp_ns;
478  uint16_t fine_timestamp;
479  uint16_t energy;
480  uint16_t flags_b;
481  uint8_t flags_a;
482  uint16_t psd;
483  uint64_t* user_info;
484  uint32_t user_info_size;
485  bool truncated;
486  uint16_t* waveform;
487  uint32_t waveform_size;
488  bool board_fail;
490  uint32_t event_size;
491  bool flush;
492  uint32_t aggregate_counter;
494 
495 
501  typedef struct {
502  uint32_t magic;
503  uint32_t *data;
504  struct {
505  uint32_t allocated_bins;
506  uint32_t valid_bins;
507  } info;
509 #endif
T_BUFFER_TYPE
Definition: scisdk_defines.h:228
@ T_BUFFER_TYPE_DECODED
Definition: scisdk_defines.h:230
@ T_BUFFER_TYPE_RAW
Definition: scisdk_defines.h:229
2D Histogram decoded data
Definition: scisdk_defines.h:269
uint32_t binsY
Definition: scisdk_defines.h:279
uint32_t magic
Definition: scisdk_defines.h:270
uint32_t total_bins
Definition: scisdk_defines.h:276
uint64_t timecode
Definition: scisdk_defines.h:272
uint32_t * data
Definition: scisdk_defines.h:271
uint32_t inttime
Definition: scisdk_defines.h:273
uint32_t binsX
Definition: scisdk_defines.h:278
uint32_t buffer_size
Definition: scisdk_defines.h:275
uint32_t valid_bins
Definition: scisdk_defines.h:277
Definition: scisdk_defines.h:389
uint32_t valid_data
Definition: scisdk_defines.h:394
SCISDK_CITIROC_PACKET * data
Definition: scisdk_defines.h:391
uint32_t magic
Definition: scisdk_defines.h:390
uint32_t buffer_size
Definition: scisdk_defines.h:393
Definition: scisdk_defines.h:375
uint32_t n
Definition: scisdk_defines.h:377
uint32_t flags
Definition: scisdk_defines.h:385
uint32_t event_id
Definition: scisdk_defines.h:382
uint64_t timestamp_from_t0
Definition: scisdk_defines.h:380
SCISDK_CITIROC_PIXEL * pixel
Definition: scisdk_defines.h:376
uint32_t validation_counter
Definition: scisdk_defines.h:384
uint8_t asic
Definition: scisdk_defines.h:379
uint64_t timestamp_from_run
Definition: scisdk_defines.h:381
uint32_t trigger_count
Definition: scisdk_defines.h:383
Definition: scisdk_defines.h:370
uint16_t lg
Definition: scisdk_defines.h:372
uint16_t hg
Definition: scisdk_defines.h:371
uint8_t hit
Definition: scisdk_defines.h:373
Definition: scisdk_defines.h:398
uint32_t magic
Definition: scisdk_defines.h:399
uint32_t packet_size
Definition: scisdk_defines.h:403
uint32_t valid_data
Definition: scisdk_defines.h:404
uint32_t * data
Definition: scisdk_defines.h:400
uint32_t buffer_size
Definition: scisdk_defines.h:402
Custom Packet Decoded data structure.
Definition: scisdk_defines.h:187
uint32_t packet_size
Definition: scisdk_defines.h:192
uint32_t buffer_size
Definition: scisdk_defines.h:191
uint32_t valid_data
Definition: scisdk_defines.h:193
uint32_t magic
Definition: scisdk_defines.h:188
SCISDK_CP_PACKET * data
Definition: scisdk_defines.h:189
Custom Packet body decoded data.
Definition: scisdk_defines.h:177
uint32_t * row
Definition: scisdk_defines.h:178
uint32_t n
Definition: scisdk_defines.h:179
Custom Packet Raw data structure.
Definition: scisdk_defines.h:204
uint32_t buffer_size
Definition: scisdk_defines.h:208
uint32_t valid_data
Definition: scisdk_defines.h:209
uint32_t * data
Definition: scisdk_defines.h:206
uint32_t magic
Definition: scisdk_defines.h:205
Digitizer decoded data type.
Definition: scisdk_defines.h:118
uint32_t samples
Definition: scisdk_defines.h:126
uint32_t counter
Definition: scisdk_defines.h:123
uint64_t timecode
Definition: scisdk_defines.h:122
uint64_t hits
Definition: scisdk_defines.h:121
uint32_t magic
Definition: scisdk_defines.h:119
int32_t * analog
Definition: scisdk_defines.h:120
uint32_t user
Definition: scisdk_defines.h:124
uint32_t valid_samples
Definition: scisdk_defines.h:127
uint32_t channels
Definition: scisdk_defines.h:128
uint32_t enabled_channels
Definition: scisdk_defines.h:129
Digitizer raw data type.
Definition: scisdk_defines.h:138
uint32_t magic
Definition: scisdk_defines.h:139
uint32_t buffer_size
Definition: scisdk_defines.h:142
uint32_t channels
Definition: scisdk_defines.h:145
uint32_t samples
Definition: scisdk_defines.h:143
int32_t * data
Definition: scisdk_defines.h:140
uint32_t valid_samples
Definition: scisdk_defines.h:144
Frame raw data structure.
Definition: scisdk_defines.h:501
uint32_t * data
Definition: scisdk_defines.h:503
uint32_t allocated_bins
Definition: scisdk_defines.h:505
uint32_t magic
Definition: scisdk_defines.h:502
uint32_t valid_bins
Definition: scisdk_defines.h:506
OpenDPP structure.
Definition: scisdk_defines.h:474
uint16_t energy
Definition: scisdk_defines.h:479
uint16_t flags_b
Definition: scisdk_defines.h:480
uint32_t waveform_size
Definition: scisdk_defines.h:487
uint8_t channel
Definition: scisdk_defines.h:475
uint16_t psd
Definition: scisdk_defines.h:482
uint16_t fine_timestamp
Definition: scisdk_defines.h:478
uint32_t event_size
Definition: scisdk_defines.h:490
uint8_t flags_a
Definition: scisdk_defines.h:481
bool truncated
Definition: scisdk_defines.h:485
uint16_t * waveform
Definition: scisdk_defines.h:486
uint64_t * user_info
Definition: scisdk_defines.h:483
bool special_event
Definition: scisdk_defines.h:489
bool flush
Definition: scisdk_defines.h:491
uint32_t user_info_size
Definition: scisdk_defines.h:484
uint64_t timestamp_ns
Definition: scisdk_defines.h:477
uint32_t aggregate_counter
Definition: scisdk_defines.h:492
bool board_fail
Definition: scisdk_defines.h:488
uint64_t timestamp
Definition: scisdk_defines.h:476
OpenScope structure.
Definition: scisdk_defines.h:454
uint16_t ** waveform
Definition: scisdk_defines.h:458
unsigned n_channels
Definition: scisdk_defines.h:463
size_t * n_samples
Definition: scisdk_defines.h:461
uint32_t trigger_id
Definition: scisdk_defines.h:456
size_t * n_allocated_samples
Definition: scisdk_defines.h:462
uint64_t timestamp
Definition: scisdk_defines.h:455
size_t event_size
Definition: scisdk_defines.h:457
FFT monitor decoded data structure.
Definition: scisdk_defines.h:288
uint32_t channels
Definition: scisdk_defines.h:295
uint64_t timecode
Definition: scisdk_defines.h:292
double * ph
Definition: scisdk_defines.h:291
uint32_t magic
Definition: scisdk_defines.h:289
double * mag
Definition: scisdk_defines.h:290
uint32_t samples
Definition: scisdk_defines.h:294
FFT monitor raw data structure.
Definition: scisdk_defines.h:304
uint64_t timecode
Definition: scisdk_defines.h:309
uint32_t buffer_size
Definition: scisdk_defines.h:311
uint32_t magic
Definition: scisdk_defines.h:305
uint32_t channels
Definition: scisdk_defines.h:313
uint32_t * data
Definition: scisdk_defines.h:306
uint32_t samples
Definition: scisdk_defines.h:312
Definition: scisdk_defines.h:317
bool armed
Definition: scisdk_defines.h:318
bool running
Definition: scisdk_defines.h:320
bool ready
Definition: scisdk_defines.h:319
Decoded events list created by the frame transfer driver.
Definition: scisdk_defines.h:346
uint32_t valid_data
Definition: scisdk_defines.h:351
uint32_t magic
Definition: scisdk_defines.h:347
uint32_t buffer_size
Definition: scisdk_defines.h:350
SCISDK_FRAME_PACKET * data
Definition: scisdk_defines.h:348
Single decoded event by the frame transfer driver.
Definition: scisdk_defines.h:330
uint64_t hits
Definition: scisdk_defines.h:337
uint64_t timestamp
Definition: scisdk_defines.h:334
uint32_t * pixel
Definition: scisdk_defines.h:331
uint64_t trigger_count
Definition: scisdk_defines.h:335
uint64_t event_count
Definition: scisdk_defines.h:336
uint32_t n
Definition: scisdk_defines.h:332
Frame raw data structure.
Definition: scisdk_defines.h:360
uint32_t packet_size
Definition: scisdk_defines.h:365
uint32_t valid_data
Definition: scisdk_defines.h:366
uint32_t buffer_size
Definition: scisdk_defines.h:364
uint32_t * data
Definition: scisdk_defines.h:362
uint32_t magic
Definition: scisdk_defines.h:361
List raw data type.
Definition: scisdk_defines.h:155
uint32_t buffer_size
Definition: scisdk_defines.h:159
char * data
Definition: scisdk_defines.h:157
uint32_t valid_samples
Definition: scisdk_defines.h:161
uint32_t channels
Definition: scisdk_defines.h:162
uint32_t magic
Definition: scisdk_defines.h:156
uint32_t samples
Definition: scisdk_defines.h:160
Oscilloscope decoded data type.
Definition: scisdk_defines.h:20
uint32_t magic
Definition: scisdk_defines.h:21
uint32_t trigger_position
Definition: scisdk_defines.h:24
uint64_t timecode
Definition: scisdk_defines.h:25
uint32_t tracks_digital_per_channel
Definition: scisdk_defines.h:30
uint8_t * digital
Definition: scisdk_defines.h:23
int32_t * analog
Definition: scisdk_defines.h:22
uint32_t samples_digital
Definition: scisdk_defines.h:28
uint32_t tracks_analog_per_channel
Definition: scisdk_defines.h:29
uint32_t samples_analog
Definition: scisdk_defines.h:27
uint32_t channels
Definition: scisdk_defines.h:31
Oscilloscope decoded data type.
Definition: scisdk_defines.h:70
uint8_t * digital
Definition: scisdk_defines.h:73
uint32_t magic
Definition: scisdk_defines.h:71
uint32_t tracks_digital_per_channel
Definition: scisdk_defines.h:80
uint32_t samples_analog
Definition: scisdk_defines.h:77
uint32_t samples_digital
Definition: scisdk_defines.h:78
uint32_t channels
Definition: scisdk_defines.h:81
int32_t * analog
Definition: scisdk_defines.h:72
uint32_t trigger_position
Definition: scisdk_defines.h:74
uint64_t timecode
Definition: scisdk_defines.h:75
uint32_t tracks_analog_per_channel
Definition: scisdk_defines.h:79
Oscilloscope raw data type.
Definition: scisdk_defines.h:90
uint32_t samples_analog
Definition: scisdk_defines.h:98
uint32_t samples_digital
Definition: scisdk_defines.h:99
uint64_t timecode
Definition: scisdk_defines.h:95
uint32_t buffer_size
Definition: scisdk_defines.h:97
uint32_t magic
Definition: scisdk_defines.h:91
uint32_t zero_position
Definition: scisdk_defines.h:93
uint32_t * data
Definition: scisdk_defines.h:92
uint32_t tracks_analog_per_channel
Definition: scisdk_defines.h:100
uint32_t tracks_digital_per_channel
Definition: scisdk_defines.h:101
uint32_t trigger_position
Definition: scisdk_defines.h:94
uint32_t channels
Definition: scisdk_defines.h:102
Oscilloscope raw data type.
Definition: scisdk_defines.h:40
uint32_t tracks_analog_per_channel
Definition: scisdk_defines.h:50
uint32_t buffer_size
Definition: scisdk_defines.h:47
uint32_t tracks_digital_per_channel
Definition: scisdk_defines.h:51
uint32_t zero_position
Definition: scisdk_defines.h:43
uint32_t samples_digital
Definition: scisdk_defines.h:49
uint32_t * data
Definition: scisdk_defines.h:42
uint32_t samples_analog
Definition: scisdk_defines.h:48
uint32_t trigger_position
Definition: scisdk_defines.h:44
uint32_t magic
Definition: scisdk_defines.h:41
uint32_t channels
Definition: scisdk_defines.h:52
uint64_t timecode
Definition: scisdk_defines.h:45
Definition: scisdk_defines.h:107
bool ready
Definition: scisdk_defines.h:109
bool armed
Definition: scisdk_defines.h:108
bool running
Definition: scisdk_defines.h:110
Definition: scisdk_defines.h:429
SCISDK_PETIROC_PACKET * data
Definition: scisdk_defines.h:431
uint32_t buffer_size
Definition: scisdk_defines.h:433
uint32_t magic
Definition: scisdk_defines.h:430
uint32_t valid_data
Definition: scisdk_defines.h:434
Definition: scisdk_defines.h:415
uint32_t validation_counter
Definition: scisdk_defines.h:424
uint8_t asic
Definition: scisdk_defines.h:419
uint64_t timestamp_from_run
Definition: scisdk_defines.h:421
uint64_t timestamp_from_t0
Definition: scisdk_defines.h:420
uint32_t event_id
Definition: scisdk_defines.h:422
uint32_t n
Definition: scisdk_defines.h:417
SCISDK_PETIROC_PIXEL * pixel
Definition: scisdk_defines.h:416
uint32_t flags
Definition: scisdk_defines.h:425
uint32_t trigger_count
Definition: scisdk_defines.h:423
Definition: scisdk_defines.h:409
uint16_t charge
Definition: scisdk_defines.h:410
uint16_t coarse
Definition: scisdk_defines.h:412
uint16_t fine
Definition: scisdk_defines.h:411
uint8_t hit
Definition: scisdk_defines.h:413
Definition: scisdk_defines.h:438
uint32_t * data
Definition: scisdk_defines.h:440
uint32_t valid_data
Definition: scisdk_defines.h:444
uint32_t magic
Definition: scisdk_defines.h:439
uint32_t buffer_size
Definition: scisdk_defines.h:442
uint32_t packet_size
Definition: scisdk_defines.h:443
Rate Meter data structure.
Definition: scisdk_defines.h:218
uint32_t buffer_size
Definition: scisdk_defines.h:222
uint32_t valid_data
Definition: scisdk_defines.h:223
uint32_t nchannels
Definition: scisdk_defines.h:224
uint32_t magic
Definition: scisdk_defines.h:219
double * data
Definition: scisdk_defines.h:220
Spectrum decoded data.
Definition: scisdk_defines.h:238
uint32_t magic
Definition: scisdk_defines.h:239
uint32_t inttime
Definition: scisdk_defines.h:242
uint32_t * data
Definition: scisdk_defines.h:240
uint64_t timecode
Definition: scisdk_defines.h:241
uint32_t buffer_size
Definition: scisdk_defines.h:244
uint32_t total_bins
Definition: scisdk_defines.h:245
uint32_t valid_bins
Definition: scisdk_defines.h:246
Spectrum status structure.
Definition: scisdk_defines.h:254
uint32_t total_counter
Definition: scisdk_defines.h:259
bool completed
Definition: scisdk_defines.h:256
uint32_t peak_max
Definition: scisdk_defines.h:258
uint32_t progress
Definition: scisdk_defines.h:257
bool running
Definition: scisdk_defines.h:255
double integration_time
Definition: scisdk_defines.h:260