DELTA_Device
DELTA_Device is responsible for discovering and preparing live Delta series cameras connected via USB before streaming begins. This module handles camera discovery, device initialization, and configuration. It also provides low-level access to the sensor and camera hardware through the I²C interface, allowing users to read and write registers, configure hardware settings, and perform advanced device control.
Back to API overview.
USB driver check
Before calling scanDevices(), make sure the camera is listed in Windows Device Manager with the Cypress FX3 SDK driver applied. If the device is using a default Windows driver, such as WinUSB, it may not be detected by the SDK. See the USB Driver Installation Manual and verify the driver before scanning.
Typical flow
scanDevices() -> getDeviceInfo() -> openDevice() -> applySensorSetting()
applySensorSetting() must be called before startStream(). It writes the sensor bias setting file to the device and also detects the stream version.
Functions
| Function | Purpose |
|---|---|
scanDevices() |
Scan connected Delta series USB cameras. |
getDeviceInfo() |
Read device index, port ID, device type, USB packet size, and description. |
openDevice() |
Open a scanned device and return a DeviceHandle. |
closeDevice() |
Close an opened device and release SDK resources. |
applySensorSetting() |
Apply a plain-text sensor bias setting file before streaming. |
readSensorRegister() / writeSensorRegister() |
Access 16-bit sensor register addresses, such as 0x300C. |
readDeviceRegister() / writeDeviceRegister() |
Access 8-bit device logic register addresses. |
setUsbTimeout() |
Configure USB transfer timeout in milliseconds. |
setUsbTransferSize() / getUsbTransferSize() |
Configure or read USB transfer size in KB. |
setRawBufferCount() / getRawBufferCount() |
Configure or read the number of internal raw packet buffers. |
getStreamVersion() |
Read the detected stream version after applying sensor settings. |
Function reference
Status scanDevices(std::int32_t* deviceCount);
Scans connected Delta series USB cameras and writes only the number of detected cameras to deviceCount. The scan result index is a zero-based position in the latest detected device list; it is not fixed to a specific model. Use getDeviceInfo() with a scan index to read each camera's DeviceInfo::type, such as DeviceType::Delta_01 or DeviceType::Delta_10.
Use when: Before calling getDeviceInfo() or openDevice().
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
deviceCount |
std::int32_t* |
Output | Number of detected Delta series cameras. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Scan completed successfully. |
| Error status | Scan failed. Pass the status to getStatusMessage() for details. |
Example
std::int32_t deviceCount = 0;
delta::Status status = delta::scanDevices(&deviceCount);
if (status != delta::Status::Success) {
std::cout << delta::getStatusMessage(status) << std::endl;
return;
}
if (deviceCount == 0) {
std::cout << "No Delta series camera detected." << std::endl;
return;
}
std::cout << "Detected Delta series cameras: " << deviceCount << std::endl;
Status getDeviceInfo(std::int32_t scanIndex, DeviceInfo* deviceInfo);
Gets information for a camera found by the latest scanDevices() call. The scanIndex selects one entry from the latest scan result list, and deviceInfo receives the camera metadata for that entry.
struct DeviceInfo {
std::int32_t index; // Internal device ID.
std::int32_t portID; // USB port ID.
DeviceType type; // Delta_01 or Delta_10.
std::uint32_t usbPacketSize; // USB packet size parsed from the device description.
char description[DELTA_DEVICE_DESCRIPTION_LENGTH]; // Display name, such as [Delta-01].
};
Use when: To inspect a detected device before opening it.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
scanIndex |
std::int32_t |
Input | Zero-based device index from the latest scan result. |
deviceInfo |
DeviceInfo* |
Output | Device information for the selected scan index. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Device information was read successfully. |
| Error status | The request failed. Pass the status to getStatusMessage() for details. |
Example
delta::DeviceInfo info{};
delta::Status status = delta::getDeviceInfo(0, &info);
if (status == delta::Status::Success) {
std::cout << "Device description: " << info.description << std::endl;
}
Status openDevice(std::int32_t deviceIndex, DeviceHandle* handle);
Opens one camera from the latest scan result and writes a DeviceHandle for controlling that camera. Most later live-device APIs use this DeviceHandle to configure the camera, start streaming, read registers, save raw data, or close the connection.
Use when: After scanDevices() has found at least one camera and the application needs to control one selected camera.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
deviceIndex |
std::int32_t |
Input | Device index from the latest scan result. |
handle |
DeviceHandle* |
Output | Control handle for the opened camera. Pass this handle to later live-device APIs. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Device opened successfully. |
Status::Error_DeviceNotFound |
No valid scan result exists or deviceIndex is invalid. |
| Error status | The device could not be opened. Pass the status to getStatusMessage() for details. |
Example
delta::DeviceHandle device = nullptr;
delta::scanDevices(&deviceCount);
delta::Status status = delta::openDevice(0, &device);
if (status != delta::Status::Success) {
std::cout << delta::getStatusMessage(status) << std::endl;
return;
}
Status closeDevice(DeviceHandle handle);
Closes the connection to an opened camera and releases the SDK resources associated with its DeviceHandle.
Use when: When the application is finished using the current camera, needs to disconnect it, or wants to close this handle before opening and controlling another camera.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice() for the camera to disconnect. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Device closed successfully. |
| Error status | The device could not be closed. Pass the status to getStatusMessage() for details. |
Example
delta::closeDevice(device);
device = nullptr;
Status applySensorSetting(DeviceHandle handle, const char* settingFilePath);
Applies a camera-specific sensor setting file to an opened camera. The SDK includes setting files in the settings folder; pass the path of the file you want to apply through settingFilePath. See the example below for the expected usage pattern.
Use when: Before startStream() to configure the sensor and detect the stream version.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
settingFilePath |
const char* |
Input | Path to the camera setting file, such as a file inside the SDK settings folder. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Sensor settings were applied successfully. |
Status::Error_SystemRunning |
Streaming is active and the setting cannot be applied. |
| Error status | The setting could not be applied. Pass the status to getStatusMessage() for details. |
Example
delta::Status status = delta::applySensorSetting(device, "settings/Delta_10_2000FPS_Single.txt");
if (status != delta::Status::Success) {
std::cout << delta::getStatusMessage(status) << std::endl;
}
Status readSensorRegister(DeviceHandle handle,
std::int32_t registerAddress,
std::int32_t* value);
Reads a DVS sensor register value through a I2C read operation.
Use when: To inspect sensor-side register state directly with a 16-bit sensor register address.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
registerAddress |
std::int32_t |
Input | Sensor register address to read, such as 0x300C. |
value |
std::int32_t* |
Output | Register value read from the sensor. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Register value was read successfully. |
| Error status | The read failed. Pass the status to getStatusMessage() for details. |
Example
std::int32_t value = 0;
delta::Status status = delta::readSensorRegister(device, 0x300C, &value);
Status writeSensorRegister(DeviceHandle handle,
std::int32_t registerAddress,
std::int32_t value);
Writes a DVS sensor register value through a I2C write operation.
Use when: To update sensor-side register state, using a 16-bit sensor register address.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
registerAddress |
std::int32_t |
Input | Sensor register address to write, such as 0x300C. |
value |
std::int32_t |
Input | Register value to write. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Register value was written successfully. |
| Error status | The write failed. Pass the status to getStatusMessage() for details. |
Example
delta::Status status = delta::writeSensorRegister(device, 0x300C, value);
Status readDeviceRegister(DeviceHandle handle,
std::int32_t registerAddress,
std::int32_t* value);
Reads a device control register value from an opened camera. This function is not available for Delta-01 cameras.
Use when: To inspect device-side control state, using an 8-bit device control register address.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
registerAddress |
std::int32_t |
Input | Device control register address to read, such as 0x37. |
value |
std::int32_t* |
Output | Register value read from the device control register. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Register value was read successfully. |
| Error status | The read failed. Pass the status to getStatusMessage() for details. |
Example
std::int32_t value = 0;
delta::Status status = delta::readDeviceRegister(device, 0x37, &value);
Status writeDeviceRegister(DeviceHandle handle,
std::int32_t registerAddress,
std::int32_t value);
Writes a device control register value to an opened camera. This function is not available for Delta-01 cameras.
Use when: To update device-side control state, using an 8-bit device control register address.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
registerAddress |
std::int32_t |
Input | Device control register address to write, such as 0x37. |
value |
std::int32_t |
Input | Register value to write. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Register value was written successfully. |
| Error status | The write failed. Pass the status to getStatusMessage() for details. |
Example
delta::Status status = delta::writeDeviceRegister(device, 0x37, value);
Status setUsbTimeout(DeviceHandle handle, std::int32_t timeoutMs);
Sets the USB transfer timeout in milliseconds for an opened device. if it is not changed, the default timeout is 5000 ms.
Use when: To adjust how long USB transfer operations can wait before timing out.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
timeoutMs |
std::int32_t |
Input | USB transfer timeout in milliseconds. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
USB timeout was updated successfully. |
| Error status | The timeout could not be updated. Pass the status to getStatusMessage() for details. |
Example
delta::setUsbTimeout(device, 1000);
Status setUsbTransferSize(DeviceHandle handle, std::uint32_t transferSize);
Sets the USB transfer size in KB. if it is not changed, the SDK uses the default transfer setting. The default packet count is 64.
Use when: To tune USB transfer size for live streaming performance.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
transferSize |
std::uint32_t |
Input | USB transfer size in KB. Valid range is 2 KB to 256 KB. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
USB transfer size was updated successfully. |
| Error status | The transfer size could not be updated. Pass the status to getStatusMessage() for details. |
Example
delta::setUsbTransferSize(device, 64);
Status getUsbTransferSize(DeviceHandle handle, std::uint32_t* transferSize);
Gets the current USB transfer size in KB.
Use when: To inspect the active USB transfer size setting.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
transferSize |
std::uint32_t* |
Output | USB transfer size in KB. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
USB transfer size was read successfully. |
| Error status | The transfer size could not be read. Pass the status to getStatusMessage() for details. |
Example
std::uint32_t transferSize = 0;
delta::getUsbTransferSize(device, &transferSize);
Status setRawBufferCount(DeviceHandle handle, std::uint32_t bufferCount);
Sets the number of internal raw packet buffers used to hold USB input data before packet parsing. if it is not changed, the default raw buffer count is 64.
Use when: To tune buffering behavior for live USB input.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
bufferCount |
std::uint32_t |
Input | Number of raw packet buffer nodes. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Raw buffer count was updated successfully. |
| Error status | The raw buffer count could not be updated. Pass the status to getStatusMessage() for details. |
Example
delta::setRawBufferCount(device, 128);
Status getRawBufferCount(DeviceHandle handle, std::uint32_t* bufferCount);
Gets the number of internal raw packet buffers used to hold USB input data before packet parsing.
Use when: To inspect the active raw packet buffer count.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
bufferCount |
std::uint32_t* |
Output | Number of raw packet buffer nodes. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Raw buffer count was read successfully. |
| Error status | The raw buffer count could not be read. Pass the status to getStatusMessage() for details. |
Example
std::uint32_t bufferCount = 0;
delta::getRawBufferCount(device, &bufferCount);
Status getStreamVersion(DeviceHandle handle, Version* version);
Gets the sensor stream version detected from the bias setting file header.
Use when: After applySensorSetting() to confirm whether the device is using a single or stereo stream format.
Parameters
| Name | Type | Direction | Description |
|---|---|---|---|
handle |
DeviceHandle |
Input | Device handle returned by openDevice(). |
version |
Version* |
Output | Detected stream version. Returns Version::Unknown if sensor settings have not been applied. |
Returns
| Value | Meaning |
|---|---|
Status::Success |
Stream version was read successfully. |
| Error status | The stream version could not be read. Pass the status to getStatusMessage() for details. |
Example
delta::Version version = delta::Version::Unknown;
delta::getStreamVersion(device, &version);