API
 
Loading...
Searching...
No Matches
edtinc.h
Go to the documentation of this file.
1/** \file edtinc.h
2 * \brief Shared EDT SDK stub declarations for MagAO-X test builds.
3 * \author OpenAI Codex
4 */
5
6#ifndef tests_edtinc_h
7#define tests_edtinc_h
8
9typedef unsigned int uint;
10typedef unsigned char u_char;
11
12/// Stub EDT device handle type used by unit tests.
13struct EdtDev
14{
15 int unused;
16};
17
18/// Stub EDT camera handle type used by unit tests.
19struct PdvDev
20{
21 int unused;
22};
23
24/// Stub EDT dependent-configuration type used by unit tests.
26{
27 int unused;
28};
29
30/// Stub EDT configuration info structure used by unit tests.
31struct Edtinfo
32{
33 int unused;
34};
35
36/// Default EDT interface name used by the production code.
37#define EDT_INTERFACE "pdv"
38
39#ifdef __cplusplus
40extern "C"
41{
42#endif
43
44 /// Allocate a stub EDT dependent configuration object.
46
47 /// Read a stub EDT configuration file.
48 int pdv_readcfg( const char *configFile, Dependent *dd_p, Edtinfo *edtinfo );
49
50 /// Open a stub EDT device channel.
51 EdtDev *edt_open_channel( const char *deviceName, int unit, int channel );
52
53 /// Report the last stub EDT error message.
54 void edt_perror( char *errstr );
55
56 /// Initialize a stub EDT camera instance.
57 int pdv_initcam( EdtDev *edt_p,
58 Dependent *dd_p,
59 int unit,
60 Edtinfo *edtinfo,
61 const char *configFile,
62 char *bitdir,
63 int pdv_debug );
64
65 /// Close a stub EDT device channel.
66 void edt_close( EdtDev *edt_p );
67
68 /// Open a stub PDV device handle.
69 PdvDev *pdv_open_channel( const char *deviceName, int unit, int channel );
70
71 /// Close a stub PDV device handle.
72 void pdv_close( PdvDev *pdv_p );
73
74 /// Flush the stub PDV FIFO.
75 void pdv_flush_fifo( PdvDev *pdv_p );
76
77 /// Enable stub PDV serial reads.
78 void pdv_serial_read_enable( PdvDev *pdv_p );
79
80 /// Return the stub PDV frame width.
81 int pdv_get_width( PdvDev *pdv_p );
82
83 /// Return the stub PDV frame height.
84 int pdv_get_height( PdvDev *pdv_p );
85
86 /// Return the stub PDV frame bit depth.
87 int pdv_get_depth( PdvDev *pdv_p );
88
89 /// Return the stub PDV camera type string.
90 char *pdv_get_cameratype( PdvDev *pdv_p );
91
92 /// Configure the stub PDV ring-buffer depth.
93 void pdv_multibuf( PdvDev *pdv_p, int numBuffs );
94
95 /// Start stub PDV acquisition for multiple images.
96 void pdv_start_images( PdvDev *pdv_p, int numBuffs );
97
98 /// Wait for the last stub PDV image and fill the DMA timestamp.
99 u_char *pdv_wait_last_image_timed( PdvDev *pdv_p, uint dmaTimeStamp[2] );
100
101 /// Start acquisition of the next stub PDV image.
102 void pdv_start_image( PdvDev *pdv_p );
103
104 /// Read bytes from the stub PDV serial channel.
105 int pdv_serial_read( PdvDev *pdv_p, char *buf, int size );
106
107 /// Send a command over the stub PDV serial channel.
108 int pdv_serial_command( PdvDev *pdv_p, const char *command );
109
110 /// Wait for serial data on the stub PDV channel.
111 int pdv_serial_wait( PdvDev *pdv_p, int timeout, int count );
112
113 /// Return the configured stub PDV serial terminator.
114 int pdv_get_waitchar( PdvDev *pdv_p, u_char *waitc );
115
116#ifdef __cplusplus
117}
118#endif
119
120#endif // tests_edtinc_h
void pdv_flush_fifo(PdvDev *pdv_p)
Flush the stub PDV FIFO.
int pdv_readcfg(const char *configFile, Dependent *dd_p, Edtinfo *edtinfo)
Read a stub EDT configuration file.
int unused
Definition edtinc.h:21
void pdv_start_images(PdvDev *pdv_p, int numBuffs)
Start stub PDV acquisition for multiple images.
void edt_perror(char *errstr)
Report the last stub EDT error message.
void pdv_start_image(PdvDev *pdv_p)
Start acquisition of the next stub PDV image.
EdtDev * edt_open_channel(const char *deviceName, int unit, int channel)
Open a stub EDT device channel.
int pdv_get_waitchar(PdvDev *pdv_p, u_char *waitc)
Return the configured stub PDV serial terminator.
void pdv_serial_read_enable(PdvDev *pdv_p)
Enable stub PDV serial reads.
int pdv_serial_command(PdvDev *pdv_p, const char *command)
Send a command over the stub PDV serial channel.
void pdv_close(PdvDev *pdv_p)
Close a stub PDV device handle.
int unused
Definition edtinc.h:15
void edt_close(EdtDev *edt_p)
Close a stub EDT device channel.
int pdv_initcam(EdtDev *edt_p, Dependent *dd_p, int unit, Edtinfo *edtinfo, const char *configFile, char *bitdir, int pdv_debug)
Initialize a stub EDT camera instance.
int pdv_get_width(PdvDev *pdv_p)
Return the stub PDV frame width.
int pdv_get_height(PdvDev *pdv_p)
Return the stub PDV frame height.
int unused
Definition edtinc.h:33
PdvDev * pdv_open_channel(const char *deviceName, int unit, int channel)
Open a stub PDV device handle.
unsigned int uint
Definition edtinc.h:9
int pdv_get_depth(PdvDev *pdv_p)
Return the stub PDV frame bit depth.
int pdv_serial_wait(PdvDev *pdv_p, int timeout, int count)
Wait for serial data on the stub PDV channel.
char * pdv_get_cameratype(PdvDev *pdv_p)
Return the stub PDV camera type string.
u_char * pdv_wait_last_image_timed(PdvDev *pdv_p, uint dmaTimeStamp[2])
Wait for the last stub PDV image and fill the DMA timestamp.
Dependent * pdv_alloc_dependent()
Allocate a stub EDT dependent configuration object.
int unused
Definition edtinc.h:27
void pdv_multibuf(PdvDev *pdv_p, int numBuffs)
Configure the stub PDV ring-buffer depth.
unsigned char u_char
Definition edtinc.h:10
int pdv_serial_read(PdvDev *pdv_p, char *buf, int size)
Read bytes from the stub PDV serial channel.
Stub EDT dependent-configuration type used by unit tests.
Definition edtinc.h:26
Stub EDT device handle type used by unit tests.
Definition edtinc.h:14
Stub EDT configuration info structure used by unit tests.
Definition edtinc.h:32
Stub EDT camera handle type used by unit tests.
Definition edtinc.h:20