-
Notifications
You must be signed in to change notification settings - Fork 0
/
aylp_asdk_dm.h
41 lines (32 loc) · 998 Bytes
/
aylp_asdk_dm.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
#ifndef AYLP_ASDK_DM_H_
#define AYLP_ASDK_DM_H_
#include <gsl/gsl_block.h>
#include "anyloop.h"
#include "asdkWrapper.h"
struct aylp_asdk_dm_data {
// param: serial number
char *sn;
// opaque dm object from asdk
asdkDM *dm;
// number of actuators
size_t n_act;
// param: matrix row indices corresponding to command; starts from 0
size_t *mat_is;
size_t mat_is_len;
// param: matrix column indices corresponding to command; starts from 0
size_t *mat_js;
size_t mat_js_len;
// param: 1 / peak-to-valley stroke of mirror in radians
// (i.e. 2/pvstroke/2, because of reflection)
double peak_per_rad;
// buffer to send (only used if we're not handed a contiguous command
// vector)
gsl_block *send_buf;
};
// initialize asdk
int aylp_asdk_dm_init(struct aylp_device *self);
// send gsl_block of data in state
int aylp_asdk_dm_process(struct aylp_device *self, struct aylp_state *state);
// close device when loop exits
int aylp_asdk_dm_close(struct aylp_device *self);
#endif