# TYCamport3: TYApi.h File Reference

TYApi.h File Reference

TYApi.h includes camera control and data receiving interface, which supports configuration for image resolution, frame rate, exposure time, gain, working mode,etc. More...

`#include <stddef.h>`
`#include <stdlib.h>`
`#include <stdint.h>`
`#include "TYVer.h"`
Include dependency graph for TYApi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes

struct | TY_VERSION_INFO
struct | TY_DEVICE_NET_INFO
| device network information More...
struct | TY_DEVICE_USB_INFO
struct | TY_INTERFACE_INFO
struct | TY_DEVICE_BASE_INFO
struct | TY_FEATURE_INFO
struct | TY_INT_RANGE
struct | TY_FLOAT_RANGE
| float range data structure More...
struct | TY_BYTEARRAY_ATTR
| byte array data structure More...
struct | TY_ENUM_ENTRY
struct | TY_VECT_3F
struct | TY_CAMERA_INTRINSIC
struct | TY_CAMERA_EXTRINSIC
struct | TY_CAMERA_DISTORTION
struct | TY_CAMERA_CALIB_INFO
struct | TY_TRIGGER_PARAM
struct | TY_TRIGGER_PARAM_EX
struct | TY_TRIGGER_TIMER_LIST
struct | TY_TRIGGER_TIMER_PERIOD
struct | TY_AEC_ROI_PARAM
struct | TY_CAMERA_STATISTICS
struct | TY_IMU_DATA
struct | TY_ACC_BIAS
struct | TY_ACC_MISALIGNMENT
struct | TY_ACC_SCALE
struct | TY_GYRO_BIAS
struct | TY_GYRO_MISALIGNMENT
struct | TY_GYRO_SCALE
struct | TY_CAMERA_TO_IMU
struct | TY_TOF_FREQ
struct | TY_IMAGE_DATA
struct | TY_FRAME_DATA
struct | TY_EVENT_INFO
struct | TY_DO_WORKMODE
struct | TY_DI_WORKMODE

## Macros

#define | _STDBOOL_H
#define | __bool_true_false_are_defined 1
#define | bool _Bool
#define | true 1
#define | false 0
#define | TY_DLLIMPORT __attribute__((visibility("default")))
#define | TY_DLLEXPORT __attribute__((visibility("default")))
#define | TY_STDC
#define | TY_CDEC
#define | TY_EXPORT TY_DLLIMPORT
#define | TY_EXTC
#define | TY_DECLARE_IMAGE_MODE0(pix, res) TY_IMAGE_MODE_##pix##_##res = TY_PIXEL_FORMAT_##pix | TY_RESOLUTION_MODE_##res
#define | TY_DECLARE_IMAGE_MODE1(pix)
#define | TY_CAPI TY_EXTC TY_EXPORT TY_STATUS TY_STDC

## Typedefs

typedef enum TY_STATUS_LIST | TY_STATUS_LIST
| API call return status.
typedef int32_t | TY_STATUS
typedef enum TY_FW_ERRORCODE_LIST | TY_FW_ERRORCODE_LIST
typedef uint32_t | TY_FW_ERRORCODE
typedef enum TY_EVENT_LIST | TY_ENENT_LIST
typedef int32_t | TY_EVENT
typedef void * | TY_INTERFACE_HANDLE
| Interface handle.
typedef void * | TY_DEV_HANDLE
| Device Handle.
typedef enum TY_DEVICE_COMPONENT_LIST | TY_DEVICE_COMPONENT_LIST
typedef uint32_t | TY_COMPONENT_ID
| component unique id More...
typedef enum TY_FEATURE_TYPE_LIST | TY_FEATURE_TYPE_LIST
| Feature Format Type definitions.
typedef uint32_t | TY_FEATURE_TYPE
typedef enum TY_FEATURE_ID_LIST | TY_FEATURE_ID_LIST
| feature for component definitions
typedef uint32_t | TY_FEATURE_ID
| feature unique id More...
typedef enum TY_DEPTH_QUALITY_LIST | TY_DEPTH_QUALITY_LIST
typedef uint32_t | TY_DEPTH_QUALITY
typedef enum TY_TRIGGER_POL_LIST | TY_TRIGGER_POL_LIST
| set external trigger signal edge
typedef uint32_t | TY_TRIGGER_POL
typedef enum TY_INTERFACE_TYPE_LIST | TY_INTERFACE_TYPE_LIST
typedef uint32_t | TY_INTERFACE_TYPE
typedef enum TY_ACCESS_MODE_LIST | TY_ACCESS_MODE_LIST
typedef uint8_t | TY_ACCESS_MODE
typedef enum TY_STREAM_ASYNC_MODE_LIST | TY_STREAM_ASYNC_MODE_LIST
| stream async mode
typedef uint8_t | TY_STREAM_ASYNC_MODE
typedef enum TY_PIXEL_BITS_LIST | TY_PIXEL_BITS_LIST
typedef uint32_t | TY_PIXEL_BITS
typedef enum TY_PIXEL_FORMAT_LIST | TY_PIXEL_FORMAT_LIST
| pixel format definitions
typedef uint32_t | TY_PIXEL_FORMAT
typedef enum TY_RESOLUTION_MODE_LIST | TY_RESOLUTION_MODE_LIST
| predefined resolution list
typedef int32_t | TY_RESOLUTION_MODE
typedef enum TY_IMAGE_MODE_LIST | TY_IMAGE_MODE_LIST
| Predefined Image Mode List image mode controls image resolution & format predefined image modes named like TY_IMAGE_MODE_MONO_160x120,TY_IMAGE_MODE_RGB_1280x960.
typedef uint32_t | TY_IMAGE_MODE
typedef enum TY_TRIGGER_MODE_LIST | TY_TRIGGER_MODE_LIST
typedef int16_t | TY_TRIGGER_MODE
typedef enum TY_TIME_SYNC_TYPE_LIST | TY_TIME_SYNC_TYPE_LIST
| type of time sync
typedef uint32_t | TY_TIME_SYNC_TYPE
typedef uint32_t | TY_E_VOLT_T
typedef uint32_t | TY_E_DO_MODE
typedef uint32_t | TY_E_DI_MODE
typedef uint32_t | TY_E_DI_INT_ACTION
typedef struct TY_VERSION_INFO | TY_VERSION_INFO
typedef struct TY_DEVICE_NET_INFO | TY_DEVICE_NET_INFO
| device network information
typedef struct TY_DEVICE_USB_INFO | TY_DEVICE_USB_INFO
typedef struct TY_INTERFACE_INFO | TY_INTERFACE_INFO
typedef struct TY_DEVICE_BASE_INFO | TY_DEVICE_BASE_INFO
typedef struct TY_FEATURE_INFO | TY_FEATURE_INFO
typedef struct TY_INT_RANGE | TY_INT_RANGE
typedef struct TY_FLOAT_RANGE | TY_FLOAT_RANGE
| float range data structure More...
typedef struct TY_BYTEARRAY_ATTR | TY_BYTEARRAY_ATTR
| byte array data structure More...
typedef struct TY_ENUM_ENTRY | TY_ENUM_ENTRY
typedef struct TY_VECT_3F | TY_VECT_3F
typedef struct TY_CAMERA_INTRINSIC | TY_CAMERA_INTRINSIC
typedef struct TY_CAMERA_EXTRINSIC | TY_CAMERA_EXTRINSIC
typedef struct TY_CAMERA_DISTORTION | TY_CAMERA_DISTORTION
typedef struct TY_CAMERA_CALIB_INFO | TY_CAMERA_CALIB_INFO
typedef struct TY_TRIGGER_PARAM | TY_TRIGGER_PARAM
typedef struct TY_TRIGGER_PARAM_EX | TY_TRIGGER_PARAM_EX
typedef struct TY_TRIGGER_TIMER_LIST | TY_TRIGGER_TIMER_LIST
typedef struct TY_TRIGGER_TIMER_PERIOD | TY_TRIGGER_TIMER_PERIOD
typedef struct TY_AEC_ROI_PARAM | TY_AEC_ROI_PARAM
typedef struct TY_CAMERA_STATISTICS | TY_CAMERA_STATISTICS
typedef struct TY_IMU_DATA | TY_IMU_DATA
typedef struct TY_ACC_BIAS | TY_ACC_BIAS
typedef struct TY_ACC_MISALIGNMENT | TY_ACC_MISALIGNMENT
typedef struct TY_ACC_SCALE | TY_ACC_SCALE
typedef struct TY_GYRO_BIAS | TY_GYRO_BIAS
typedef struct TY_GYRO_MISALIGNMENT | TY_GYRO_MISALIGNMENT
typedef struct TY_GYRO_SCALE | TY_GYRO_SCALE
typedef struct TY_CAMERA_TO_IMU | TY_CAMERA_TO_IMU
typedef struct TY_TOF_FREQ | TY_TOF_FREQ
typedef enum TY_IMU_FPS_LIST | TY_IMU_FPS_LIST
typedef struct TY_IMAGE_DATA | TY_IMAGE_DATA
typedef struct TY_FRAME_DATA | TY_FRAME_DATA
typedef struct TY_EVENT_INFO | TY_EVENT_INFO
typedef struct TY_DO_WORKMODE | TY_DO_WORKMODE
typedef struct TY_DI_WORKMODE | TY_DI_WORKMODE
typedef void(* | TY_EVENT_CALLBACK) (TY_EVENT_INFO *, void *userdata)
typedef void(* | TY_IMU_CALLBACK) (TY_IMU_DATA *, void *userdata)

## Enumerations

enum

TY_STATUS_LIST : int32_t {
TY_STATUS_OK = 0, TY_STATUS_ERROR = -1001, TY_STATUS_NOT_INITED = -1002, TY_STATUS_NOT_IMPLEMENTED = -1003,
TY_STATUS_NOT_PERMITTED = -1004, TY_STATUS_DEVICE_ERROR = -1005, TY_STATUS_INVALID_PARAMETER = -1006, TY_STATUS_INVALID_HANDLE = -1007,
TY_STATUS_INVALID_COMPONENT = -1008, TY_STATUS_INVALID_FEATURE = -1009, TY_STATUS_WRONG_TYPE = -1010, TY_STATUS_WRONG_SIZE = -1011,
TY_STATUS_OUT_OF_MEMORY = -1012, TY_STATUS_OUT_OF_RANGE = -1013, TY_STATUS_TIMEOUT = -1014, TY_STATUS_WRONG_MODE = -1015,
TY_STATUS_BUSY = -1016, TY_STATUS_IDLE = -1017, TY_STATUS_NO_DATA = -1018, TY_STATUS_NO_BUFFER = -1019,
TY_STATUS_NULL_POINTER = -1020, TY_STATUS_READONLY_FEATURE = -1021, TY_STATUS_INVALID_DESCRIPTOR = -1022, TY_STATUS_INVALID_INTERFACE = -1023,
TY_STATUS_FIRMWARE_ERROR = -1024, TY_STATUS_DEV_EPERM = -1, TY_STATUS_DEV_EIO = -5, TY_STATUS_DEV_ENOMEM = -12,
TY_STATUS_DEV_EBUSY = -16, TY_STATUS_DEV_EINVAL = -22
}

