@Namespace(value="dai") @NoOffset @Properties(inherit=depthai.class) public class Device extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Modifier and Type | Field and Description |
|---|---|
static float |
DEFAULT_SYSTEM_INFORMATION_LOGGING_RATE_HZ |
static long |
EVENT_QUEUE_MAXIMUM_SIZE |
| Constructor and Description |
|---|
Device() |
Device(int version)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
|
Device(int version,
boolean usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
|
Device(int version,
BytePointer pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
|
Device(int version,
DeviceInfo devInfo) |
Device(int version,
DeviceInfo devInfo,
boolean usb2Mode)
Connects to device specified by devInfo.
|
Device(int version,
DeviceInfo devInfo,
BytePointer pathToCmd)
Connects to device specified by devInfo.
|
Device(int version,
DeviceInfo devInfo,
String pathToCmd) |
Device(int version,
String pathToCmd) |
Device(Pipeline pipeline)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
|
Device(Pipeline pipeline,
boolean usb2Mode)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
|
Device(Pipeline pipeline,
BytePointer pathToCmd)
Connects to any available device with a DEFAULT_SEARCH_TIME timeout.
|
Device(Pipeline pipeline,
DeviceInfo devInfo) |
Device(Pipeline pipeline,
DeviceInfo devInfo,
boolean usb2Mode)
Connects to device specified by devInfo.
|
Device(Pipeline pipeline,
DeviceInfo devInfo,
BytePointer pathToCmd)
Connects to device specified by devInfo.
|
Device(Pipeline pipeline,
DeviceInfo devInfo,
String pathToCmd) |
Device(Pipeline pipeline,
String pathToCmd) |
Device(Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
_close()
Explicitly closes connection to device.
|
int |
addLogCallback(depthai.LogCallback callback)
Add a callback for device logging.
|
static Pointer |
DEFAULT_SEARCH_TIME()
Default search time for constructors which discover devices
|
static float |
DEFAULT_SYSTEM_INFORMATION_LOGGING_RATE_HZ()
Default rate at which system information is logged
|
static long |
EVENT_QUEUE_MAXIMUM_SIZE()
Maximum number of elements in event queue
|
boolean |
flashCalibration(CalibrationHandler calibrationDataHandler)
Stores the Calibration and Device information to the Device EEPROM
|
static DeviceInfo |
getAllAvailableDevices()
Returns all connected devices
|
static Pointer |
getAnyAvailableDevice()
Gets any available device
|
ChipTemperature |
getChipTemperature()
Retrieves current chip temperature as measured by device
|
MemoryInfo |
getCmxMemoryUsage()
Retrieves current CMX memory information from device
|
IntPointer |
getConnectedCameras()
Get cameras that are connected to the device
|
MemoryInfo |
getDdrMemoryUsage()
Retrieves current DDR memory information from device
|
static Pointer |
getDeviceByMxId(BytePointer mxId)
Finds a device by MX ID.
|
static Pointer |
getDeviceByMxId(String mxId) |
DeviceInfo |
getDeviceInfo()
Get the Device Info object o the device which is currently running
|
static BytePointer |
getEmbeddedDeviceBinary(boolean usb2Mode) |
static BytePointer |
getEmbeddedDeviceBinary(boolean usb2Mode,
int version)
Gets device firmware binary for a specific OpenVINO version
|
static Pointer |
getFirstAvailableDevice()
Gets first available device.
|
DataInputQueue |
getInputQueue(BytePointer name)
Gets an input queue corresponding to stream name.
|
DataInputQueue |
getInputQueue(BytePointer name,
int maxSize) |
DataInputQueue |
getInputQueue(BytePointer name,
int maxSize,
boolean blocking)
Gets an input queue corresponding to stream name.
|
DataInputQueue |
getInputQueue(String name) |
DataInputQueue |
getInputQueue(String name,
int maxSize) |
DataInputQueue |
getInputQueue(String name,
int maxSize,
boolean blocking) |
StringVector |
getInputQueueNames()
Get all available input queue names
|
CpuUsage |
getLeonCssCpuUsage()
Retrieves average CSS Leon CPU usage
|
MemoryInfo |
getLeonCssHeapUsage()
Retrieves current CSS Leon CPU heap information from device
|
CpuUsage |
getLeonMssCpuUsage()
Retrieves average MSS Leon CPU usage
|
MemoryInfo |
getLeonMssHeapUsage()
Retrieves current MSS Leon CPU heap information from device
|
depthai.LogLevel |
getLogLevel()
Gets current logging severity level of the device.
|
depthai.LogLevel |
getLogOutputLevel()
Gets logging level which decides printing level to standard output.
|
BytePointer |
getMxId()
Get MxId of device
|
DataOutputQueue |
getOutputQueue(BytePointer name)
Gets an output queue corresponding to stream name.
|
DataOutputQueue |
getOutputQueue(BytePointer name,
int maxSize) |
DataOutputQueue |
getOutputQueue(BytePointer name,
int maxSize,
boolean blocking)
Gets a queue corresponding to stream name, if it exists, otherwise it throws.
|
DataOutputQueue |
getOutputQueue(String name) |
DataOutputQueue |
getOutputQueue(String name,
int maxSize) |
DataOutputQueue |
getOutputQueue(String name,
int maxSize,
boolean blocking) |
StringVector |
getOutputQueueNames()
Get all available output queue names
|
BytePointer |
getQueueEvent() |
BytePointer |
getQueueEvent(BytePointer queueName) |
BytePointer |
getQueueEvent(BytePointer queueName,
Pointer timeout)
Gets or waits until specified queue has received a message
|
BytePointer |
getQueueEvent(Pointer timeout)
Gets or waits until any queue has received a message
|
String |
getQueueEvent(String queueName) |
String |
getQueueEvent(String queueName,
Pointer timeout) |
BytePointer |
getQueueEvent(StringVector queueNames) |
BytePointer |
getQueueEvent(StringVector queueNames,
Pointer timeout)
Gets or waits until any of specified queues has received a message
|
StringVector |
getQueueEvents() |
StringVector |
getQueueEvents(BytePointer queueName) |
StringVector |
getQueueEvents(BytePointer queueName,
long maxNumEvents,
Pointer timeout)
Gets or waits until specified queue has received a message
|
StringVector |
getQueueEvents(long maxNumEvents,
Pointer timeout)
Gets or waits until any any queue has received a message
|
StringVector |
getQueueEvents(String queueName) |
StringVector |
getQueueEvents(String queueName,
long maxNumEvents,
Pointer timeout) |
StringVector |
getQueueEvents(StringVector queueNames) |
StringVector |
getQueueEvents(StringVector queueNames,
long maxNumEvents,
Pointer timeout)
Gets or waits until any of specified queues has received a message
|
float |
getSystemInformationLoggingRate()
Gets current rate of system information logging ("info" severity) in Hz.
|
depthai.UsbSpeed |
getUsbSpeed()
Retrieves USB connection speed
|
boolean |
isClosed()
Is the device already closed (or disconnected)
|
boolean |
isPipelineRunning()
Checks if devices pipeline is already running
|
CalibrationHandler |
readCalibration()
Fetches the EEPROM data from the device and loads it into CalibrationHandler object
|
boolean |
removeLogCallback(int callbackId)
Removes a callback
|
void |
setLogLevel(depthai.LogLevel level)
Sets the devices logging severity level.
|
void |
setLogLevel(int level) |
void |
setLogOutputLevel(depthai.LogLevel level)
Sets logging level which decides printing level to standard output.
|
void |
setLogOutputLevel(int level) |
void |
setSystemInformationLoggingRate(float rateHz)
Sets rate of system information logging ("info" severity).
|
boolean |
startPipeline()
Deprecated.
|
boolean |
startPipeline(Pipeline pipeline)
Starts the execution of a given pipeline
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic static final long EVENT_QUEUE_MAXIMUM_SIZE
public static final float DEFAULT_SYSTEM_INFORMATION_LOGGING_RATE_HZ
public Device(Pointer p)
Pointer(Pointer).public Device(@Const @ByRef Pipeline pipeline)
pipeline - Pipeline to be executed on the devicepublic Device(@Const @ByRef Pipeline pipeline, @Cast(value="bool") boolean usb2Mode)
pipeline - Pipeline to be executed on the deviceusb2Mode - Boot device using USB2 mode firmwarepublic Device(@Const @ByRef Pipeline pipeline, @Cast(value="const char*") BytePointer pathToCmd)
pipeline - Pipeline to be executed on the devicepathToCmd - Path to custom device firmwarepublic Device(@Const @ByRef Pipeline pipeline, @Const @ByRef DeviceInfo devInfo, @Cast(value="bool") boolean usb2Mode)
pipeline - Pipeline to be executed on the devicedevInfo - DeviceInfo which specifies which device to connect tousb2Mode - Boot device using USB2 mode firmwarepublic Device(@Const @ByRef Pipeline pipeline, @Const @ByRef DeviceInfo devInfo, @Cast(value="const char*") BytePointer pathToCmd)
pipeline - Pipeline to be executed on the devicedevInfo - DeviceInfo which specifies which device to connect topathToCmd - Path to custom device firmwarepublic Device(@Const @ByRef Pipeline pipeline, @Const @ByRef DeviceInfo devInfo, String pathToCmd)
public Device(@Cast(value="dai::OpenVINO::Version") int version)
version - OpenVINO version which the device will be booted with. Default is Pipeline::DEFAULT_OPENVINO_VERSIONpublic Device()
public Device(@Cast(value="dai::OpenVINO::Version") int version, @Cast(value="bool") boolean usb2Mode)
version - OpenVINO version which the device will be booted withusb2Mode - Boot device using USB2 mode firmwarepublic Device(@Cast(value="dai::OpenVINO::Version") int version, @Cast(value="const char*") BytePointer pathToCmd)
version - OpenVINO version which the device will be booted withpathToCmd - Path to custom device firmwarepublic Device(@Cast(value="dai::OpenVINO::Version") int version, @Const @ByRef DeviceInfo devInfo, @Cast(value="bool") boolean usb2Mode)
version - OpenVINO version which the device will be booted withdevInfo - DeviceInfo which specifies which device to connect tousb2Mode - Boot device using USB2 mode firmwarepublic Device(@Cast(value="dai::OpenVINO::Version") int version, @Const @ByRef DeviceInfo devInfo)
public Device(@Cast(value="dai::OpenVINO::Version") int version, @Const @ByRef DeviceInfo devInfo, @Cast(value="const char*") BytePointer pathToCmd)
version - OpenVINO version which the device will be booted withdevInfo - DeviceInfo which specifies which device to connect topathToCmd - Path to custom device firmware@MemberGetter @ByRef @Cast(value="const std::chrono::seconds*") public static Pointer DEFAULT_SEARCH_TIME()
@MemberGetter @Cast(value="const std::size_t") public static long EVENT_QUEUE_MAXIMUM_SIZE()
@MemberGetter public static float DEFAULT_SYSTEM_INFORMATION_LOGGING_RATE_HZ()
@ByVal @Cast(value="std::tuple<bool,dai::DeviceInfo>*") public static Pointer getAnyAvailableDevice()
@ByVal @Cast(value="std::tuple<bool,dai::DeviceInfo>*") public static Pointer getFirstAvailableDevice()
@ByVal @Cast(value="std::tuple<bool,dai::DeviceInfo>*") public static Pointer getDeviceByMxId(@StdString BytePointer mxId)
mxId - MyraidX ID which uniquely specifies a device@ByVal @Cast(value="std::tuple<bool,dai::DeviceInfo>*") public static Pointer getDeviceByMxId(@StdString String mxId)
@StdVector public static DeviceInfo getAllAvailableDevices()
@Cast(value="std::uint8_t*") @StdVector public static BytePointer getEmbeddedDeviceBinary(@Cast(value="bool") boolean usb2Mode, @Cast(value="dai::OpenVINO::Version") int version)
usb2Mode - USB2 mode firmwareversion - Version of OpenVINO which firmware will support@Cast(value="std::uint8_t*") @StdVector public static BytePointer getEmbeddedDeviceBinary(@Cast(value="bool") boolean usb2Mode)
@Cast(value="bool") public boolean isPipelineRunning()
@Cast(value="bool") @Deprecated public boolean startPipeline()
@Cast(value="bool") public boolean startPipeline(@Const @ByRef Pipeline pipeline)
pipeline - OpenVINO version of the pipeline must match the one which the device was booted with.public void setLogLevel(depthai.LogLevel level)
level - Logging severitypublic depthai.LogLevel getLogLevel()
@ByVal public DeviceInfo getDeviceInfo()
public void setLogOutputLevel(depthai.LogLevel level)
level - Standard output printing severitypublic depthai.LogLevel getLogOutputLevel()
public int addLogCallback(depthai.LogCallback callback)
callback - Callback to call whenever a log message arrives@Cast(value="bool") public boolean removeLogCallback(int callbackId)
callbackId - Id of callback to be removedpublic void setSystemInformationLoggingRate(float rateHz)
rateHz - Logging rate in Hzpublic float getSystemInformationLoggingRate()
@SharedPtr public DataOutputQueue getOutputQueue(@StdString BytePointer name)
name - Queue/stream name, created by XLinkOut node@SharedPtr public DataOutputQueue getOutputQueue(@StdString String name)
@SharedPtr public DataOutputQueue getOutputQueue(@StdString BytePointer name, @Cast(value="unsigned int") int maxSize, @Cast(value="bool") boolean blocking)
name - Queue/stream name, set in XLinkOut nodemaxSize - Maximum number of messages in queueblocking - Queue behavior once full. True specifies blocking and false overwriting of oldest messages. Default: true@SharedPtr public DataOutputQueue getOutputQueue(@StdString BytePointer name, @Cast(value="unsigned int") int maxSize)
@SharedPtr public DataOutputQueue getOutputQueue(@StdString String name, @Cast(value="unsigned int") int maxSize, @Cast(value="bool") boolean blocking)
@SharedPtr public DataOutputQueue getOutputQueue(@StdString String name, @Cast(value="unsigned int") int maxSize)
@ByVal public StringVector getOutputQueueNames()
@SharedPtr public DataInputQueue getInputQueue(@StdString BytePointer name)
name - Queue/stream name, set in XLinkIn node@SharedPtr public DataInputQueue getInputQueue(@StdString String name)
@SharedPtr public DataInputQueue getInputQueue(@StdString BytePointer name, @Cast(value="unsigned int") int maxSize, @Cast(value="bool") boolean blocking)
name - Queue/stream name, set in XLinkOut nodemaxSize - Maximum number of messages in queueblocking - Queue behavior once full. True: blocking, false: overwriting of oldest messages. Default: true@SharedPtr public DataInputQueue getInputQueue(@StdString BytePointer name, @Cast(value="unsigned int") int maxSize)
@SharedPtr public DataInputQueue getInputQueue(@StdString String name, @Cast(value="unsigned int") int maxSize, @Cast(value="bool") boolean blocking)
@SharedPtr public DataInputQueue getInputQueue(@StdString String name, @Cast(value="unsigned int") int maxSize)
@ByVal public StringVector getInputQueueNames()
@ByVal public StringVector getQueueEvents(@Const @ByRef StringVector queueNames, @Cast(value="std::size_t") long maxNumEvents, @ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
queueNames - Names of queues for which to blockmaxNumEvents - Maximum number of events to remove from queue - Default is unlimitedtimeout - Timeout after which return regardless. If negative then wait is indefinite - Default is -1@ByVal public StringVector getQueueEvents(@Const @ByRef StringVector queueNames)
@ByVal public StringVector getQueueEvents(@StdString BytePointer queueName, @Cast(value="std::size_t") long maxNumEvents, @ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
queueName - Name of queues for which to wait formaxNumEvents - Maximum number of events to remove from queue. Default is unlimitedtimeout - Timeout after which return regardless. If negative then wait is indefinite. Default is -1@ByVal public StringVector getQueueEvents(@StdString BytePointer queueName)
@ByVal public StringVector getQueueEvents(@StdString String queueName, @Cast(value="std::size_t") long maxNumEvents, @ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
@ByVal public StringVector getQueueEvents(@StdString String queueName)
@ByVal public StringVector getQueueEvents(@Cast(value="std::size_t") long maxNumEvents, @ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
maxNumEvents - Maximum number of events to remove from queue. Default is unlimitedtimeout - Timeout after which return regardless. If negative then wait is indefinite. Default is -1@ByVal public StringVector getQueueEvents()
@StdString public BytePointer getQueueEvent(@Const @ByRef StringVector queueNames, @ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
queueNames - Names of queues for which to wait fortimeout - Timeout after which return regardless. If negative then wait is indefinite. Default is -1@StdString public BytePointer getQueueEvent(@Const @ByRef StringVector queueNames)
@StdString public BytePointer getQueueEvent(@StdString BytePointer queueName, @ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
queueNames - Name of queues for which to wait fortimeout - Timeout after which return regardless. If negative then wait is indefinite. Default is -1@StdString public BytePointer getQueueEvent(@StdString BytePointer queueName)
@StdString public String getQueueEvent(@StdString String queueName, @ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
@StdString public String getQueueEvent(@StdString String queueName)
@StdString public BytePointer getQueueEvent(@ByVal(nullValue="std::chrono::microseconds(-1)") @Cast(value="std::chrono::microseconds*") Pointer timeout)
timeout - Timeout after which return regardless. If negative then wait is indefinite. Default is -1@StdString public BytePointer getQueueEvent()
@StdString public BytePointer getMxId()
@StdVector @Cast(value="dai::CameraBoardSocket*") public IntPointer getConnectedCameras()
@ByVal public MemoryInfo getDdrMemoryUsage()
@ByVal public MemoryInfo getCmxMemoryUsage()
@ByVal public MemoryInfo getLeonCssHeapUsage()
@ByVal public MemoryInfo getLeonMssHeapUsage()
@ByVal public ChipTemperature getChipTemperature()
@ByVal public CpuUsage getLeonCssCpuUsage()
@ByVal public CpuUsage getLeonMssCpuUsage()
@Cast(value="bool") public boolean flashCalibration(@ByVal CalibrationHandler calibrationDataHandler)
calibrationObj - CalibrationHandler object which is loaded with calibration information.@ByVal public CalibrationHandler readCalibration()
public depthai.UsbSpeed getUsbSpeed()
@Name(value="close") public void _close()
Copyright © 2021. All rights reserved.