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 _PRIME_SENSE_H_
22 #define _PRIME_SENSE_H_
23 
24 #include <OniCTypes.h>
25 
37 enum
38 {
39  // Stream Properties
40  PS_PROPERTY_DUMP_DATA = 0x1d270001, // boolean
41 
42  // Device Properties
43  PS_PROPERTY_USB_INTERFACE = 0x1d27F001, // values from XnUsbInterfaceType
44 };
45 
54 enum
55 {
56  // Device Commands - use via invoke()
57  PS_COMMAND_AHB_READ = 0x1d27E001, // XnCommandAHB
58  PS_COMMAND_AHB_WRITE = 0x1d27E002, // XnCommandAHB
59  PS_COMMAND_I2C_READ = 0x1d27E003, // XnCommandI2C
60  PS_COMMAND_I2C_WRITE = 0x1d27E004, // XnCommandI2C
61  PS_COMMAND_SOFT_RESET = 0x1d27E005, // no arguments
62  PS_COMMAND_POWER_RESET = 0x1d27E006, // no arguments
63  PS_COMMAND_BEGIN_FIRMWARE_UPDATE = 0x1d27E007, // no arguments
64  PS_COMMAND_END_FIRMWARE_UPDATE = 0x1d27E008, // no arguments
65  PS_COMMAND_UPLOAD_FILE = 0x1d27E009, // XnCommandUploadFile
66  PS_COMMAND_DOWNLOAD_FILE = 0x1d27E00A, // XnCommandDownloadFile
67  PS_COMMAND_GET_FILE_LIST = 0x1d27E00B, // an array of XnFileEntry
68  PS_COMMAND_FORMAT_ZONE = 0x1d27E00C, // XnCommandFormatZone
69  PS_COMMAND_DUMP_ENDPOINT = 0x1d27E00D, // XnCommandDumpEndpoint
70  PS_COMMAND_GET_I2C_DEVICE_LIST = 0x1d27E00E, // XnCommandGetI2CDevices
71  PS_COMMAND_GET_BIST_LIST = 0x1d27E00F, // XnCommandGetBistList
72  PS_COMMAND_EXECUTE_BIST = 0x1d27E010, // XnCommandExecuteBist
73  PS_COMMAND_USB_TEST = 0x1d27E011, // XnCommandUsbTest
74  PS_COMMAND_GET_LOG_MASK_LIST = 0x1d27E012, // XnCommandGetLogMaskList
75  PS_COMMAND_SET_LOG_MASK_STATE = 0x1d27E013, // XnCommandSetLogMaskState
76  PS_COMMAND_START_LOG = 0x1d27E014, // no arguments
77  PS_COMMAND_STOP_LOG = 0x1d27E015, // no arguments
78 };
79 
80 typedef enum XnUsbInterfaceType
81 {
86 
87 #pragma pack (push, 1)
88 
89 // Data Types
90 typedef struct XnFwFileVersion
91 {
97 
98 typedef enum XnFwFileFlags
99 {
101 } XnFwFileFlags;
102 
103 typedef struct XnFwFileEntry
104 {
105  char name[32];
111  XnFwFileFlags flags; // bitmap
112 } XnFwFileEntry;
113 
114 typedef struct XnI2CDeviceInfo
115 {
117  char name[32];
119 
120 typedef struct XnBistInfo
121 {
123  char name[32];
124 } XnBistInfo;
125 
126 typedef struct XnFwLogMask
127 {
129  char name[32];
130 } XnFwLogMask;
131 
133 {
137 
138 // Commands
139 
140 typedef struct XnCommandAHB
141 {
142  uint32_t address; // Address of this register
143  uint32_t offsetInBits; // Offset of the field in bits within address
144  uint32_t widthInBits; // Width of the field in bits
145  uint32_t value; // For read requests, this is where the actual value will be filled. For write requests, the value to write.
146 } XnCommandAHB;
147 
148 typedef struct XnCommandI2C
149 {
150  uint32_t deviceID; // Device to communicate with
151  uint32_t addressSize; // Size of the address, in bytes (1-4)
152  uint32_t address; // Address
153  uint32_t valueSize; // Size of the value, in bytes (1-4)
154  uint32_t mask; // For write request - a mask to be applied to the value. For read requests - ignored.
155  uint32_t value; // For write request - the value to be written. For read requests - the place where the actual value is written to
156 } XnCommandI2C;
157 
158 typedef struct XnCommandUploadFile
159 {
160  const char* filePath;
163 
164 typedef struct XnCommandDownloadFile
165 {
167  const char* firmwareFileName;
168  const char* targetPath;
170 
171 typedef struct XnCommandGetFileList
172 {
173  uint32_t count; // in: number of allocated elements in files array. out: number of written elements in the array
176 
177 typedef struct XnCommandFormatZone
178 {
181 
182 typedef struct XnCommandDumpEndpoint
183 {
185  bool enabled;
187 
189 {
190  uint32_t count; // in: number of allocated elements in devices array. out: number of written elements in the array
193 
194 typedef struct XnCommandGetBistList
195 {
196  uint32_t count; // in: number of allocated elements in tests array. out: number of written elements in the array
199 
200 typedef struct XnCommandExecuteBist
201 {
204  uint32_t extraDataSize; // in: number of allocated bytes in extraData. out: number of written bytes in extraData
207 
208 typedef struct XnCommandUsbTest
209 {
211  uint32_t endpointCount; // in: number of allocated bytes in endpoints array. out: number of written bytes in array
214 
216 {
217  uint32_t count; // in: number of allocated elements in masks array. out: number of written elements in the array
220 
222 {
224  bool enabled;
226 
227 #pragma pack (pop)
228 
229 #endif //_PRIME_SENSE_H_
struct XnCommandUsbTest XnCommandUsbTest
uint32_t address
Definition: PrimeSense.h:142
XnUsbInterfaceType
Definition: PrimeSense.h:80
uint32_t id
Definition: PrimeSense.h:128
struct XnFwLogMask XnFwLogMask
struct XnCommandUploadFile XnCommandUploadFile
uint8_t build
Definition: PrimeSense.h:95
struct XnCommandDownloadFile XnCommandDownloadFile
unsigned short uint16_t
struct XnCommandDumpEndpoint XnCommandDumpEndpoint
uint32_t valueSize
Definition: PrimeSense.h:153
struct XnCommandI2C XnCommandI2C
uint32_t deviceID
Definition: PrimeSense.h:150
uint8_t major
Definition: PrimeSense.h:92
struct XnCommandSetLogMaskState XnCommandSetLogMaskState
uint32_t offsetInBits
Definition: PrimeSense.h:143
XnBistInfo * tests
Definition: PrimeSense.h:197
const char * firmwareFileName
Definition: PrimeSense.h:167
unsigned char uint8_t
uint32_t size
Definition: PrimeSense.h:108
uint32_t widthInBits
Definition: PrimeSense.h:144
struct XnCommandFormatZone XnCommandFormatZone
XnFwFileFlags
Definition: PrimeSense.h:98
uint16_t zone
Definition: PrimeSense.h:110
const char * targetPath
Definition: PrimeSense.h:168
uint8_t minor
Definition: PrimeSense.h:93
struct XnI2CDeviceInfo XnI2CDeviceInfo
uint32_t id
Definition: PrimeSense.h:122
uint8_t maintenance
Definition: PrimeSense.h:94
uint32_t uploadToFactory
Definition: PrimeSense.h:161
uint32_t address
Definition: PrimeSense.h:152
uint32_t addressSize
Definition: PrimeSense.h:151
const char * filePath
Definition: PrimeSense.h:160
struct XnCommandGetBistList XnCommandGetBistList
struct XnCommandGetFileList XnCommandGetFileList
uint16_t crc
Definition: PrimeSense.h:109
XnFwFileVersion version
Definition: PrimeSense.h:106
XnI2CDeviceInfo * devices
Definition: PrimeSense.h:191
uint32_t value
Definition: PrimeSense.h:145
uint32_t mask
Definition: PrimeSense.h:154
struct XnBistInfo XnBistInfo
XnFwFileFlags flags
Definition: PrimeSense.h:111
struct XnCommandExecuteBist XnCommandExecuteBist
unsigned int uint32_t
uint32_t value
Definition: PrimeSense.h:155
struct XnCommandGetI2CDeviceList XnCommandGetI2CDeviceList
struct XnCommandAHB XnCommandAHB
uint32_t endpointCount
Definition: PrimeSense.h:211
uint32_t seconds
Definition: PrimeSense.h:210
uint32_t extraDataSize
Definition: PrimeSense.h:204
XnFwLogMask * masks
Definition: PrimeSense.h:218
uint32_t address
Definition: PrimeSense.h:107
struct XnFwFileEntry XnFwFileEntry
XnUsbTestEndpointResult * endpoints
Definition: PrimeSense.h:212
struct XnFwFileVersion XnFwFileVersion
XnFwFileEntry * files
Definition: PrimeSense.h:174
struct XnCommandGetLogMaskList XnCommandGetLogMaskList
struct XnUsbTestEndpointResult XnUsbTestEndpointResult


libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:38