| API call return status.

enum

TY_FW_ERRORCODE_LIST : uint32_t {
TY_FW_ERRORCODE_CAM0_NOT_DETECTED = 0x00000001, TY_FW_ERRORCODE_CAM1_NOT_DETECTED = 0x00000002, TY_FW_ERRORCODE_CAM2_NOT_DETECTED = 0x00000004, TY_FW_ERRORCODE_POE_NOT_INIT = 0x00000008,
TY_FW_ERRORCODE_RECMAP_NOT_CORRECT = 0x00000010, TY_FW_ERRORCODE_LOOKUPTABLE_NOT_CORRECT = 0x00000020, TY_FW_ERRORCODE_DRV8899_NOT_INIT = 0x00000040, TY_FW_ERRORCODE_CONFIG_NOT_FOUND = 0x00010000,
TY_FW_ERRORCODE_CONFIG_NOT_CORRECT = 0x00020000, TY_FW_ERRORCODE_XML_NOT_FOUND = 0x00040000, TY_FW_ERRORCODE_XML_NOT_CORRECT = 0x00080000, TY_FW_ERRORCODE_XML_OVERRIDE_FAILED = 0x00100000,
TY_FW_ERRORCODE_CAM_INIT_FAILED = 0x00200000, TY_FW_ERRORCODE_LASER_INIT_FAILED = 0x00400000
}

enum | TY_EVENT_LIST : int32_t { TY_EVENT_DEVICE_OFFLINE = -2001, TY_EVENT_LICENSE_ERROR = -2002, TY_EVENT_FW_INIT_ERROR = -2003 }

enum

TY_DEVICE_COMPONENT_LIST : uint32_t {
TY_COMPONENT_DEVICE = 0x80000000, TY_COMPONENT_DEPTH_CAM = 0x00010000, TY_COMPONENT_IR_CAM_LEFT = 0x00040000, TY_COMPONENT_IR_CAM_RIGHT = 0x00080000,
TY_COMPONENT_RGB_CAM_LEFT = 0x00100000, TY_COMPONENT_RGB_CAM_RIGHT = 0x00200000, TY_COMPONENT_LASER = 0x00400000, TY_COMPONENT_IMU = 0x00800000,
TY_COMPONENT_BRIGHT_HISTO = 0x01000000, TY_COMPONENT_STORAGE = 0x02000000, TY_COMPONENT_RGB_CAM = TY_COMPONENT_RGB_CAM_LEFT
}

enum | TY_FEATURE_TYPE_LIST : uint32_t { TY_FEATURE_INT = 0x1000, TY_FEATURE_FLOAT = 0X2000, TY_FEATURE_ENUM = 0x3000, TY_FEATURE_BOOL = 0x4000, TY_FEATURE_STRING = 0x5000, TY_FEATURE_BYTEARRAY = 0x6000, TY_FEATURE_STRUCT = 0x7000 }
| Feature Format Type definitions.

enum

TY_FEATURE_ID_LIST : uint32_t {
TY_STRUCT_CAM_INTRINSIC = 0x0000 | TY_FEATURE_STRUCT, TY_STRUCT_EXTRINSIC_TO_DEPTH = 0x0001 | TY_FEATURE_STRUCT, TY_STRUCT_EXTRINSIC_TO_IR_LEFT = 0x0002 | TY_FEATURE_STRUCT, TY_STRUCT_CAM_DISTORTION = 0x0006 | TY_FEATURE_STRUCT,
TY_STRUCT_CAM_CALIB_DATA = 0x0007 | TY_FEATURE_STRUCT, TY_STRUCT_CAM_RECTIFIED_INTRI = 0x0008 | TY_FEATURE_STRUCT, TY_BYTEARRAY_CUSTOM_BLOCK = 0x000A | TY_FEATURE_BYTEARRAY, TY_BYTEARRAY_ISP_BLOCK = 0x000B | TY_FEATURE_BYTEARRAY,
TY_INT_PERSISTENT_IP = 0x0010 | TY_FEATURE_INT, TY_INT_PERSISTENT_SUBMASK = 0x0011 | TY_FEATURE_INT, TY_INT_PERSISTENT_GATEWAY = 0x0012 | TY_FEATURE_INT, TY_BOOL_GVSP_RESEND = 0x0013 | TY_FEATURE_BOOL,
TY_INT_PACKET_DELAY = 0x0014 | TY_FEATURE_INT, TY_INT_ACCEPTABLE_PERCENT = 0x0015 | TY_FEATURE_INT, TY_INT_NTP_SERVER_IP = 0x0016 | TY_FEATURE_INT, TY_INT_PACKET_SIZE = 0x0017 | TY_FEATURE_INT,
TY_INT_LINK_CMD_TIMEOUT = 0x0018 | TY_FEATURE_INT, TY_STRUCT_CAM_STATISTICS = 0x00ff | TY_FEATURE_STRUCT, TY_INT_WIDTH_MAX = 0x0100 | TY_FEATURE_INT, TY_INT_HEIGHT_MAX = 0x0101 | TY_FEATURE_INT,
TY_INT_OFFSET_X = 0x0102 | TY_FEATURE_INT, TY_INT_OFFSET_Y = 0x0103 | TY_FEATURE_INT, TY_INT_WIDTH = 0x0104 | TY_FEATURE_INT, TY_INT_HEIGHT = 0x0105 | TY_FEATURE_INT,
TY_ENUM_IMAGE_MODE = 0x0109 | TY_FEATURE_ENUM, TY_FLOAT_SCALE_UNIT = 0x010a | TY_FEATURE_FLOAT, TY_ENUM_TRIGGER_POL = 0x0201 | TY_FEATURE_ENUM, TY_INT_FRAME_PER_TRIGGER = 0x0202 | TY_FEATURE_INT,
TY_STRUCT_TRIGGER_PARAM = 0x0523 | TY_FEATURE_STRUCT, TY_STRUCT_TRIGGER_PARAM_EX = 0x0525 | TY_FEATURE_STRUCT, TY_STRUCT_TRIGGER_TIMER_LIST = 0x0526 | TY_FEATURE_STRUCT, TY_STRUCT_TRIGGER_TIMER_PERIOD = 0x0527 | TY_FEATURE_STRUCT,
TY_BOOL_KEEP_ALIVE_ONOFF = 0x0203 | TY_FEATURE_BOOL, TY_INT_KEEP_ALIVE_TIMEOUT = 0x0204 | TY_FEATURE_INT, TY_BOOL_CMOS_SYNC = 0x0205 | TY_FEATURE_BOOL, TY_INT_TRIGGER_DELAY_US = 0x0206 | TY_FEATURE_INT,
TY_BOOL_TRIGGER_OUT_IO = 0x0207 | TY_FEATURE_BOOL, TY_INT_TRIGGER_DURATION_US = 0x0208 | TY_FEATURE_INT, TY_ENUM_STREAM_ASYNC = 0x0209 | TY_FEATURE_ENUM, TY_INT_CAPTURE_TIME_US = 0x0210 | TY_FEATURE_INT,
TY_ENUM_TIME_SYNC_TYPE = 0x0211 | TY_FEATURE_ENUM, TY_BOOL_TIME_SYNC_READY = 0x0212 | TY_FEATURE_BOOL, TY_BOOL_FLASHLIGHT = 0x0213 | TY_FEATURE_BOOL, TY_INT_FLASHLIGHT_INTENSITY = 0x0214 | TY_FEATURE_INT,
TY_STRUCT_DO0_WORKMODE = 0x0215 | TY_FEATURE_STRUCT, TY_STRUCT_DI0_WORKMODE = 0x0216 | TY_FEATURE_STRUCT, TY_STRUCT_DO1_WORKMODE = 0x0217 | TY_FEATURE_STRUCT, TY_STRUCT_DI1_WORKMODE = 0x0218 | TY_FEATURE_STRUCT,
TY_STRUCT_DO2_WORKMODE = 0x0219 | TY_FEATURE_STRUCT, TY_STRUCT_DI2_WORKMODE = 0x0220 | TY_FEATURE_STRUCT, TY_BOOL_AUTO_EXPOSURE = 0x0300 | TY_FEATURE_BOOL, TY_INT_EXPOSURE_TIME = 0x0301 | TY_FEATURE_INT,
TY_BOOL_AUTO_GAIN = 0x0302 | TY_FEATURE_BOOL, TY_INT_GAIN = 0x0303 | TY_FEATURE_INT, TY_BOOL_AUTO_AWB = 0x0304 | TY_FEATURE_BOOL, TY_STRUCT_AEC_ROI = 0x0305 | TY_FEATURE_STRUCT,
TY_INT_TOF_HDR_RATIO = 0x0306 | TY_FEATURE_INT, TY_INT_TOF_JITTER_THRESHOLD = 0x0307 | TY_FEATURE_INT, TY_INT_LASER_POWER = 0x0500 | TY_FEATURE_INT, TY_BOOL_LASER_AUTO_CTRL = 0x0501 | TY_FEATURE_BOOL,
TY_BOOL_UNDISTORTION = 0x0510 | TY_FEATURE_BOOL, TY_BOOL_BRIGHTNESS_HISTOGRAM = 0x0511 | TY_FEATURE_BOOL, TY_BOOL_DEPTH_POSTPROC = 0x0512 | TY_FEATURE_BOOL, TY_INT_R_GAIN = 0x0520 | TY_FEATURE_INT,
TY_INT_G_GAIN = 0x0521 | TY_FEATURE_INT, TY_INT_B_GAIN = 0x0522 | TY_FEATURE_INT, TY_INT_ANALOG_GAIN = 0x0524 | TY_FEATURE_INT, TY_BOOL_HDR = 0x0525 | TY_FEATURE_BOOL,
TY_BYTEARRAY_HDR_PARAMETER = 0x0526 | TY_FEATURE_BYTEARRAY, TY_BOOL_IMU_DATA_ONOFF = 0x0600 | TY_FEATURE_BOOL, TY_STRUCT_IMU_ACC_BIAS = 0x0601 | TY_FEATURE_STRUCT, TY_STRUCT_IMU_ACC_MISALIGNMENT = 0x0602 | TY_FEATURE_STRUCT,
TY_STRUCT_IMU_ACC_SCALE = 0x0603 | TY_FEATURE_STRUCT, TY_STRUCT_IMU_GYRO_BIAS = 0x0604 | TY_FEATURE_STRUCT, TY_STRUCT_IMU_GYRO_MISALIGNMENT = 0x0605 | TY_FEATURE_STRUCT, TY_STRUCT_IMU_GYRO_SCALE = 0x0606 | TY_FEATURE_STRUCT,
TY_STRUCT_IMU_CAM_TO_IMU = 0x0607 | TY_FEATURE_STRUCT, TY_ENUM_IMU_FPS = 0x0608 | TY_FEATURE_ENUM, TY_INT_SGBM_IMAGE_NUM = 0x0610 | TY_FEATURE_INT, TY_INT_SGBM_DISPARITY_NUM = 0x0611 | TY_FEATURE_INT,
TY_INT_SGBM_DISPARITY_OFFSET = 0x0612 | TY_FEATURE_INT, TY_INT_SGBM_MATCH_WIN_HEIGHT = 0x0613 | TY_FEATURE_INT, TY_INT_SGBM_SEMI_PARAM_P1 = 0x0614 | TY_FEATURE_INT, TY_INT_SGBM_SEMI_PARAM_P2 = 0x0615 | TY_FEATURE_INT,
TY_INT_SGBM_UNIQUE_FACTOR = 0x0616 | TY_FEATURE_INT, TY_INT_SGBM_UNIQUE_ABSDIFF = 0x0617 | TY_FEATURE_INT, TY_INT_SGBM_COST_PARAM = 0x0618 | TY_FEATURE_INT, TY_BOOL_SGBM_HFILTER_HALF_WIN = 0x0619 | TY_FEATURE_BOOL,
TY_INT_SGBM_MATCH_WIN_WIDTH = 0x061A | TY_FEATURE_INT, TY_BOOL_SGBM_MEDFILTER = 0x061B | TY_FEATURE_BOOL, TY_BOOL_SGBM_LRC = 0x061C | TY_FEATURE_BOOL, TY_INT_SGBM_LRC_DIFF = 0x061D | TY_FEATURE_INT,
TY_INT_SGBM_MEDFILTER_THRESH = 0x061E | TY_FEATURE_INT, TY_INT_SGBM_SEMI_PARAM_P1_SCALE = 0x061F | TY_FEATURE_INT, TY_ENUM_DEPTH_QUALITY = 0x0900 | TY_FEATURE_ENUM, TY_INT_FILTER_THRESHOLD = 0x0901 | TY_FEATURE_INT,
TY_INT_TOF_CHANNEL = 0x0902 | TY_FEATURE_INT, TY_INT_TOF_MODULATION_THRESHOLD = 0x0903 | TY_FEATURE_INT, TY_STRUCT_TOF_FREQ = 0x0904 | TY_FEATURE_STRUCT, TY_BOOL_TOF_ANTI_INTERFERENCE = 0x0905 | TY_FEATURE_BOOL
}

