PrimeSense.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * *
3 * OpenNI 2.x Alpha *
4 * Copyright (C) 2012 PrimeSense Ltd. *
5 * *
6 * This file is part of OpenNI. *
7 * *
8 * Licensed under the Apache License, Version 2.0 (the "License"); *
9 * you may not use this file except in compliance with the License. *
10 * You may obtain a copy of the License at *
11 * *
12 * http://www.apache.org/licenses/LICENSE-2.0 *
13 * *
14 * Unless required by applicable law or agreed to in writing, software *
15 * distributed under the License is distributed on an "AS IS" BASIS, *
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
17 * See the License for the specific language governing permissions and *
18 * limitations under the License. *
19 * *
20 *****************************************************************************/
21 #ifndef PRIMESENSE_H
22 #define PRIMESENSE_H
23 
24 #include <OniCTypes.h>
25 
37 enum
38 {
39  // Stream Properties
40  PS_PROPERTY_DUMP_DATA = 0x1d270001, // boolean
41  PS_PROPERTY_GAIN = 0x1d270002, // int - system specific
42 
43  // Device Properties
44  PS_PROPERTY_USB_INTERFACE = 0x1d27F001, // values from XnUsbInterfaceType
45 };
46 
55 enum
56 {
57  // Device Commands - use via invoke()
58  PS_COMMAND_AHB_READ = 0x1d27E001, // XnCommandAHB
59  PS_COMMAND_AHB_WRITE = 0x1d27E002, // XnCommandAHB
60  PS_COMMAND_I2C_READ = 0x1d27E003, // XnCommandI2C
61  PS_COMMAND_I2C_WRITE = 0x1d27E004, // XnCommandI2C
62  PS_COMMAND_SOFT_RESET = 0x1d27E005, // no arguments
63  PS_COMMAND_POWER_RESET = 0x1d27E006, // no arguments
64  PS_COMMAND_BEGIN_FIRMWARE_UPDATE = 0x1d27E007, // no arguments
65  PS_COMMAND_END_FIRMWARE_UPDATE = 0x1d27E008, // no arguments
66  PS_COMMAND_UPLOAD_FILE = 0x1d27E009, // XnCommandUploadFile
67  PS_COMMAND_DOWNLOAD_FILE = 0x1d27E00A, // XnCommandDownloadFile
68  PS_COMMAND_GET_FILE_LIST = 0x1d27E00B, // an array of XnFileEntry
69  PS_COMMAND_FORMAT_ZONE = 0x1d27E00C, // XnCommandFormatZone
70  PS_COMMAND_DUMP_ENDPOINT = 0x1d27E00D, // XnCommandDumpEndpoint
71  PS_COMMAND_GET_I2C_DEVICE_LIST = 0x1d27E00E, // XnCommandGetI2CDevices
72  PS_COMMAND_GET_BIST_LIST = 0x1d27E00F, // XnCommandGetBistList
73  PS_COMMAND_EXECUTE_BIST = 0x1d27E010, // XnCommandExecuteBist
74  PS_COMMAND_USB_TEST = 0x1d27E011, // XnCommandUsbTest
75  PS_COMMAND_GET_LOG_MASK_LIST = 0x1d27E012, // XnCommandGetLogMaskList
76  PS_COMMAND_SET_LOG_MASK_STATE = 0x1d27E013, // XnCommandSetLogMaskState
77  PS_COMMAND_START_LOG = 0x1d27E014, // no arguments
78  PS_COMMAND_STOP_LOG = 0x1d27E015, // no arguments
79  PS_COMMAND_READ_TEMPERATURE = 0x1d27E016, // no arguments
80  PS_COMMAND_GET_TEMP_LIST = 0x1d27E017,// PrintTempList
81  PS_COMMAND_READ_DEBUG_DATA = 0x1d27E018, //ReadDebugDaata
82 };
83 
84 typedef enum XnUsbInterfaceType
85 {
90 
91 #pragma pack (push, 1)
92 
93 // Data Types
94 typedef struct XnFwFileVersion
95 {
101 
102 typedef enum XnFwFileFlags
103 {
105 } XnFwFileFlags;
106 
107 typedef struct XnFwFileEntry
108 {
109  char name[32];
115  XnFwFileFlags flags; // bitmap
116 } XnFwFileEntry;
117 
118 typedef struct XnI2CDeviceInfo
119 {
123  char name[32];
125 
126 typedef struct XnBistInfo
127 {
129  char name[32];
130 } XnBistInfo;
131 
132 typedef struct XnTempInfo
133 {
135  char name[16];
136 } XnTempInfo;
137 
138 typedef struct XnFwLogMask
139 {
141  char name[32];
142 } XnFwLogMask;
143 
145 {
149 
150 // Commands
151 
152 typedef struct XnCommandAHB
153 {
154  uint32_t address; // Address of this register
155  uint32_t offsetInBits; // Offset of the field in bits within address
156  uint32_t widthInBits; // Width of the field in bits
157  uint32_t value; // For read requests, this is where the actual value will be filled. For write requests, the value to write.
158 } XnCommandAHB;
159 
160 typedef struct XnCommandI2C
161 {
162  uint32_t deviceID; // Device to communicate with
163  uint32_t addressSize; // Size of the address, in bytes (1-4)
164  uint32_t address; // Address
165  uint32_t valueSize; // Size of the value, in bytes (1-4)
166  uint32_t mask; // For write request - a mask to be applied to the value. For read requests - ignored.
167  uint32_t value; // For write request - the value to be written. For read requests - the place where the actual value is written to
168 } XnCommandI2C;
169 
170 typedef struct XnCommandUploadFile
171 {
172  const char* filePath;
175 
176 typedef struct XnCommandDownloadFile
177 {
179  const char* firmwareFileName;
180  const char* targetPath;
182 
183 typedef struct XnCommandGetFileList
184 {
185  uint32_t count; // in: number of allocated elements in files array. out: number of written elements in the array
188 
189 typedef struct XnCommandFormatZone
190 {
193 
194 typedef struct XnCommandDumpEndpoint
195 {
197  bool enabled;
199 
201 {
202  uint32_t count; // in: number of allocated elements in devices array. out: number of written elements in the array
205 
206 typedef struct XnCommandGetBistList
207 {
208  uint32_t count; // in: number of allocated elements in tests array. out: number of written elements in the array
211 
212 typedef struct XnCommandGetTempList
213 {
214  uint32_t count; // in: number of allocated elements in tests array. out: number of written elements in the array
217 
218 typedef struct XnCommandExecuteBist
219 {
222  uint32_t extraDataSize; // in: number of allocated bytes in extraData. out: number of written bytes in extraData
225 
227 {
229  float temperature;
231 
232 typedef struct XnCommandUsbTest
233 {
235  uint32_t endpointCount; // in: number of allocated bytes in endpoints array. out: number of written bytes in array
238 
240 {
241  uint32_t count; // in: number of allocated elements in masks array. out: number of written elements in the array
244 
246 {
248  bool enabled;
250 
251 typedef struct XnCommandDebugData
252 {
253  uint16_t dataID; // Values come from XnLinkInternalPropID
254  uint16_t dataSize; // in: size of allocated buffer in data, out: actual bytes written to data
257 
258 #pragma pack (pop)
259 
260 #endif // PRIMESENSE_H
struct XnCommandUsbTest XnCommandUsbTest
struct XnCommandTemperatureResponse XnCommandTemperatureResponse
uint32_t address
Definition: PrimeSense.h:154
XnUsbInterfaceType
Definition: PrimeSense.h:84
uint32_t id
Definition: PrimeSense.h:140
struct XnFwLogMask XnFwLogMask
struct XnCommandUploadFile XnCommandUploadFile
uint8_t build
Definition: PrimeSense.h:99
struct XnCommandDownloadFile XnCommandDownloadFile
uint32_t id
Definition: PrimeSense.h:134
struct XnTempInfo XnTempInfo
unsigned short uint16_t
uint8_t slaveId
Definition: PrimeSense.h:121
struct XnCommandDumpEndpoint XnCommandDumpEndpoint
uint32_t valueSize
Definition: PrimeSense.h:165
struct XnCommandI2C XnCommandI2C
uint32_t deviceID
Definition: PrimeSense.h:162
uint8_t major
Definition: PrimeSense.h:96
struct XnCommandSetLogMaskState XnCommandSetLogMaskState
uint32_t offsetInBits
Definition: PrimeSense.h:155
XnBistInfo * tests
Definition: PrimeSense.h:209
const char * firmwareFileName
Definition: PrimeSense.h:179
unsigned char uint8_t
uint32_t size
Definition: PrimeSense.h:112
uint32_t widthInBits
Definition: PrimeSense.h:156
struct XnCommandFormatZone XnCommandFormatZone
struct XnCommandGetTempList XnCommandGetTempList
XnTempInfo * pTempInfos
Definition: PrimeSense.h:215
XnFwFileFlags
Definition: PrimeSense.h:102
uint16_t zone
Definition: PrimeSense.h:114
const char * targetPath
Definition: PrimeSense.h:180
uint8_t minor
Definition: PrimeSense.h:97
struct XnI2CDeviceInfo XnI2CDeviceInfo
uint32_t id
Definition: PrimeSense.h:128
uint8_t maintenance
Definition: PrimeSense.h:98
uint32_t uploadToFactory
Definition: PrimeSense.h:173
struct XnCommandDebugData XnCommandDebugData
uint32_t address
Definition: PrimeSense.h:164
uint32_t addressSize
Definition: PrimeSense.h:163
const char * filePath
Definition: PrimeSense.h:172
struct XnCommandGetBistList XnCommandGetBistList
struct XnCommandGetFileList XnCommandGetFileList
uint16_t crc
Definition: PrimeSense.h:113
XnFwFileVersion version
Definition: PrimeSense.h:110
XnI2CDeviceInfo * devices
Definition: PrimeSense.h:203
uint32_t value
Definition: PrimeSense.h:157
uint32_t mask
Definition: PrimeSense.h:166
struct XnBistInfo XnBistInfo
XnFwFileFlags flags
Definition: PrimeSense.h:115
struct XnCommandExecuteBist XnCommandExecuteBist
unsigned int uint32_t
uint32_t value
Definition: PrimeSense.h:167
struct XnCommandGetI2CDeviceList XnCommandGetI2CDeviceList
struct XnCommandAHB XnCommandAHB
uint32_t endpointCount
Definition: PrimeSense.h:235
uint32_t seconds
Definition: PrimeSense.h:234
uint32_t extraDataSize
Definition: PrimeSense.h:222
XnFwLogMask * masks
Definition: PrimeSense.h:242
uint32_t address
Definition: PrimeSense.h:111
struct XnFwFileEntry XnFwFileEntry
XnUsbTestEndpointResult * endpoints
Definition: PrimeSense.h:236
struct XnFwFileVersion XnFwFileVersion
XnFwFileEntry * files
Definition: PrimeSense.h:186
struct XnCommandGetLogMaskList XnCommandGetLogMaskList
uint8_t masterId
Definition: PrimeSense.h:120
struct XnUsbTestEndpointResult XnUsbTestEndpointResult


astra_camera
Author(s): Tim Liu
autogenerated on Wed Dec 16 2020 03:54:34