PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
v2u_sys.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * $Id: v2u_sys.h 10168 2010-06-25 11:01:56Z monich $
4  *
5  * Copyright (C) 2003-2010 Epiphan Systems Inc. All rights reserved.
6  *
7  * System specific functions.
8  *
9  ****************************************************************************/
10 
11 #ifndef _V2U_SYS_H_
12 #define _V2U_SYS_H_ 1
13 
14 #include "v2u_ioctl.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
19 
20 /* Maximum number of VGA2USB devices */
21 #define MAX_VGA2USB_DEVICE_COUNT 15
22 
23 /* Handle to the driver */
24 typedef struct _V2U_DRIVER *V2U_DRIVER_HANDLE, *V2U_HANDLE;
25 
29 extern V2U_HANDLE v2u_open_driver(void);
30 
34 extern V2U_HANDLE v2u_open_driver_idx(int idx);
35 
39 extern V2U_HANDLE v2u_open_driver_sn(const char* sn);
40 
45 extern int v2u_open_all_devices(V2U_HANDLE* handles, int maxcount);
46 
50 #define v2u_count_devices() v2u_open_all_devices(NULL,MAX_VGA2USB_DEVICE_COUNT)
51 
55 extern int v2u_get_fd(V2U_HANDLE handle);
56 
61 extern V2U_BOOL v2u_ioctl(V2U_HANDLE handle, int code, void* buf, int size);
62 
66 extern V2U_BOOL v2u_getsn(V2U_HANDLE handle, char* buf, int buflen);
67 
72 
78 
83  const V2UPropertyValue* value);
84 
89 
95 
101 
106 extern V2U_BOOL v2u_set_grabparams(V2U_HANDLE handle, const V2U_GrabParameters* gp);
107 
112 extern V2U_GrabFrame * v2u_grab_frame(V2U_HANDLE handle, int format);
113 
118 extern V2U_GrabFrame2* v2u_grab_frame2(V2U_HANDLE h, const V2URect* crop, int format);
119 
123 extern void v2u_free_frame(V2U_GrabFrame* f);
124 
128 extern void v2u_free_frame2(V2U_GrabFrame2* f);
129 
130 /*
131  * Closes the handle to the driver
132  */
133 extern void v2u_close_driver(V2U_HANDLE handle);
134 
138 extern V2U_TIME v2u_time(void);
139 
143 extern void v2u_sleep(int ms);
144 
145 #ifdef __cplusplus
146 } /* end of extern "C" */
147 #endif /* __cplusplus */
148 
149 #endif /* _V2U_SYS_H_ */
V2U_TIME v2u_time(void)
const char * key
Definition: phidget22.h:5111
void v2u_sleep(int ms)
V2U_BOOL v2u_get_property(V2U_HANDLE handle, V2UPropertyKey key, V2UPropertyValue *value)
V2U_GrabFrame2 * v2u_grab_frame2(V2U_HANDLE h, const V2URect *crop, int format)
V2UProductType v2u_get_product_type(V2U_HANDLE handle)
V2U_GrabFrame * v2u_grab_frame(V2U_HANDLE handle, int format)
void v2u_close_driver(V2U_HANDLE handle)
V2U_INT32 V2U_BOOL
Definition: v2u_defs.h:71
V2U_BOOL v2u_get_grabparams(V2U_HANDLE handle, V2U_GrabParameters *gp)
int v2u_get_fd(V2U_HANDLE handle)
V2U_HANDLE v2u_open_driver(void)
V2U_BOOL v2u_ioctl(V2U_HANDLE handle, int code, void *buf, int size)
int v2u_open_all_devices(V2U_HANDLE *handles, int maxcount)
struct _V2U_DRIVER * V2U_HANDLE
Definition: v2u_sys.h:24
V2U_HANDLE v2u_open_driver_sn(const char *sn)
V2U_BOOL v2u_set_grabparams(V2U_HANDLE handle, const V2U_GrabParameters *gp)
V2U_BOOL v2u_detect_videomode(V2U_HANDLE handle, V2U_VideoMode *vm)
V2UPropertyType v2u_get_property_type(V2UPropertyKey key)
V2U_HANDLE v2u_open_driver_idx(int idx)
void v2u_free_frame2(V2U_GrabFrame2 *f)
V2U_BOOL v2u_getsn(V2U_HANDLE handle, char *buf, int buflen)
enum v2u_product_type V2UProductType
enum v2u_property_type V2UPropertyType
enum v2u_property_key V2UPropertyKey
const char const char * value
Definition: phidget22.h:5111
V2U_INT64 V2U_TIME
Definition: v2u_defs.h:73
struct _V2U_DRIVER * V2U_DRIVER_HANDLE
Definition: v2u_sys.h:24
V2U_BOOL v2u_set_property(V2U_HANDLE handle, V2UPropertyKey key, const V2UPropertyValue *value)
void v2u_free_frame(V2U_GrabFrame *f)
char * code
Definition: phidget22.h:3966