| feature for component definitions More...
enum | TY_DEPTH_QUALITY_LIST : uint32_t { TY_DEPTH_QUALITY_BASIC = 1, TY_DEPTH_QUALITY_MEDIUM = 2, TY_DEPTH_QUALITY_HIGH = 4 }
enum | TY_TRIGGER_POL_LIST : uint32_t { TY_TRIGGER_POL_FALLINGEDGE = 0, TY_TRIGGER_POL_RISINGEDGE = 1 }
| set external trigger signal edge
enum | TY_INTERFACE_TYPE_LIST : uint32_t { TY_INTERFACE_UNKNOWN = 0, TY_INTERFACE_RAW = 1, TY_INTERFACE_USB = 2, TY_INTERFACE_ETHERNET = 4, TY_INTERFACE_IEEE80211 = 8, TY_INTERFACE_ALL = 0xffff }
enum | TY_ACCESS_MODE_LIST : uint32_t { TY_ACCESS_READABLE = 0x1, TY_ACCESS_WRITABLE = 0x2 }
enum | TY_STREAM_ASYNC_MODE_LIST : uint32_t { TY_STREAM_ASYNC_OFF = 0, TY_STREAM_ASYNC_DEPTH = 1, TY_STREAM_ASYNC_RGB = 2, TY_STREAM_ASYNC_DEPTH_RGB = 3, TY_STREAM_ASYNC_ALL = 0xff }
| stream async mode
enum | TY_PIXEL_BITS_LIST : uint32_t { TY_PIXEL_8BIT = 0x1 << 28, TY_PIXEL_16BIT = 0x2 << 28, TY_PIXEL_24BIT = 0x3 << 28, TY_PIXEL_32BIT = 0x4 << 28, TY_PIXEL_10BIT = 0x5 << 28, TY_PIXEL_12BIT = 0x6 << 28, TY_PIXEL_14BIT = 0x7 << 28, TY_PIXEL_48BIT = (uint32_t)0x8 << 28, TY_PIXEL_64BIT = (uint32_t)0xa << 28 }

enum

TY_PIXEL_FORMAT_LIST : uint32_t {
TY_PIXEL_FORMAT_UNDEFINED = 0, TY_PIXEL_FORMAT_MONO = (TY_PIXEL_8BIT | (0x0 << 24)), TY_PIXEL_FORMAT_BAYER8GB = (TY_PIXEL_8BIT | (0x1 << 24)), TY_PIXEL_FORMAT_BAYER8BG = (TY_PIXEL_8BIT | (0x2 << 24)),
TY_PIXEL_FORMAT_BAYER8GR = (TY_PIXEL_8BIT | (0x3 << 24)), TY_PIXEL_FORMAT_BAYER8RG = (TY_PIXEL_8BIT | (0x4 << 24)), TY_PIXEL_FORMAT_BAYER8GRBG = TY_PIXEL_FORMAT_BAYER8GB, TY_PIXEL_FORMAT_BAYER8RGGB = TY_PIXEL_FORMAT_BAYER8BG,
TY_PIXEL_FORMAT_BAYER8GBRG = TY_PIXEL_FORMAT_BAYER8GR, TY_PIXEL_FORMAT_BAYER8BGGR = TY_PIXEL_FORMAT_BAYER8RG, TY_PIXEL_FORMAT_CSI_MONO10 = (TY_PIXEL_10BIT | (0x0 << 24)), TY_PIXEL_FORMAT_CSI_BAYER10GRBG = (TY_PIXEL_10BIT | (0x1 << 24)),
TY_PIXEL_FORMAT_CSI_BAYER10RGGB = (TY_PIXEL_10BIT | (0x2 << 24)), TY_PIXEL_FORMAT_CSI_BAYER10GBRG = (TY_PIXEL_10BIT | (0x3 << 24)), TY_PIXEL_FORMAT_CSI_BAYER10BGGR = (TY_PIXEL_10BIT | (0x4 << 24)), TY_PIXEL_FORMAT_CSI_MONO12 = (TY_PIXEL_12BIT | (0x0 << 24)),
TY_PIXEL_FORMAT_CSI_BAYER12GRBG = (TY_PIXEL_12BIT | (0x1 << 24)), TY_PIXEL_FORMAT_CSI_BAYER12RGGB = (TY_PIXEL_12BIT | (0x2 << 24)), TY_PIXEL_FORMAT_CSI_BAYER12GBRG = (TY_PIXEL_12BIT | (0x3 << 24)), TY_PIXEL_FORMAT_CSI_BAYER12BGGR = (TY_PIXEL_12BIT | (0x4 << 24)),
TY_PIXEL_FORMAT_DEPTH16 = (TY_PIXEL_16BIT | (0x0 << 24)), TY_PIXEL_FORMAT_YVYU = (TY_PIXEL_16BIT | (0x1 << 24)), TY_PIXEL_FORMAT_YUYV = (TY_PIXEL_16BIT | (0x2 << 24)), TY_PIXEL_FORMAT_MONO16 = (TY_PIXEL_16BIT | (0x3 << 24)),
TY_PIXEL_FORMAT_TOF_IR_MONO16 = (TY_PIXEL_64BIT | (0x4 << 24)), TY_PIXEL_FORMAT_RGB = (TY_PIXEL_24BIT | (0x0 << 24)), TY_PIXEL_FORMAT_BGR = (TY_PIXEL_24BIT | (0x1 << 24)), TY_PIXEL_FORMAT_JPEG = (TY_PIXEL_24BIT | (0x2 << 24)),
TY_PIXEL_FORMAT_MJPG = (TY_PIXEL_24BIT | (0x3 << 24)), TY_PIXEL_FORMAT_RGB48 = (TY_PIXEL_48BIT | (0x0 << 24)), TY_PIXEL_FORMAT_BGR48 = (TY_PIXEL_48BIT | (0x1 << 24)), TY_PIXEL_FORMAT_XYZ48 = (TY_PIXEL_48BIT | (0x2 << 24))
}

| pixel format definitions More...

enum

TY_RESOLUTION_MODE_LIST : uint32_t {
TY_RESOLUTION_MODE_160x100 = (160<<12)+100, TY_RESOLUTION_MODE_160x120 = (160<<12)+120, TY_RESOLUTION_MODE_240x320 = (240<<12)+320, TY_RESOLUTION_MODE_320x180 = (320<<12)+180,
TY_RESOLUTION_MODE_320x200 = (320<<12)+200, TY_RESOLUTION_MODE_320x240 = (320<<12)+240, TY_RESOLUTION_MODE_480x640 = (480<<12)+640, TY_RESOLUTION_MODE_640x360 = (640<<12)+360,
TY_RESOLUTION_MODE_640x400 = (640<<12)+400, TY_RESOLUTION_MODE_640x480 = (640<<12)+480, TY_RESOLUTION_MODE_960x1280 = (960<<12)+1280, TY_RESOLUTION_MODE_1280x720 = (1280<<12)+720,
TY_RESOLUTION_MODE_1280x800 = (1280<<12)+800, TY_RESOLUTION_MODE_1280x960 = (1280<<12)+960, TY_RESOLUTION_MODE_1920x1080 = (1920<<12)+1080, TY_RESOLUTION_MODE_2560x1920 = (2560<<12)+1920,
TY_RESOLUTION_MODE_2592x1944 = (2592<<12)+1944, TY_RESOLUTION_MODE_1920x1440 = (1920<<12)+1440, TY_RESOLUTION_MODE_240x96 = (240<<12)+96
}

| predefined resolution list More...

enum

TY_IMAGE_MODE_LIST : uint32_t {
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO),
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO),
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO),
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO),
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO),
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO),
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO),
TY_DECLARE_IMAGE_MODE1 =(MONO), TY_DECLARE_IMAGE_MODE1 =(MONO)
}

| Predefined Image Mode List image mode controls image resolution & format predefined image modes named like TY_IMAGE_MODE_MONO_160x120,TY_IMAGE_MODE_RGB_1280x960.
enum | TY_TRIGGER_MODE_LIST : uint32_t { TY_TRIGGER_MODE_OFF = 0, TY_TRIGGER_MODE_SLAVE = 1, TY_TRIGGER_MODE_M_SIG = 2, TY_TRIGGER_MODE_M_PER = 3, TY_TRIGGER_MODE_SIG_PASS = 18, TY_TRIGGER_MODE_PER_PASS = 19, TY_TRIGGER_MODE_TIMER_LIST = 20, TY_TRIGGER_MODE_TIMER_PERIOD = 21, TY_TRIGGER_MODE_PER_PASS2 = 30, TY_TRIGGER_WORK_MODE31 = 31, TY_TRIGGER_MODE_SIG_LASER = 34 }
enum | TY_TIME_SYNC_TYPE_LIST : uint32_t { TY_TIME_SYNC_TYPE_NONE = 0, TY_TIME_SYNC_TYPE_HOST = 1, TY_TIME_SYNC_TYPE_NTP = 2, TY_TIME_SYNC_TYPE_PTP = 3, TY_TIME_SYNC_TYPE_CAN = 4, TY_TIME_SYNC_TYPE_PTP_MASTER = 5 }
| type of time sync
enum | TY_IMU_FPS_LIST { TY_IMU_FPS_100HZ = 0, TY_IMU_FPS_200HZ, TY_IMU_FPS_400HZ }

