Version 8.9.0
 
Loading...
Searching...
No Matches
evo::IRDeviceLibUVC Class Reference

UVC device interface (Linux platforms) More...

#include <IRDeviceLibUVC.h>

Inheritance diagram for evo::IRDeviceLibUVC:
Inheritance graph
Collaboration diagram for evo::IRDeviceLibUVC:
Collaboration graph

Public Member Functions

 IRDeviceLibUVC (unsigned long serial, int videoFormatIndex)
 Standard constructor. More...
 
 ~IRDeviceLibUVC ()
 Destructor.
 
void setSerial (unsigned long serno)
 Force serial number. More...
 
int openDevice (unsigned int videoFormatIndex)
 Open device. More...
 
bool isOpen ()
 Check if device was already opened. More...
 
int setFramerate (unsigned int numerator, unsigned int denominator)
 Set framerate of device (numerator / denominator) More...
 
int startStreaming ()
 Start video grabbing.
 
int stopStreaming ()
 Stop video grabbing.
 
int closeDevice ()
 Close device. More...
 
IRDeviceError getFrame (unsigned char *buffer, double *timestamp=NULL, int timeoutMilliseconds=-1)
 Acquire one frame. More...
 
virtual void run ()
 Run device, i.e., treat main thread in blocking mode. More...
 
virtual void exit ()
 Exit blocking run method, if previously called.
 

Detailed Description

UVC device interface (Linux platforms)

Author
Stefan May (Evocortex GmbH), Matthias Wiedemann (Optris GmbH)

Constructor & Destructor Documentation

◆ IRDeviceLibUVC()

evo::IRDeviceLibUVC::IRDeviceLibUVC ( unsigned long  serial,
int  videoFormatIndex 
)

Standard constructor.

Parameters
[in]devPathSystem path to device

Member Function Documentation

◆ closeDevice()

int evo::IRDeviceLibUVC::closeDevice ( )

Close device.

Returns
success

◆ getFrame()

IRDeviceError evo::IRDeviceLibUVC::getFrame ( unsigned char *  buffer,
double *  timestamp = NULL,
int  timeoutMilliseconds = -1 
)

Acquire one frame.

Parameters
bufferimage data
timestamppoint of time at arrival
[in]timeoutMillisecondstimeout in milliseconds, -1 to use device frequency * 2, 0 = no timeout

◆ isOpen()

bool evo::IRDeviceLibUVC::isOpen ( )

Check if device was already opened.

Returns
state (open / closed)

◆ openDevice()

int evo::IRDeviceLibUVC::openDevice ( unsigned int  videoFormatIndex)

Open device.

Parameters
[in]videoFormatIndexformat channel
Returns
success

◆ run()

virtual void evo::IRDeviceLibUVC::run ( )
virtual

Run device, i.e., treat main thread in blocking mode.

The data is polled within this loop for Linux users. It is implemented for the user's convenience, if the main thread is desired to be occupied. User do not need to call this method, if they want to use their own grabbing loop.

◆ setFramerate()

int evo::IRDeviceLibUVC::setFramerate ( unsigned int  numerator,
unsigned int  denominator 
)

Set framerate of device (numerator / denominator)

Parameters
[in]numeratornumerator of framerate term
[in]denominatordenominator of framerate term

◆ setSerial()

void evo::IRDeviceLibUVC::setSerial ( unsigned long  serno)

Force serial number.

Parameters
[in]sernoserial number

The documentation for this class was generated from the following file: