00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PSLINK_H
00022 #define PSLINK_H
00023
00024 #include <PrimeSense.h>
00025
00026 enum
00027 {
00028
00029
00030
00031 LINK_PROP_FW_VERSION = 0x12000001,
00032
00033 LINK_PROP_VERSIONS_INFO_COUNT = 0x12000002,
00034
00035 LINK_PROP_VERSIONS_INFO = 0x12000003,
00036
00037 LINK_PROP_PROJECTOR_ACTIVE = 0x12000008,
00038
00039 LINK_PROP_PRESET_FILE = 0x1200000a,
00040
00041 LINK_PROP_BOOT_STATUS = 0x1200000b,
00042
00043 LINK_PROP_PROJECTOR_POWER = 0x1200000c,
00044
00045 LINK_PROP_ACC_ENABLED = 0x1200000d,
00046
00047 LINK_PROP_VDD_ENABLED = 0x1200000e,
00048
00049 LINK_PROP_PERIODIC_BIST_ENABLED = 0x1200000f,
00050
00051
00052
00053
00054 LINK_COMMAND_GET_FW_STREAM_LIST = 0x1200F001,
00055
00056 LINK_COMMAND_CREATE_FW_STREAM = 0x1200F002,
00057
00058 LINK_COMMAND_DESTROY_FW_STREAM = 0x1200F003,
00059
00060 LINK_COMMAND_START_FW_STREAM = 0x1200F004,
00061
00062 LINK_COMMAND_STOP_FW_STREAM = 0x1200F005,
00063
00064 LINK_COMMAND_GET_FW_STREAM_VIDEO_MODE_LIST = 0x1200F006,
00065
00066 LINK_COMMAND_SET_FW_STREAM_VIDEO_MODE = 0x1200F007,
00067
00068 LINK_COMMAND_GET_FW_STREAM_VIDEO_MODE = 0x1200F008,
00069
00070 LINK_COMMAND_SET_PROJECTOR_PULSE = 0x1200F009,
00071
00072 LINK_COMMAND_DISABLE_PROJECTOR_PULSE = 0x1200F00a,
00073
00074
00075
00076 LINK_PROP_PIXEL_FORMAT = 0x12001001,
00077
00078 LINK_PROP_COMPRESSION = 0x12001002,
00079
00080
00081
00082 LINK_PROP_DEPTH_SCALE = 0x1200000b,
00083
00084 LINK_PROP_MAX_SHIFT = 0x12002001,
00085
00086 LINK_PROP_ZERO_PLANE_DISTANCE = 0x12002002,
00087
00088 LINK_PROP_CONST_SHIFT = 0x12002003,
00089
00090 LINK_PROP_PARAM_COEFF = 0x12002004,
00091
00092 LINK_PROP_SHIFT_SCALE = 0x12002005,
00093
00094 LINK_PROP_ZERO_PLANE_PIXEL_SIZE = 0x12002006,
00095
00096 LINK_PROP_ZERO_PLANE_OUTPUT_PIXEL_SIZE = 0x12002007,
00097
00098 LINK_PROP_EMITTER_DEPTH_CMOS_DISTANCE = 0x12002008,
00099
00100 LINK_PROP_SHIFT_TO_DEPTH_TABLE = 0x12002009,
00101
00102 LINK_PROP_DEPTH_TO_SHIFT_TABLE = 0x1200200a,
00103 };
00104
00105 typedef enum XnFileZone
00106 {
00107 XN_ZONE_FACTORY = 0x0000,
00108 XN_ZONE_UPDATE = 0x0001,
00109 } XnFileZone;
00110
00111 typedef enum XnBootErrorCode
00112 {
00113 XN_BOOT_OK = 0x0000,
00114 XN_BOOT_BAD_CRC = 0x0001,
00115 XN_BOOT_UPLOAD_IN_PROGRESS = 0x0002,
00116 XN_BOOT_FW_LOAD_FAILED = 0x0003,
00117 } XnBootErrorCode;
00118
00119 typedef enum XnFwStreamType
00120 {
00121 XN_FW_STREAM_TYPE_COLOR = 0x0001,
00122 XN_FW_STREAM_TYPE_IR = 0x0002,
00123 XN_FW_STREAM_TYPE_SHIFTS = 0x0003,
00124 XN_FW_STREAM_TYPE_AUDIO = 0x0004,
00125 XN_FW_STREAM_TYPE_DY = 0x0005,
00126 XN_FW_STREAM_TYPE_LOG = 0x0008,
00127 } XnFwStreamType;
00128
00129 typedef enum XnFwPixelFormat
00130 {
00131 XN_FW_PIXEL_FORMAT_NONE = 0x0000,
00132 XN_FW_PIXEL_FORMAT_SHIFTS_9_3 = 0x0001,
00133 XN_FW_PIXEL_FORMAT_GRAYSCALE16 = 0x0002,
00134 XN_FW_PIXEL_FORMAT_YUV422 = 0x0003,
00135 XN_FW_PIXEL_FORMAT_BAYER8 = 0x0004,
00136 } XnFwPixelFormat;
00137
00138 typedef enum XnFwCompressionType
00139 {
00140 XN_FW_COMPRESSION_NONE = 0x0000,
00141 XN_FW_COMPRESSION_8Z = 0x0001,
00142 XN_FW_COMPRESSION_16Z = 0x0002,
00143 XN_FW_COMPRESSION_24Z = 0x0003,
00144 XN_FW_COMPRESSION_6_BIT_PACKED = 0x0004,
00145 XN_FW_COMPRESSION_10_BIT_PACKED = 0x0005,
00146 XN_FW_COMPRESSION_11_BIT_PACKED = 0x0006,
00147 XN_FW_COMPRESSION_12_BIT_PACKED = 0x0007,
00148 } XnFwCompressionType;
00149
00150 #pragma pack (push, 1)
00151
00152 #define XN_MAX_VERSION_MODIFIER_LENGTH 16
00153 typedef struct XnDetailedVersion
00154 {
00155 uint8_t m_nMajor;
00156 uint8_t m_nMinor;
00157 uint16_t m_nMaintenance;
00158 uint32_t m_nBuild;
00159 char m_strModifier[XN_MAX_VERSION_MODIFIER_LENGTH];
00160 } XnDetailedVersion;
00161
00162 typedef struct XnBootStatus
00163 {
00164 XnFileZone zone;
00165 XnBootErrorCode errorCode;
00166 } XnBootStatus;
00167
00168 typedef struct XnFwStreamInfo
00169 {
00170 XnFwStreamType type;
00171 char creationInfo[80];
00172 } XnFwStreamInfo;
00173
00174 typedef struct XnFwStreamVideoMode
00175 {
00176 uint32_t m_nXRes;
00177 uint32_t m_nYRes;
00178 uint32_t m_nFPS;
00179 XnFwPixelFormat m_nPixelFormat;
00180 XnFwCompressionType m_nCompression;
00181 } XnFwStreamVideoMode;
00182
00183 typedef struct XnCommandGetFwStreamList
00184 {
00185 uint32_t count;
00186 XnFwStreamInfo* streams;
00187 } XnCommandGetFwStreamList;
00188
00189 typedef struct XnCommandCreateStream
00190 {
00191 XnFwStreamType type;
00192 const char* creationInfo;
00193 uint32_t id;
00194 } XnCommandCreateStream;
00195
00196 typedef struct XnCommandDestroyStream
00197 {
00198 uint32_t id;
00199 } XnCommandDestroyStream;
00200
00201 typedef struct XnCommandStartStream
00202 {
00203 uint32_t id;
00204 } XnCommandStartStream;
00205
00206 typedef struct XnCommandStopStream
00207 {
00208 uint32_t id;
00209 } XnCommandStopStream;
00210
00211 typedef struct XnCommandGetFwStreamVideoModeList
00212 {
00213 int streamId;
00214 uint32_t count;
00215 XnFwStreamVideoMode* videoModes;
00216 } XnCommandGetFwStreamVideoModeList;
00217
00218 typedef struct XnCommandSetFwStreamVideoMode
00219 {
00220 int streamId;
00221 XnFwStreamVideoMode videoMode;
00222 } XnCommandSetFwStreamVideoMode;
00223
00224 typedef struct XnCommandGetFwStreamVideoMode
00225 {
00226 int streamId;
00227 XnFwStreamVideoMode videoMode;
00228 } XnCommandGetFwStreamVideoMode;
00229
00230 typedef struct XnCommandSetProjectorPulse
00231 {
00232 float delay;
00233 float width;
00234 float cycle;
00235 } XnCommandSetProjectorPulse;
00236
00237 #pragma pack (pop)
00238
00239 #endif // PSLINK_H