## Functions

TY_EXTC TY_EXPORT const char *TY_STDC | TYErrorString (TY_STATUS errorID)
| Get error information. More...
TY_CAPI | TYDeinitLib (void)
| Deinit this library. More...
TY_CAPI | TYLibVersion (TY_VERSION_INFO *version)
| Get current library version. More...
TY_CAPI | TYUpdateInterfaceList ()
| Update current interfaces. call before TYGetInterfaceList. More...
TY_CAPI | TYGetInterfaceNumber (uint32_t *pNumIfaces)
| Get number of current interfaces. More...
TY_CAPI | TYGetInterfaceList (TY_INTERFACE_INFO *pIfaceInfos, uint32_t bufferCount, uint32_t *filledCount)
| Get interface info list. More...
TY_CAPI | TYHasInterface (const char *ifaceID, bool *value)
| Check if has interface. More...
TY_CAPI | TYOpenInterface (const char *ifaceID, TY_INTERFACE_HANDLE *outHandle)
| Open specified interface. More...
TY_CAPI | TYCloseInterface (TY_INTERFACE_HANDLE ifaceHandle)
| Close interface. More...
TY_CAPI | TYUpdateDeviceList (TY_INTERFACE_HANDLE ifaceHandle)
| Update current connected devices. More...
TY_CAPI | TYUpdateAllDeviceList ()
| Update current connected devices. More...
TY_CAPI | TYGetDeviceNumber (TY_INTERFACE_HANDLE ifaceHandle, uint32_t *deviceNumber)
| Get number of current connected devices. More...
TY_CAPI | TYGetDeviceList (TY_INTERFACE_HANDLE ifaceHandle, TY_DEVICE_BASE_INFO *deviceInfos, uint32_t bufferCount, uint32_t *filledDeviceCount)
| Get device info list. More...
TY_CAPI | TYHasDevice (TY_INTERFACE_HANDLE ifaceHandle, const char *deviceID, bool *value)
| Check whether the interface has the specified device. More...
TY_CAPI | TYOpenDevice (TY_INTERFACE_HANDLE ifaceHandle, const char *deviceID, TY_DEV_HANDLE *outDeviceHandle, TY_FW_ERRORCODE *outFwErrorcode=NULL)
| Open device by device ID. More...
TY_CAPI | TYOpenDeviceWithIP (TY_INTERFACE_HANDLE ifaceHandle, const char *IP, TY_DEV_HANDLE *deviceHandle)
| Open device by device IP, useful when a device is not listed. More...
TY_CAPI | TYGetDeviceInterface (TY_DEV_HANDLE hDevice, TY_INTERFACE_HANDLE *pIface)
| Get interface handle by device handle. More...
TY_CAPI | TYForceDeviceIP (TY_INTERFACE_HANDLE ifaceHandle, const char *MAC, const char *newIP, const char *newNetMask, const char *newGateway)
| Force a ethernet device to use new IP address, useful when device use persistent IP and cannot be found. More...
TY_CAPI | TYCloseDevice (TY_DEV_HANDLE hDevice, bool reboot=false)
| Close device by device handle. More...
TY_CAPI | TYGetDeviceInfo (TY_DEV_HANDLE hDevice, TY_DEVICE_BASE_INFO *info)
| Get base info of the open device. More...
TY_CAPI | TYGetComponentIDs (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID *componentIDs)
| Get all components IDs. More...
TY_CAPI | TYGetEnabledComponents (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID *componentIDs)
| Get all enabled components IDs. More...
TY_CAPI | TYEnableComponents (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentIDs)
| Enable components. More...
TY_CAPI | TYDisableComponents (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentIDs)
| Disable components. More...
TY_CAPI | TYGetFrameBufferSize (TY_DEV_HANDLE hDevice, uint32_t *bufferSize)
| Get total buffer size of one frame in current configuration. More...
TY_CAPI | TYEnqueueBuffer (TY_DEV_HANDLE hDevice, void *buffer, uint32_t bufferSize)
| Enqueue a user allocated buffer. More...
TY_CAPI | TYClearBufferQueue (TY_DEV_HANDLE hDevice)
| Clear the internal buffer queue, so that user can release all the buffer. More...
TY_CAPI | TYStartCapture (TY_DEV_HANDLE hDevice)
| Start capture. More...
TY_CAPI | TYStopCapture (TY_DEV_HANDLE hDevice)
| Stop capture. More...
TY_CAPI | TYSendSoftTrigger (TY_DEV_HANDLE hDevice)
| Send a software trigger to capture a frame when device works in trigger mode. More...
TY_CAPI | TYRegisterEventCallback (TY_DEV_HANDLE hDevice, TY_EVENT_CALLBACK callback, void *userdata)
| Register device status callback. Register NULL to clean callback. More...
TY_CAPI | TYRegisterImuCallback (TY_DEV_HANDLE hDevice, TY_IMU_CALLBACK callback, void *userdata)
| Register imu callback. Register NULL to clean callback. More...
TY_CAPI | TYFetchFrame (TY_DEV_HANDLE hDevice, TY_FRAME_DATA *frame, int32_t timeout)
| Fetch one frame. More...
TY_CAPI | TYHasFeature (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, bool *value)
| Check whether a component has a specific feature. More...
TY_CAPI | TYGetFeatureInfo (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_FEATURE_INFO *featureInfo)
| Get feature info. More...
TY_CAPI | TYGetIntRange (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_INT_RANGE *intRange)
| Get value range of integer feature. More...
TY_CAPI | TYGetInt (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, int32_t *value)
| Get value of integer feature. More...
TY_CAPI | TYSetInt (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, int32_t value)
| Set value of integer feature. More...
TY_CAPI | TYGetFloatRange (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_FLOAT_RANGE *floatRange)
| Get value range of float feature. More...
TY_CAPI | TYGetFloat (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, float *value)
| Get value of float feature. More...
TY_CAPI | TYSetFloat (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, float value)
| Set value of float feature. More...
TY_CAPI | TYGetEnumEntryCount (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *entryCount)
| Get number of enum entries. More...
TY_CAPI | TYGetEnumEntryInfo (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_ENUM_ENTRY *entries, uint32_t entryCount, uint32_t *filledEntryCount)
| Get list of enum entries. More...
TY_CAPI | TYGetEnum (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *value)
| Get current value of enum feature. More...
TY_CAPI | TYSetEnum (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t value)
| Set value of enum feature. More...
TY_CAPI | TYGetBool (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, bool *value)
| Get value of bool feature. More...
TY_CAPI | TYSetBool (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, bool value)
| Set value of bool feature. More...
TY_CAPI | TYGetStringLength (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *size)
| Get internal buffer size of string feature. More...
TY_CAPI | TYGetString (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, char *buffer, uint32_t bufferSize)
| Get value of string feature. More...
TY_CAPI | TYSetString (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, const char *buffer)
| Set value of string feature. More...
TY_CAPI | TYGetStruct (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, void *pStruct, uint32_t structSize)
| Get value of struct. More...
TY_CAPI | TYSetStruct (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, void *pStruct, uint32_t structSize)
| Set value of struct. More...
TY_CAPI | TYGetByteArraySize (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint32_t *pSize)
| Get the size of specified byte array zone . More...
TY_CAPI | TYGetDeviceFeatureNumber (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, uint32_t *size)
| Get the size of device features . More...
TY_CAPI | TYGetDeviceFeatureInfo (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_INFO *featureInfo, uint32_t entryCount, uint32_t *filledEntryCount)
| Get the all features by comp id. More...
TY_CAPI | TYGetByteArray (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, uint8_t *pBuffer, uint32_t bufferSize)
| Read byte array from device. More...
TY_CAPI | TYSetByteArray (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, const uint8_t *pBuffer, uint32_t bufferSize)
| Write byte array to device. More...
TY_CAPI | TYGetByteArrayAttr (TY_DEV_HANDLE hDevice, TY_COMPONENT_ID componentID, TY_FEATURE_ID featureID, TY_BYTEARRAY_ATTR *pAttr)
| Write byte array to device. More...
TY_CAPI | _TYInitLib (void)

## Variables

typedef | enum
typedef | TY_DO_5V = 1
typedef | TY_DO_12V = 2
typedef | TY_E_VOLT_T_LIST
typedef | TY_DO_HIGH = 1
typedef | TY_DO_PWM = 2
typedef | TY_DO_CAM_TRIG = 3
typedef | TY_E_DO_MODE_LIST
typedef | TY_DI_NE_INT = 1
typedef | TY_DI_PE_INT = 2
typedef | TY_E_DI_MODE_LIST
typedef | TY_DI_INT_TRIG_CAP = 1
typedef | TY_DI_INT_EVENT = 2
typedef | TY_E_DI_INT_ACTION_LIST

## Detailed Description

TYApi.h includes camera control and data receiving interface, which supports configuration for image resolution, frame rate, exposure time, gain, working mode,etc.

Definition in file TYApi.h.

## Macro Definition Documentation

## TY_DECLARE_IMAGE_MODE1

#define TY_DECLARE_IMAGE_MODE1 | ( |  | pix | ) |

Value:
TY_DECLARE_IMAGE_MODE0(pix, 160x100), \
TY_DECLARE_IMAGE_MODE0(pix, 160x120), \
TY_DECLARE_IMAGE_MODE0(pix, 320x180), \
TY_DECLARE_IMAGE_MODE0(pix, 320x200), \
TY_DECLARE_IMAGE_MODE0(pix, 320x240), \
TY_DECLARE_IMAGE_MODE0(pix, 480x640), \
TY_DECLARE_IMAGE_MODE0(pix, 640x360), \
TY_DECLARE_IMAGE_MODE0(pix, 640x400), \
TY_DECLARE_IMAGE_MODE0(pix, 640x480), \
TY_DECLARE_IMAGE_MODE0(pix, 960x1280), \
TY_DECLARE_IMAGE_MODE0(pix, 1280x720), \
TY_DECLARE_IMAGE_MODE0(pix, 1280x960), \
TY_DECLARE_IMAGE_MODE0(pix, 1280x800), \
TY_DECLARE_IMAGE_MODE0(pix, 1920x1080), \
TY_DECLARE_IMAGE_MODE0(pix, 2560x1920), \
TY_DECLARE_IMAGE_MODE0(pix, 2592x1944), \
TY_DECLARE_IMAGE_MODE0(pix, 1920x1440), \
TY_DECLARE_IMAGE_MODE0(pix, 240x96)

