#include <usb_linux_utils.h>
|
static int | UvcExUnitGetProperty (int fd, uint8_t selector, uint8_t *data, size_t nbBytes) |
| Read bytes from one of the controls of the UVC extension unit. More...
|
|
static aditof::Status | uvcExUnitGetResponse (int fd, std::string &responseStr) |
| Get the response (which is encoded in a protobuf message) for the last request that was made. This is done via the UVC extension unit. More...
|
|
static aditof::Status | uvcExUnitGetString (int fd, int uvcControlId, std::string &outStr) |
| uvcExUnitGetString More...
|
|
static int | uvcExUnitReadBuffer (int fd, uint8_t selector, int16_t id, uint32_t address, uint8_t *data, uint32_t bufferLength) |
| uvcExUnitReadBuffer - Reads a chunk of data (a buffer) through the UVC Extension Unit More...
|
|
static int | uvcExUnitReadOnePacket (int fd, uint8_t selector, uint8_t *BytesToWrite, uint8_t nbBytesToWrite, uint8_t *data, uint8_t nbPacketBytes, uint8_t nbBytesToRead) |
| uvcExUnitReadOnePacket - Reads one packet of data through the UVC Extension Unit More...
|
|
static aditof::Status | uvcExUnitSendRequest (int fd, const std::string &requestStr) |
| Send a request (which is encoded in a protobuf message) via the UVC extension unit. More...
|
|
static int | UvcExUnitSetProperty (int fd, uint8_t selector, const uint8_t *data, size_t nbBytes) |
| Send bytes to one of the controls of the UVC extension unit. More...
|
|
static int | uvcExUnitWriteBuffer (int fd, uint8_t selector, int16_t id, uint32_t address, const uint8_t *data, uint32_t bufferLength) |
| uvcExUnitWriteBuffer More...
|
|
static int | xioctl (int fh, unsigned long request, void *arg) |
|
Definition at line 44 of file usb_linux_utils.h.
◆ UvcExUnitGetProperty()
int UsbLinuxUtils::UvcExUnitGetProperty |
( |
int |
fd, |
|
|
uint8_t |
selector, |
|
|
uint8_t * |
data, |
|
|
size_t |
nbBytes |
|
) |
| |
|
static |
Read bytes from one of the controls of the UVC extension unit.
- Parameters
-
fd | - The file descriptor for the UVC communication channel |
selector | - The id of the uvc control |
data | - The location where the read bytes should be stored |
nbBytes | - The number of bytes to be read |
- Returns
- int - Return 0 if operation is successful or an error code otherwise
Definition at line 287 of file usb_linux_utils.cpp.
◆ uvcExUnitGetResponse()
Get the response (which is encoded in a protobuf message) for the last request that was made. This is done via the UVC extension unit.
- Parameters
-
fd | - The file descriptor for the UVC communication channel |
responseStr | - an encoded (protobuf) string containing the response |
- Returns
- aditof::Status - Return OK if operation is successful or an error code otherwise
Definition at line 343 of file usb_linux_utils.cpp.
◆ uvcExUnitGetString()
uvcExUnitGetString
- Parameters
-
fd | - The file descriptor for the UVC communication channel |
uvcControlId | - The id of the uvc control |
outStr | - output string |
- Returns
- aditof::Status - Return OK if operation is succesful or an error code otherwise
Definition at line 241 of file usb_linux_utils.cpp.
◆ uvcExUnitReadBuffer()
int UsbLinuxUtils::uvcExUnitReadBuffer |
( |
int |
fd, |
|
|
uint8_t |
selector, |
|
|
int16_t |
id, |
|
|
uint32_t |
address, |
|
|
uint8_t * |
data, |
|
|
uint32_t |
bufferLength |
|
) |
| |
|
static |
uvcExUnitReadBuffer - Reads a chunk of data (a buffer) through the UVC Extension Unit
- Parameters
-
fd | - The file descriptor for the UVC communication channel |
selector | - The UVC control selector |
id | - The id of the instance (Temperature sensor, Storage, etc.). Setting to -1 will not send id |
address | - The address from there the reading should start |
data | - The location where the read data should be stored |
bufferLength | - The number of bytes to read |
- Returns
- int - Return 0 is operation is succesful or a negative error code otherwise
Definition at line 146 of file usb_linux_utils.cpp.
◆ uvcExUnitReadOnePacket()
int UsbLinuxUtils::uvcExUnitReadOnePacket |
( |
int |
fd, |
|
|
uint8_t |
selector, |
|
|
uint8_t * |
BytesToWrite, |
|
|
uint8_t |
nbBytesToWrite, |
|
|
uint8_t * |
data, |
|
|
uint8_t |
nbPacketBytes, |
|
|
uint8_t |
nbBytesToRead |
|
) |
| |
|
static |
uvcExUnitReadOnePacket - Reads one packet of data through the UVC Extension Unit
- Parameters
-
| fd | - The file descriptor for the UVC communication channel |
| selector | - The UVC control selector |
| BytesToWrite | - Location of the bytes to be written before doing the read |
| nbBytesToWrite | - The number of bytes to write before doing the read. Set to 0 to only use UVC_GET_CUR property and skip setting something with UVC_SET_CUR |
[out] | data | - The location where the read data should be stored |
| nbPacketBytes | - The size the package should have |
| nbBytesToRead | - The number of bytes to read from the entire package |
| getOnly | - Use only the UVC_GET_CUR property. Skip setting the address with UVC_SET_CUR |
- Returns
- int - Return 0 is operation is succesful or a negative error code otherwise
Definition at line 80 of file usb_linux_utils.cpp.
◆ uvcExUnitSendRequest()
Send a request (which is encoded in a protobuf message) via the UVC extension unit.
- Parameters
-
fd | - The file descriptor for the UVC communication channel |
requestStr | - an encoded (protobuf) string containing the request |
- Returns
- aditof::Status - Return OK if operation is successful or an error code otherwise
Definition at line 302 of file usb_linux_utils.cpp.
◆ UvcExUnitSetProperty()
int UsbLinuxUtils::UvcExUnitSetProperty |
( |
int |
fd, |
|
|
uint8_t |
selector, |
|
|
const uint8_t * |
data, |
|
|
size_t |
nbBytes |
|
) |
| |
|
static |
Send bytes to one of the controls of the UVC extension unit.
- Parameters
-
fd | - The file descriptor for the UVC communication channel |
selector | - The id of the uvc control |
data | - The location of data (bytes) to be sent |
nbBytes | - The number of bytes to be sent |
- Returns
- int - Return 0 if operation is successful or an error code otherwise
Definition at line 272 of file usb_linux_utils.cpp.
◆ uvcExUnitWriteBuffer()
int UsbLinuxUtils::uvcExUnitWriteBuffer |
( |
int |
fd, |
|
|
uint8_t |
selector, |
|
|
int16_t |
id, |
|
|
uint32_t |
address, |
|
|
const uint8_t * |
data, |
|
|
uint32_t |
bufferLength |
|
) |
| |
|
static |
uvcExUnitWriteBuffer
- Parameters
-
fd | - The file descriptor for the UVC communication channel |
selector | - The UVC control selector |
id | - The id of the instance (Temperature sensor, Storage, etc.). Setting to -1 will not send id |
address | - The address where the writing should start |
data | - The location of the data to be written |
bufferLength | - The number of bytes to write |
- Returns
- int - Return 0 is operation is succesful or a negative error code otherwise
Definition at line 188 of file usb_linux_utils.cpp.
◆ xioctl()
int UsbLinuxUtils::xioctl |
( |
int |
fh, |
|
|
unsigned long |
request, |
|
|
void * |
arg |
|
) |
| |
|
static |
The documentation for this class was generated from the following files: