PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
Macros | Typedefs | Functions
v2u_sys.h File Reference
#include "v2u_ioctl.h"
Include dependency graph for v2u_sys.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_VGA2USB_DEVICE_COUNT   15
 
#define v2u_count_devices()   v2u_open_all_devices(NULL,MAX_VGA2USB_DEVICE_COUNT)
 

Typedefs

typedef struct _V2U_DRIVER * V2U_DRIVER_HANDLE
 
typedef struct _V2U_DRIVER * V2U_HANDLE
 

Functions

void v2u_close_driver (V2U_HANDLE handle)
 
V2U_BOOL v2u_detect_videomode (V2U_HANDLE handle, V2U_VideoMode *vm)
 
void v2u_free_frame (V2U_GrabFrame *f)
 
void v2u_free_frame2 (V2U_GrabFrame2 *f)
 
int v2u_get_fd (V2U_HANDLE handle)
 
V2U_BOOL v2u_get_grabparams (V2U_HANDLE handle, V2U_GrabParameters *gp)
 
V2UProductType v2u_get_product_type (V2U_HANDLE handle)
 
V2U_BOOL v2u_get_property (V2U_HANDLE handle, V2UPropertyKey key, V2UPropertyValue *value)
 
V2UPropertyType v2u_get_property_type (V2UPropertyKey key)
 
V2U_BOOL v2u_getsn (V2U_HANDLE handle, char *buf, int buflen)
 
V2U_GrabFramev2u_grab_frame (V2U_HANDLE handle, int format)
 
V2U_GrabFrame2v2u_grab_frame2 (V2U_HANDLE h, const V2URect *crop, int format)
 
V2U_BOOL v2u_ioctl (V2U_HANDLE handle, int code, void *buf, int size)
 
int v2u_open_all_devices (V2U_HANDLE *handles, int maxcount)
 
V2U_HANDLE v2u_open_driver (void)
 
V2U_HANDLE v2u_open_driver_idx (int idx)
 
V2U_HANDLE v2u_open_driver_sn (const char *sn)
 
V2U_BOOL v2u_set_grabparams (V2U_HANDLE handle, const V2U_GrabParameters *gp)
 
V2U_BOOL v2u_set_property (V2U_HANDLE handle, V2UPropertyKey key, const V2UPropertyValue *value)
 
void v2u_sleep (int ms)
 
V2U_TIME v2u_time (void)
 

Macro Definition Documentation

◆ MAX_VGA2USB_DEVICE_COUNT

#define MAX_VGA2USB_DEVICE_COUNT   15

Definition at line 21 of file v2u_sys.h.

◆ v2u_count_devices

#define v2u_count_devices ( )    v2u_open_all_devices(NULL,MAX_VGA2USB_DEVICE_COUNT)

Returns number of available VGA2USB devices.

Definition at line 50 of file v2u_sys.h.

Typedef Documentation

◆ V2U_DRIVER_HANDLE

typedef struct _V2U_DRIVER* V2U_DRIVER_HANDLE

Definition at line 24 of file v2u_sys.h.

◆ V2U_HANDLE

typedef struct _V2U_DRIVER * V2U_HANDLE

Definition at line 24 of file v2u_sys.h.

Function Documentation

◆ v2u_close_driver()

void v2u_close_driver ( V2U_HANDLE  handle)

◆ v2u_detect_videomode()

V2U_BOOL v2u_detect_videomode ( V2U_HANDLE  handle,
V2U_VideoMode vm 
)

Detects video mode. Returns zero on failure, non-zero on success.

◆ v2u_free_frame()

void v2u_free_frame ( V2U_GrabFrame f)

Deallocates V2U_GrabFrame structure allocated by v2u_grab_frame

◆ v2u_free_frame2()

void v2u_free_frame2 ( V2U_GrabFrame2 f)

Deallocates V2U_GrabFrame2 structure allocated by v2u_grab_frame2

◆ v2u_get_fd()

int v2u_get_fd ( V2U_HANDLE  handle)

Returns OS file descriptor for the existing handle.

◆ v2u_get_grabparams()

V2U_BOOL v2u_get_grabparams ( V2U_HANDLE  handle,
V2U_GrabParameters gp 
)

Queries grab parameters. Returns zero on failure, non-zero on success.

◆ v2u_get_product_type()

V2UProductType v2u_get_product_type ( V2U_HANDLE  handle)

Returns the hardware type, V2UProductOther on error.

◆ v2u_get_property()

V2U_BOOL v2u_get_property ( V2U_HANDLE  handle,
V2UPropertyKey  key,
V2UPropertyValue value 
)

Reads the device property.

◆ v2u_get_property_type()

V2UPropertyType v2u_get_property_type ( V2UPropertyKey  key)

Returns the property type, V2UPropType_Invalid if key is unknown

◆ v2u_getsn()

V2U_BOOL v2u_getsn ( V2U_HANDLE  handle,
char *  buf,
int  buflen 
)

Returns serial number of the VGA2USB device

◆ v2u_grab_frame()

V2U_GrabFrame* v2u_grab_frame ( V2U_HANDLE  handle,
int  format 
)

Grabs one full frame. Return V2U_GrabFrame structure on success, NULL on failure.

◆ v2u_grab_frame2()

V2U_GrabFrame2* v2u_grab_frame2 ( V2U_HANDLE  h,
const V2URect crop,
int  format 
)

Grabs the part of the frame specified by the crop rectangle. Returns V2U_GrabFrame2 structure on success, NULL on failure.

◆ v2u_ioctl()

V2U_BOOL v2u_ioctl ( V2U_HANDLE  handle,
int  code,
void *  buf,
int  size 
)

Sends ioctl to the driver. Returns zero on failure, non-zero on success. Ioctl codes are defined in v2u_ioctl.h

◆ v2u_open_all_devices()

int v2u_open_all_devices ( V2U_HANDLE handles,
int  maxcount 
)

Opens all available devices (up to maxcount), returns number of devices found.

◆ v2u_open_driver()

V2U_HANDLE v2u_open_driver ( void  )

Opens the driver, returns NULL if fails.

◆ v2u_open_driver_idx()

V2U_HANDLE v2u_open_driver_idx ( int  idx)

Opens the driver, returns NULL if fails.

◆ v2u_open_driver_sn()

V2U_HANDLE v2u_open_driver_sn ( const char *  sn)

Opens the driver, returns NULL if fails.

◆ v2u_set_grabparams()

V2U_BOOL v2u_set_grabparams ( V2U_HANDLE  handle,
const V2U_GrabParameters gp 
)

Sets grab parameters. Returns zero on failure, non-zero on success.

◆ v2u_set_property()

V2U_BOOL v2u_set_property ( V2U_HANDLE  handle,
V2UPropertyKey  key,
const V2UPropertyValue value 
)

Sets the device property.

◆ v2u_sleep()

void v2u_sleep ( int  ms)

Sleeps for specified amount of time (ms)

◆ v2u_time()

V2U_TIME v2u_time ( void  )

Returns current time in milliseconds since January 1st 1970, 00:00 GMT