Definition at line 490 of file TYApi.h.

## Typedef Documentation

## TY_ACC_BIAS

typedef struct TY_ACC_BIAS TY_ACC_BIAS

a 3x3 matrix

. | . | .
--- | --- | ---
BIASx | BIASy | BIASz

## TY_ACC_MISALIGNMENT

typedef struct TY_ACC_MISALIGNMENT TY_ACC_MISALIGNMENT

a 3x3 matrix |.|.|.|

. | . | .
--- | --- | ---
1 | -GAMAyz | GAMAzy
GAMAxz | 1 | -GAMAzx
-GAMAxy | GAMAyx | 1

## TY_ACC_SCALE

typedef struct TY_ACC_SCALE TY_ACC_SCALE

a 3x3 matrix

. | . | .
--- | --- | ---
SCALEx | 0 | 0
0 | SCALEy | 0
0 | 0 | SCALEz

## TY_ACCESS_MODE_LIST

typedef enum TY_ACCESS_MODE_LIST TY_ACCESS_MODE_LIST

Indicate a feature is readable or writable

See also
  TYGetFeatureInfo

## TY_BYTEARRAY_ATTR

typedef struct TY_BYTEARRAY_ATTR TY_BYTEARRAY_ATTR

byte array data structure

See also
  TYGetByteArray

## TY_CAMERA_CALIB_INFO

typedef struct TY_CAMERA_CALIB_INFO TY_CAMERA_CALIB_INFO

camera 's cailbration data

See also
  TYGetStruct

## TY_CAMERA_DISTORTION

typedef struct TY_CAMERA_DISTORTION TY_CAMERA_DISTORTION

camera distortion parameters

See also
  TYGetStruct Usage:
  TY_CAMERA_DISTORTION distortion;
  TYGetStruct(hDevice, some_compoent, TY_STRUCT_CAM_DISTORTION, &distortion, sizeof(distortion));

## TY_CAMERA_EXTRINSIC

typedef struct TY_CAMERA_EXTRINSIC TY_CAMERA_EXTRINSIC

a 4x4 matrix

. | . | . | .
--- | --- | --- | ---
r11 | r12 | r13 | t1
r21 | r22 | r23 | t2
r31 | r32 | r33 | t3
0 | 0 | 0 | 1

See also
  TYGetStruct Usage:
  TY_CAMERA_EXTRINSIC extrinsic;
  TYGetStruct(hDevice, some_compoent, TY_STRUCT_EXTRINSIC, &extrinsic, sizeof(extrinsic));

## TY_CAMERA_INTRINSIC

typedef struct TY_CAMERA_INTRINSIC TY_CAMERA_INTRINSIC

a 3x3 matrix

. | . | .
--- | --- | ---
fx | 0 | cx
0 | fy | cy
0 | 0 | 1

See also
  TYGetStruct Usage:
  TY_CAMERA_INTRINSIC intrinsic;
  TYGetStruct(hDevice, some_compoent, TY_STRUCT_CAM_INTRINSIC, &intrinsic, sizeof(intrinsic));

## TY_CAMERA_TO_IMU

typedef struct TY_CAMERA_TO_IMU TY_CAMERA_TO_IMU

a 4x4 matrix

. | . | . | .
--- | --- | --- | ---
r11 | r12 | r13 | t1
r21 | r22 | r23 | t2
r31 | r32 | r33 | t3
0 | 0 | 0 | 1

## TY_COMPONENT_ID

typedef uint32_t TY_COMPONENT_ID

component unique id

See also
  TY_DEVICE_COMPONENT_LIST

Definition at line 208 of file TYApi.h.

## TY_DEVICE_BASE_INFO

typedef struct TY_DEVICE_BASE_INFO TY_DEVICE_BASE_INFO

See also
  TYGetDeviceList

## TY_DEVICE_COMPONENT_LIST

typedef enum TY_DEVICE_COMPONENT_LIST TY_DEVICE_COMPONENT_LIST

Device Component list A device contains several component. Each component can be controlled by its own features, such as image width, exposure time, etc..

See also
  To Know how to get feature information please refer to sample code DumpAllFeatures

## TY_ENUM_ENTRY

typedef struct TY_ENUM_ENTRY TY_ENUM_ENTRY

enum feature entry information

See also
  TYGetEnumEntryInfo

## TY_FEATURE_ID

typedef uint32_t TY_FEATURE_ID

feature unique id

See also
  TY_FEATURE_ID_LIST

Definition at line 346 of file TYApi.h.

## TY_FLOAT_RANGE

typedef struct TY_FLOAT_RANGE TY_FLOAT_RANGE

float range data structure

See also
  TYGetFloatRange

## TY_GYRO_BIAS

typedef struct TY_GYRO_BIAS TY_GYRO_BIAS

a 3x3 matrix

. | . | .
--- | --- | ---
BIASx | BIASy | BIASz

## TY_GYRO_MISALIGNMENT

typedef struct TY_GYRO_MISALIGNMENT TY_GYRO_MISALIGNMENT

a 3x3 matrix

. | . | .
--- | --- | ---
1 | -ALPHAyz | ALPHAzy
0 | 1 | -ALPHAzx
0 | 0 | 1

## TY_GYRO_SCALE

typedef struct TY_GYRO_SCALE TY_GYRO_SCALE

a 3x3 matrix

. | . | .
--- | --- | ---
SCALEx | 0 | 0
0 | SCALEy | 0
0 | 0 | SCALEz

## TY_INTERFACE_INFO

typedef struct TY_INTERFACE_INFO TY_INTERFACE_INFO

See also
  TYGetInterfaceList

## TY_INTERFACE_TYPE_LIST

typedef enum TY_INTERFACE_TYPE_LIST TY_INTERFACE_TYPE_LIST

Interface type definition

See also
  TYGetInterfaceList

## TY_PIXEL_BITS_LIST

typedef enum TY_PIXEL_BITS_LIST TY_PIXEL_BITS_LIST

Pixel size type definitions to define the pixel size in bits

See also
  TY_PIXEL_FORMAT_LIST

## TY_TRIGGER_MODE_LIST

typedef enum TY_TRIGGER_MODE_LIST TY_TRIGGER_MODE_LIST

See also
  refer to sample SimpleView_TriggerMode for detail usage

## Enumeration Type Documentation

## TY_ACCESS_MODE_LIST

enum TY_ACCESS_MODE_LIST : uint32_t

Indicate a feature is readable or writable

See also
  TYGetFeatureInfo

Definition at line 379 of file TYApi.h.

## TY_DEVICE_COMPONENT_LIST

enum TY_DEVICE_COMPONENT_LIST : uint32_t

Device Component list A device contains several component. Each component can be controlled by its own features, such as image width, exposure time, etc..

See also
  To Know how to get feature information please refer to sample code DumpAllFeatures

Enumerator
TY_COMPONENT_DEVICE | Abstract component stands for whole device, always enabled.
TY_COMPONENT_DEPTH_CAM | Depth camera.
TY_COMPONENT_IR_CAM_LEFT | Left IR camera.
TY_COMPONENT_IR_CAM_RIGHT | Right IR camera.
TY_COMPONENT_RGB_CAM_LEFT | Left RGB camera.
TY_COMPONENT_RGB_CAM_RIGHT | Right RGB camera.
TY_COMPONENT_LASER | Laser.
TY_COMPONENT_IMU | Inertial Measurement Unit.
TY_COMPONENT_BRIGHT_HISTO | virtual component for brightness histogram of ir
TY_COMPONENT_STORAGE | virtual component for device storage
TY_COMPONENT_RGB_CAM | Some device has only one RGB camera, map it to left.

Definition at line 193 of file TYApi.h.

## TY_FEATURE_ID_LIST

enum TY_FEATURE_ID_LIST : uint32_t

feature for component definitions

Enumerator
TY_STRUCT_CAM_INTRINSIC | see TY_CAMERA_INTRINSIC
TY_STRUCT_EXTRINSIC_TO_DEPTH | extrinsic between depth cam and current component , see TY_CAMERA_EXTRINSIC
TY_STRUCT_EXTRINSIC_TO_IR_LEFT | extrinsic between left IR and current compoent, see TY_CAMERA_EXTRINSIC
TY_STRUCT_CAM_DISTORTION | see TY_CAMERA_DISTORTION
TY_STRUCT_CAM_CALIB_DATA | see TY_CAMERA_CALIB_INFO
TY_STRUCT_CAM_RECTIFIED_INTRI | the rectified intrinsic. see TY_CAMERA_INTRINSIC
TY_BYTEARRAY_CUSTOM_BLOCK | used for reading/writing custom block
TY_BYTEARRAY_ISP_BLOCK | used for reading/writing fpn block
TY_INT_PACKET_DELAY | microseconds
TY_INT_NTP_SERVER_IP | Ntp server IP.
TY_INT_LINK_CMD_TIMEOUT | milliseconds
TY_STRUCT_CAM_STATISTICS | statistical information, see TY_CAMERA_STATISTICS
TY_INT_WIDTH | Image width.
TY_INT_HEIGHT | Image height.
TY_ENUM_IMAGE_MODE | Resolution-PixelFromat mode, see TY_IMAGE_MODE_LIST.
TY_FLOAT_SCALE_UNIT | scale unit depth image is uint16 pixel format with default millimeter unit ,for some device can output Sub-millimeter accuracy data the acutal depth (mm)= PixelValue * ScaleUnit
TY_ENUM_TRIGGER_POL | Trigger POL, see TY_TRIGGER_POL_LIST.
TY_INT_FRAME_PER_TRIGGER | Number of frames captured per trigger.
TY_STRUCT_TRIGGER_PARAM | param of trigger, see TY_TRIGGER_PARAM
TY_STRUCT_TRIGGER_PARAM_EX | param of trigger, see TY_TRIGGER_PARAM_EX
TY_STRUCT_TRIGGER_TIMER_LIST | param of trigger mode 20, see TY_TRIGGER_TIMER_LIST
TY_STRUCT_TRIGGER_TIMER_PERIOD | param of trigger mode 21, see TY_TRIGGER_TIMER_PERIOD
TY_BOOL_KEEP_ALIVE_ONOFF | Keep Alive switch.
TY_INT_KEEP_ALIVE_TIMEOUT | Keep Alive timeout.
TY_BOOL_CMOS_SYNC | Cmos sync switch.
TY_INT_TRIGGER_DELAY_US | Trigger delay time, in microseconds.
TY_BOOL_TRIGGER_OUT_IO | Trigger out IO.
TY_INT_TRIGGER_DURATION_US | Trigger duration time, in microseconds.
TY_ENUM_STREAM_ASYNC | stream async switch, see TY_STREAM_ASYNC_MODE
TY_INT_CAPTURE_TIME_US | capture time in multi-ir
TY_ENUM_TIME_SYNC_TYPE | see TY_TIME_SYNC_TYPE
TY_BOOL_TIME_SYNC_READY | time sync done status
TY_BOOL_FLASHLIGHT | flashlight on/off control
TY_INT_FLASHLIGHT_INTENSITY | flashlight intensity level [0, 63]
TY_STRUCT_DO0_WORKMODE | DO_0 workmode, see TY_DO_WORKMODE.
TY_STRUCT_DI0_WORKMODE | DI_0 workmode, see TY_DI_WORKMODE.
TY_STRUCT_DO1_WORKMODE | DO_1 workmode, see TY_DO_WORKMODE.
TY_STRUCT_DI1_WORKMODE | DI_1 workmode, see TY_DI_WORKMODE.
TY_STRUCT_DO2_WORKMODE | DO_2 workmode, see TY_DO_WORKMODE.
TY_STRUCT_DI2_WORKMODE | DI_2 workmode, see TY_DI_WORKMODE.
TY_BOOL_AUTO_EXPOSURE | Auto exposure switch.
TY_INT_EXPOSURE_TIME | Exposure time in percentage.
TY_BOOL_AUTO_GAIN | Auto gain switch.
TY_INT_GAIN | Sensor Gain.
TY_BOOL_AUTO_AWB | Auto white balance.
TY_STRUCT_AEC_ROI | region of aec statistics, see TY_AEC_ROI_PARAM
TY_INT_TOF_HDR_RATIO | tof sensor hdr ratio for depth
TY_INT_TOF_JITTER_THRESHOLD | tof jitter threshold for depth
TY_INT_LASER_POWER | Laser power level.
TY_BOOL_LASER_AUTO_CTRL | Laser auto ctrl.
TY_BOOL_UNDISTORTION | Output undistorted image.
TY_BOOL_BRIGHTNESS_HISTOGRAM | Output bright histogram.
TY_BOOL_DEPTH_POSTPROC | Do depth image postproc.
TY_INT_R_GAIN | Gain of R channel.
TY_INT_G_GAIN | Gain of G channel.
TY_INT_B_GAIN | Gain of B channel.
TY_INT_ANALOG_GAIN | Analog gain.
TY_BOOL_HDR | HDR func enable/disable.
TY_BYTEARRAY_HDR_PARAMETER | HDR parameters.
TY_BOOL_IMU_DATA_ONOFF | IMU Data Onoff.
TY_STRUCT_IMU_ACC_BIAS | IMU acc bias matrix, see TY_ACC_BIAS.
TY_STRUCT_IMU_ACC_MISALIGNMENT | IMU acc misalignment matrix, see TY_ACC_MISALIGNMENT.
TY_STRUCT_IMU_ACC_SCALE | IMU acc scale matrix, see TY_ACC_SCALE.
TY_STRUCT_IMU_GYRO_BIAS | IMU gyro bias matrix, see TY_GYRO_BIAS.
TY_STRUCT_IMU_GYRO_MISALIGNMENT | IMU gyro misalignment matrix, see TY_GYRO_MISALIGNMENT.
TY_STRUCT_IMU_GYRO_SCALE | IMU gyro scale matrix, see TY_GYRO_SCALE.
TY_STRUCT_IMU_CAM_TO_IMU | IMU camera to imu matrix, see TY_CAMERA_TO_IMU.
TY_ENUM_IMU_FPS | IMU fps, see TY_IMU_FPS_LIST.
TY_INT_SGBM_IMAGE_NUM | SGBM image channel num.
TY_INT_SGBM_DISPARITY_NUM | SGBM disparity num.
TY_INT_SGBM_DISPARITY_OFFSET | SGBM disparity offset.
TY_INT_SGBM_MATCH_WIN_HEIGHT | SGBM match window height.
TY_INT_SGBM_SEMI_PARAM_P1 | SGBM semi global param p1.
TY_INT_SGBM_SEMI_PARAM_P2 | SGBM semi global param p2.
TY_INT_SGBM_UNIQUE_FACTOR | SGBM uniqueness factor param.
TY_INT_SGBM_UNIQUE_ABSDIFF | SGBM uniqueness min absolute diff.
TY_INT_SGBM_COST_PARAM | SGBM cost param.
TY_BOOL_SGBM_HFILTER_HALF_WIN | SGBM enable half window size.
TY_INT_SGBM_MATCH_WIN_WIDTH | SGBM match window width.
TY_BOOL_SGBM_MEDFILTER | SGBM enable median filter.
TY_BOOL_SGBM_LRC | SGBM enable left right consist check.
TY_INT_SGBM_LRC_DIFF | SGBM max diff.
TY_INT_SGBM_MEDFILTER_THRESH | SGBM median filter thresh.
TY_INT_SGBM_SEMI_PARAM_P1_SCALE | SGBM semi global param p1 scale.
TY_ENUM_DEPTH_QUALITY | the quality of generated depth, see TY_DEPTH_QUALITY
TY_INT_FILTER_THRESHOLD | the threshold of the noise filter, 0 for disabled
TY_INT_TOF_CHANNEL | the frequency channel of tof
TY_INT_TOF_MODULATION_THRESHOLD | the threshold of the tof modulation
TY_STRUCT_TOF_FREQ | the frequency of tof, see TY_TOF_FREQ
TY_BOOL_TOF_ANTI_INTERFERENCE | cooperation if multi-device used

Definition at line 227 of file TYApi.h.

## TY_INTERFACE_TYPE_LIST

enum TY_INTERFACE_TYPE_LIST : uint32_t

Interface type definition

See also
  TYGetInterfaceList

Definition at line 366 of file TYApi.h.

## TY_PIXEL_BITS_LIST

enum TY_PIXEL_BITS_LIST : uint32_t

Pixel size type definitions to define the pixel size in bits

See also
  TY_PIXEL_FORMAT_LIST

Definition at line 401 of file TYApi.h.

## TY_PIXEL_FORMAT_LIST

enum TY_PIXEL_FORMAT_LIST : uint32_t

pixel format definitions

Enumerator
TY_PIXEL_FORMAT_MONO | 0x10000000
TY_PIXEL_FORMAT_BAYER8GB | 0x11000000
TY_PIXEL_FORMAT_BAYER8BG | 0x12000000
TY_PIXEL_FORMAT_BAYER8GR | 0x13000000
TY_PIXEL_FORMAT_BAYER8RG | 0x14000000
TY_PIXEL_FORMAT_CSI_MONO10 | 0x50000000
TY_PIXEL_FORMAT_CSI_BAYER10GRBG | 0x51000000
TY_PIXEL_FORMAT_CSI_BAYER10RGGB | 0x52000000
TY_PIXEL_FORMAT_CSI_BAYER10GBRG | 0x53000000
TY_PIXEL_FORMAT_CSI_BAYER10BGGR | 0x54000000
TY_PIXEL_FORMAT_CSI_MONO12 | 0x60000000
TY_PIXEL_FORMAT_CSI_BAYER12GRBG | 0x61000000
TY_PIXEL_FORMAT_CSI_BAYER12RGGB | 0x62000000
TY_PIXEL_FORMAT_CSI_BAYER12GBRG | 0x63000000
TY_PIXEL_FORMAT_CSI_BAYER12BGGR | 0x64000000
TY_PIXEL_FORMAT_DEPTH16 | 0x20000000
TY_PIXEL_FORMAT_YVYU | 0x21000000, yvyu422
TY_PIXEL_FORMAT_YUYV | 0x22000000, yuyv422
TY_PIXEL_FORMAT_MONO16 | 0x23000000,
TY_PIXEL_FORMAT_TOF_IR_MONO16 | 0xa4000000,
TY_PIXEL_FORMAT_RGB | 0x30000000
TY_PIXEL_FORMAT_BGR | 0x31000000
TY_PIXEL_FORMAT_JPEG | 0x32000000
TY_PIXEL_FORMAT_MJPG | 0x33000000
TY_PIXEL_FORMAT_RGB48 | 0x80000000
TY_PIXEL_FORMAT_BGR48 | 0x81000000
TY_PIXEL_FORMAT_XYZ48 | 0x82000000

Definition at line 419 of file TYApi.h.

## TY_RESOLUTION_MODE_LIST

enum TY_RESOLUTION_MODE_LIST : uint32_t

predefined resolution list

Enumerator
TY_RESOLUTION_MODE_160x100 | 0x000a0078
TY_RESOLUTION_MODE_160x120 | 0x000a0078
TY_RESOLUTION_MODE_240x320 | 0x000f0140
TY_RESOLUTION_MODE_320x180 | 0x001400b4
TY_RESOLUTION_MODE_320x200 | 0x001400c8
TY_RESOLUTION_MODE_320x240 | 0x001400f0
TY_RESOLUTION_MODE_480x640 | 0x001e0280
TY_RESOLUTION_MODE_640x360 | 0x00280168
TY_RESOLUTION_MODE_640x400 | 0x00280190
TY_RESOLUTION_MODE_640x480 | 0x002801e0
TY_RESOLUTION_MODE_960x1280 | 0x003c0500
TY_RESOLUTION_MODE_1280x720 | 0x005002d0
TY_RESOLUTION_MODE_1280x800 | 0x00500320
TY_RESOLUTION_MODE_1280x960 | 0x005003c0
TY_RESOLUTION_MODE_1920x1080 | 0x00780438
TY_RESOLUTION_MODE_2560x1920 | 0x00a00780
TY_RESOLUTION_MODE_2592x1944 | 0x00a20798
TY_RESOLUTION_MODE_1920x1440 | 0x007805a0
TY_RESOLUTION_MODE_240x96 | 0x000f0060

Definition at line 463 of file TYApi.h.

## TY_TRIGGER_MODE_LIST

enum TY_TRIGGER_MODE_LIST : uint32_t

See also
  refer to sample SimpleView_TriggerMode for detail usage

Enumerator
TY_TRIGGER_MODE_OFF | not trigger mode, continuous mode
TY_TRIGGER_MODE_SLAVE | slave mode, receive soft/hardware triggers
TY_TRIGGER_MODE_M_SIG | master mode 1, sending one trigger signal once received a soft/hardware trigger
TY_TRIGGER_MODE_M_PER | master mode 2, periodic sending one trigger signals, 'fps' param should be set
TY_TRIGGER_MODE_PER_PASS2 | trigger mode 30,Alternate output depth image/ir image

Definition at line 558 of file TYApi.h.

## Function Documentation

## TYClearBufferQueue()

TY_CAPI TYClearBufferQueue | ( | TY_DEV_HANDLE | hDevice | ) |

Clear the internal buffer queue, so that user can release all the buffer.

Parameters

  [in] | hDevice | Device handle.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_BUSY | Device is capturing.

## TYCloseDevice()

TY_CAPI TYCloseDevice | ( | TY_DEV_HANDLE | hDevice,
|  | bool | reboot = `false`
| ) |  |

Close device by device handle.

Parameters

  [in] | hDevice | Device handle.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_IDLE | Device has been closed.

## TYCloseInterface()

TY_CAPI TYCloseInterface | ( | TY_INTERFACE_HANDLE | ifaceHandle | ) |

Close interface.

Parameters

  [in] | ifaceHandle | Interface to be closed.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Interface not found.

## TYDeinitLib()

TY_CAPI TYDeinitLib | ( | void |  | ) |

Deinit this library.

Return values

  TY_STATUS_OK | Succeed.

## TYDisableComponents()

TY_CAPI TYDisableComponents | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentIDs
| ) |  |

Disable components.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentIDs | Components to be disabled.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Some components specified by componentIDs are invalid.
  TY_STATUS_BUSY | Device is capturing.

See also
  TY_DEVICE_COMPONENT_LIST

## TYEnableComponents()

TY_CAPI TYEnableComponents | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentIDs
| ) |  |

Enable components.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentIDs | Components to be enabled.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Some components specified by componentIDs are invalid.
  TY_STATUS_BUSY | Device is capturing.

## TYEnqueueBuffer()

TY_CAPI TYEnqueueBuffer | ( | TY_DEV_HANDLE | hDevice,
|  | void * | buffer,
|  | uint32_t | bufferSize
| ) |  |

Enqueue a user allocated buffer.

Parameters

  [in] | hDevice | Device handle.
  [in] | buffer | Buffer to be enqueued.
  [in] | bufferSize | Size of the input buffer.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_NULL_POINTER | buffer is NULL.
  TY_STATUS_WRONG_SIZE | The input buffer is not large enough.

## TYErrorString()

TY_EXTC TY_EXPORT const char *TY_STDC TYErrorString | ( | TY_STATUS | errorID | ) |

Get error information.

Parameters

  [in] | errorID | Error id.

Returns
  Error string.

## TYFetchFrame()

TY_CAPI TYFetchFrame | ( | TY_DEV_HANDLE | hDevice,
|  | TY_FRAME_DATA * | frame,
|  | int32_t | timeout
| ) |  |

Fetch one frame.

Parameters

  [in] | hDevice | Device handle.
  [out] | frame | Frame data to be filled.
  [in] | timeout | Timeout in milliseconds. <0 for infinite.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_NULL_POINTER | frame is NULL.
  TY_STATUS_IDLE | Device capturing is not started.
  TY_STATUS_WRONG_MODE | Callback has been registered, this function is disabled.
  TY_STATUS_TIMEOUT | Timeout.

## TYForceDeviceIP()

TY_CAPI TYForceDeviceIP | ( | TY_INTERFACE_HANDLE | ifaceHandle,
|  | const char * | MAC,
|  | const char * | newIP,
|  | const char * | newNetMask,
|  | const char * | newGateway
| ) |  |

Force a ethernet device to use new IP address, useful when device use persistent IP and cannot be found.

Parameters

  [in] | ifaceHandle | Interface handle.
  [in] | MAC | Device MAC, should be "xx:xx:xx:xx:xx:xx".
  [in] | newIP | New IP.
  [in] | newNetMask | New subnet mask.
  [in] | newGateway | New gateway.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Invalid interface handle.
  TY_STATUS_WRONG_TYPE | Wrong interface type, should be network.
  TY_STATUS_NULL_POINTER | MAC or newIP/newNetMask/newGateway is NULL.
  TY_STATUS_INVALID_PARAMETER | MAC is not valid.
  TY_STATUS_TIMEOUT | No device found.
  TY_STATUS_DEVICE_ERROR | Set new IP failed.

## TYGetBool()

TY_CAPI TYGetBool | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | bool * | value
| ) |  |

Get value of bool feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | value | Bool value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_BOOL.
  TY_STATUS_NULL_POINTER | value is NULL.

## TYGetByteArray()

TY_CAPI TYGetByteArray | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | uint8_t * | pBuffer,
|  | uint32_t | bufferSize
| ) |  |

Read byte array from device.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | pbuffer | byte buffer.
  [in] | bufferSize | Size of buffer.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_BYTEARRAY.
  TY_STATUS_NULL_POINTER | pbuffer is NULL.
  TY_STATUS_WRONG_SIZE | bufferSize incorrect.

## TYGetByteArrayAttr()

TY_CAPI TYGetByteArrayAttr | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | TY_BYTEARRAY_ATTR * | pAttr
| ) |  |

Write byte array to device.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | pAttr | byte array attribute to be filled.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_BYTEARRAY.
  TY_STATUS_NULL_POINTER | pbuffer is NULL.

## TYGetByteArraySize()

TY_CAPI TYGetByteArraySize | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | uint32_t * | pSize
| ) |  |

Get the size of specified byte array zone .

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | pSize | size of specified byte array zone.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_BYTEARRAY.
  TY_STATUS_NULL_POINTER | pSize is NULL.

## TYGetComponentIDs()

TY_CAPI TYGetComponentIDs | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID * | componentIDs
| ) |  |

Get all components IDs.

Parameters

  [in] | hDevice | Device handle.
  [out] | componentIDs | All component IDs this device has. (bit flag).

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_NULL_POINTER | componentIDs is NULL.

See also
  TY_DEVICE_COMPONENT_LIST

## TYGetDeviceFeatureInfo()

TY_CAPI TYGetDeviceFeatureInfo | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_INFO * | featureInfo,
|  | uint32_t | entryCount,
|  | uint32_t * | filledEntryCount
| ) |  |

Get the all features by comp id.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [out] | featureInfo | Output feature info.
  [in] | entryCount | Array size of input parameter "featureInfo".
  [out] | filledEntryCount | Number of filled featureInfo.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_NULL_POINTER | featureInfo or filledEntryCount is NULL.

## TYGetDeviceFeatureNumber()

TY_CAPI TYGetDeviceFeatureNumber | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | uint32_t * | size
| ) |  |

Get the size of device features .

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [out] | pSize | size of all feature cnt.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_NULL_POINTER | pSize is NULL.

## TYGetDeviceInfo()

TY_CAPI TYGetDeviceInfo | ( | TY_DEV_HANDLE | hDevice,
|  | TY_DEVICE_BASE_INFO * | info
| ) |  |

Get base info of the open device.

Parameters

  [in] | hDevice | Device handle.
  [out] | info | Base info out.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_NULL_POINTER | componentIDs is NULL.

## TYGetDeviceInterface()

TY_CAPI TYGetDeviceInterface | ( | TY_DEV_HANDLE | hDevice,
|  | TY_INTERFACE_HANDLE * | pIface
| ) |  |

Get interface handle by device handle.

Parameters

  [in] | hDevice | Device handle.
  [out] | pIface | Interface handle.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_NULL_POINTER | pIface is NULL.

## TYGetDeviceList()

TY_CAPI TYGetDeviceList | ( | TY_INTERFACE_HANDLE | ifaceHandle,
|  | TY_DEVICE_BASE_INFO * | deviceInfos,
|  | uint32_t | bufferCount,
|  | uint32_t * | filledDeviceCount
| ) |  |

Get device info list.

Parameters

  [in] | ifaceHandle | Interface handle.
  [out] | deviceInfos | Device info array to be filled.
  [in] | bufferCount | Array size of deviceInfos.
  [out] | filledDeviceCount | Number of filled TY_DEVICE_BASE_INFO.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Invalid interface handle.
  TY_STATUS_NULL_POINTER | deviceInfos or filledDeviceCount is NULL.

## TYGetDeviceNumber()

TY_CAPI TYGetDeviceNumber | ( | TY_INTERFACE_HANDLE | ifaceHandle,
|  | uint32_t * | deviceNumber
| ) |  |

Get number of current connected devices.

Parameters

  [in] | ifaceHandle | Interface handle.
  [out] | deviceNumber | Number of connected devices.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Invalid interface handle.
  TY_STATUS_NULL_POINTER | deviceNumber is NULL.

## TYGetEnabledComponents()

TY_CAPI TYGetEnabledComponents | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID * | componentIDs
| ) |  |

Get all enabled components IDs.

Parameters

  [in] | hDevice | Device handle.
  [out] | componentIDs | Enabled component IDs.(bit flag)

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_NULL_POINTER | componentIDs is NULL.

See also
  TY_DEVICE_COMPONENT_LIST

## TYGetEnum()

TY_CAPI TYGetEnum | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | uint32_t * | value
| ) |  |

Get current value of enum feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | value | Enum value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_ENUM.
  TY_STATUS_NULL_POINTER | value is NULL.

## TYGetEnumEntryCount()

TY_CAPI TYGetEnumEntryCount | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | uint32_t * | entryCount
| ) |  |

Get number of enum entries.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | entryCount | Entry count.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_ENUM.
  TY_STATUS_NULL_POINTER | entryCount is NULL.

## TYGetEnumEntryInfo()

TY_CAPI TYGetEnumEntryInfo | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | TY_ENUM_ENTRY * | entries,
|  | uint32_t | entryCount,
|  | uint32_t * | filledEntryCount
| ) |  |

Get list of enum entries.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | entries | Output entries.
  [in] | entryCount | Array size of input parameter "entries".
  [out] | filledEntryCount | Number of filled entries.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_ENUM.
  TY_STATUS_NULL_POINTER | entries or filledEntryCount is NULL.

## TYGetFeatureInfo()

TY_CAPI TYGetFeatureInfo | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | TY_FEATURE_INFO * | featureInfo
| ) |  |

Get feature info.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | featureInfo | Feature info.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_NULL_POINTER | featureInfo is NULL.

## TYGetFloat()

TY_CAPI TYGetFloat | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | float * | value
| ) |  |

Get value of float feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | value | Float value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_FLOAT.
  TY_STATUS_NULL_POINTER | value is NULL.

## TYGetFloatRange()

TY_CAPI TYGetFloatRange | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | TY_FLOAT_RANGE * | floatRange
| ) |  |

Get value range of float feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | floatRange | Float range to be filled.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_FLOAT.
  TY_STATUS_NULL_POINTER | floatRange is NULL.

## TYGetFrameBufferSize()

TY_CAPI TYGetFrameBufferSize | ( | TY_DEV_HANDLE | hDevice,
|  | uint32_t * | bufferSize
| ) |  |

Get total buffer size of one frame in current configuration.

Parameters

  [in] | hDevice | Device handle.
  [out] | bufferSize | Buffer size per frame.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_NULL_POINTER | bufferSize is NULL.

## TYGetInt()

TY_CAPI TYGetInt | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | int32_t * | value
| ) |  |

Get value of integer feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | value | Integer value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_INT.
  TY_STATUS_NULL_POINTER | value is NULL.

## TYGetInterfaceList()

TY_CAPI TYGetInterfaceList | ( | TY_INTERFACE_INFO * | pIfaceInfos,
|  | uint32_t | bufferCount,
|  | uint32_t * | filledCount
| ) |  |

Get interface info list.

Parameters

  [out] | pIfaceInfos | Array of interface infos to be filled.
  [in] | bufferCount | Array size of interface infos.
  [out] | filledCount | Number of filled TY_INTERFACE_INFO.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_NULL_POINTER | pIfaceInfos or filledCount is NULL.

## TYGetInterfaceNumber()

TY_CAPI TYGetInterfaceNumber | ( | uint32_t * | pNumIfaces | ) |

Get number of current interfaces.

Parameters

  [out] | pNumIfaces | Number of interfaces.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_NULL_POINTER | deviceNumber is NULL.

## TYGetIntRange()

TY_CAPI TYGetIntRange | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | TY_INT_RANGE * | intRange
| ) |  |

Get value range of integer feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | intRange | Integer range to be filled.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_INT.
  TY_STATUS_NULL_POINTER | intRange is NULL.

## TYGetString()

TY_CAPI TYGetString | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | char * | buffer,
|  | uint32_t | bufferSize
| ) |  |

Get value of string feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | buffer | String buffer.
  [in] | bufferSize | Size of buffer.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_STRING.
  TY_STATUS_NULL_POINTER | buffer is NULL.

See also
  TYGetStringLength

## TYGetStringLength()

TY_CAPI TYGetStringLength | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | uint32_t * | size
| ) |  |

Get internal buffer size of string feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | size | String length including '\0'.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_STRING.
  TY_STATUS_NULL_POINTER | size is NULL.

See also
  TYGetString

## TYGetStruct()

TY_CAPI TYGetStruct | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | void * | pStruct,
|  | uint32_t | structSize
| ) |  |

Get value of struct.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | pStruct | Pointer of struct.
  [in] | structSize | Size of input buffer pStruct..

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_STRUCT.
  TY_STATUS_NULL_POINTER | pStruct is NULL.
  TY_STATUS_WRONG_SIZE | structSize incorrect.

## TYHasDevice()

TY_CAPI TYHasDevice | ( | TY_INTERFACE_HANDLE | ifaceHandle,
|  | const char * | deviceID,
|  | bool * | value
| ) |  |

Check whether the interface has the specified device.

Parameters

  [in] | ifaceHandle | Interface handle.
  [in] | deviceID | Device ID string, can be get from TY_DEVICE_BASE_INFO.
  [out] | value | True if the device exists.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Invalid interface handle.
  TY_STATUS_NULL_POINTER | deviceID or value is NULL.

## TYHasFeature()

TY_CAPI TYHasFeature | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | bool * | value
| ) |  |

Check whether a component has a specific feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | value | Whether has feature.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_NULL_POINTER | value is NULL.

## TYHasInterface()

TY_CAPI TYHasInterface | ( | const char * | ifaceID,
|  | bool * | value
| ) |  |

Check if has interface.

Parameters

  [in] | ifaceID | Interface ID string, can be get from TY_INTERFACE_INFO.
  [out] | value | True if the interface exists.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_NULL_POINTER | ifaceID or outHandle is NULL.

See also
  TYGetInterfaceList

## TYLibVersion()

TY_CAPI TYLibVersion | ( | TY_VERSION_INFO * | version | ) |

Get current library version.

Parameters

  [out] | version | Version infomation to be filled.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NULL_POINTER | buffer is NULL.

## TYOpenDevice()

TY_CAPI TYOpenDevice | ( | TY_INTERFACE_HANDLE | ifaceHandle,
|  | const char * | deviceID,
|  | TY_DEV_HANDLE * | outDeviceHandle,
|  | TY_FW_ERRORCODE * | outFwErrorcode = `NULL`
| ) |  |

Open device by device ID.

Parameters

  [in] | ifaceHandle | Interface handle.
  [in] | deviceID | Device ID string, can be get from TY_DEVICE_BASE_INFO.
  [out] | deviceHandle | Handle of opened device. Valid only if TY_STATUS_OK or TY_FW_ERRORCODE returned.
  [out] | outFwErrorcode | Firmware errorcode. Valid only if TY_FW_ERRORCODE returned.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Invalid interface handle.
  TY_STATUS_NULL_POINTER | deviceID or deviceHandle is NULL.
  TY_STATUS_INVALID_PARAMETER | Device not found.
  TY_STATUS_BUSY | Device has been opened.
  TY_STATUS_DEVICE_ERROR | Open device failed.

## TYOpenDeviceWithIP()

TY_CAPI TYOpenDeviceWithIP | ( | TY_INTERFACE_HANDLE | ifaceHandle,
|  | const char * | IP,
|  | TY_DEV_HANDLE * | deviceHandle
| ) |  |

Open device by device IP, useful when a device is not listed.

Parameters

  [in] | ifaceHandle | Interface handle.
  [in] | IP | Device IP.
  [out] | deviceHandle | Handle of opened device.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Invalid interface handle.
  TY_STATUS_NULL_POINTER | IP or deviceHandle is NULL.
  TY_STATUS_INVALID_PARAMETER | Device not found.
  TY_STATUS_BUSY | Device has been opened, may occupied somewhere else.
  TY_STATUS_DEVICE_ERROR | Open device failed.

## TYOpenInterface()

TY_CAPI TYOpenInterface | ( | const char * | ifaceID,
|  | TY_INTERFACE_HANDLE * | outHandle
| ) |  |

Open specified interface.

Parameters

  [in] | ifaceID | Interface ID string, can be get from TY_INTERFACE_INFO.
  [out] | outHandle | Handle of opened interface.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_NULL_POINTER | ifaceID or outHandle is NULL.
  TY_STATUS_INVALID_INTERFACE | Interface not found.

See also
  TYGetInterfaceList

## TYRegisterEventCallback()

TY_CAPI TYRegisterEventCallback | ( | TY_DEV_HANDLE | hDevice,
|  | TY_EVENT_CALLBACK | callback,
|  | void * | userdata
| ) |  |

Register device status callback. Register NULL to clean callback.

Parameters

  [in] | hDevice | Device handle.
  [in] | callback | Callback function.
  [in] | userdata | User private data.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_BUSY | Device is capturing.

## TYRegisterImuCallback()

TY_CAPI TYRegisterImuCallback | ( | TY_DEV_HANDLE | hDevice,
|  | TY_IMU_CALLBACK | callback,
|  | void * | userdata
| ) |  |

Register imu callback. Register NULL to clean callback.

Parameters

  [in] | hDevice | Device handle.
  [in] | callback | Callback function.
  [in] | userdata | User private data.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_BUSY | Device is capturing.

## TYSendSoftTrigger()

TY_CAPI TYSendSoftTrigger | ( | TY_DEV_HANDLE | hDevice | ) |

Send a software trigger to capture a frame when device works in trigger mode.

Parameters

  [in] | hDevice | Device handle.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_FEATURE | Not support soft trigger.
  TY_STATUS_IDLE | Device has not started capture.
  TY_STATUS_WRONG_MODE | Not in trigger mode.

## TYSetBool()

TY_CAPI TYSetBool | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | bool | value
| ) |  |

Set value of bool feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [in] | value | Bool value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_BOOL.
  TY_STATUS_BUSY | Device is capturing, the feature is locked.

## TYSetByteArray()

TY_CAPI TYSetByteArray | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | const uint8_t * | pBuffer,
|  | uint32_t | bufferSize
| ) |  |

Write byte array to device.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [out] | pbuffer | byte buffer.
  [in] | bufferSize | Size of buffer.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_BYTEARRAY.
  TY_STATUS_NULL_POINTER | pbuffer is NULL.
  TY_STATUS_WRONG_SIZE | bufferSize incorrect.
  TY_STATUS_BUSY | Device is capturing, the feature is locked.

## TYSetEnum()

TY_CAPI TYSetEnum | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | uint32_t | value
| ) |  |

Set value of enum feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [in] | value | Enum value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_ENUM.
  TY_STATUS_INVALID_PARAMETER | value is invalid.
  TY_STATUS_BUSY | Device is capturing, the feature is locked.

## TYSetFloat()

TY_CAPI TYSetFloat | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | float | value
| ) |  |

Set value of float feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [in] | value | Float value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_FLOAT.
  TY_STATUS_OUT_OF_RANGE | value is out of range.
  TY_STATUS_BUSY | Device is capturing, the feature is locked.

## TYSetInt()

TY_CAPI TYSetInt | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | int32_t | value
| ) |  |

Set value of integer feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [in] | value | Integer value.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_INT.
  TY_STATUS_OUT_OF_RANGE | value is out of range.
  TY_STATUS_BUSY | Device is capturing, the feature is locked.

## TYSetString()

TY_CAPI TYSetString | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | const char * | buffer
| ) |  |

Set value of string feature.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [in] | buffer | String buffer.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_STRING.
  TY_STATUS_NULL_POINTER | buffer is NULL.
  TY_STATUS_OUT_OF_RANGE | Input string is too long.
  TY_STATUS_BUSY | Device is capturing, the feature is locked.

## TYSetStruct()

TY_CAPI TYSetStruct | ( | TY_DEV_HANDLE | hDevice,
|  | TY_COMPONENT_ID | componentID,
|  | TY_FEATURE_ID | featureID,
|  | void * | pStruct,
|  | uint32_t | structSize
| ) |  |

Set value of struct.

Parameters

  [in] | hDevice | Device handle.
  [in] | componentID | Component ID.
  [in] | featureID | Feature ID.
  [in] | pStruct | Pointer of struct.
  [in] | structSize | Size of struct.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | Invalid component ID.
  TY_STATUS_INVALID_FEATURE | Invalid feature ID.
  TY_STATUS_NOT_PERMITTED | The feature is not writable.
  TY_STATUS_WRONG_TYPE | The feature's type is not TY_FEATURE_STRUCT.
  TY_STATUS_NULL_POINTER | pStruct is NULL.
  TY_STATUS_WRONG_SIZE | structSize incorrect.
  TY_STATUS_BUSY | Device is capturing, the feature is locked.

## TYStartCapture()

TY_CAPI TYStartCapture | ( | TY_DEV_HANDLE | hDevice | ) |

Start capture.

Parameters

  [in] | hDevice | Device handle.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_INVALID_COMPONENT | No components enabled.
  TY_STATUS_BUSY | Device has been started.
  TY_STATUS_DEVICE_ERROR | Start capture failed.

## TYStopCapture()

TY_CAPI TYStopCapture | ( | TY_DEV_HANDLE | hDevice | ) |

Stop capture.

Parameters

  [in] | hDevice | Device handle.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_INVALID_HANDLE | Invalid device handle.
  TY_STATUS_IDLE | Device is not capturing.
  TY_STATUS_DEVICE_ERROR | Stop capture failed.

## TYUpdateAllDeviceList()

TY_CAPI TYUpdateAllDeviceList | ( |  | ) |

Update current connected devices.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.

## TYUpdateDeviceList()

TY_CAPI TYUpdateDeviceList | ( | TY_INTERFACE_HANDLE | ifaceHandle | ) |

Update current connected devices.

Parameters

  [in] | ifaceHandle | Interface handle.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.
  TY_STATUS_INVALID_INTERFACE | Invalid interface handle.

## TYUpdateInterfaceList()

TY_CAPI TYUpdateInterfaceList | ( |  | ) |

Update current interfaces. call before TYGetInterfaceList.

Return values

  TY_STATUS_OK | Succeed.
  TY_STATUS_NOT_INITED | TYInitLib not called.