4 namespace oni {
namespace driver {
10 rsTraceFunc(
"propertyId=%d dataSize=%d", propertyId, dataSize);
14 case ONI_DEVICE_PROPERTY_IMAGE_REGISTRATION:
16 if (data && (dataSize ==
sizeof(OniImageRegistrationMode)))
28 #if defined(RS2_TRACE_NOT_SUPPORTED_PROPS) 29 rsTraceError(
"Not supported: propertyId=%d", propertyId);
31 return ONI_STATUS_NOT_SUPPORTED;
35 rsTraceError(
"propertyId=%d dataSize=%d", propertyId, dataSize);
36 return ONI_STATUS_ERROR;
45 case ONI_DEVICE_PROPERTY_SERIAL_NUMBER:
47 if (data && dataSize && *dataSize > 0)
53 int n = snprintf((
char*)data, *dataSize - 1,
"%s", info);
61 case ONI_DEVICE_PROPERTY_IMAGE_REGISTRATION:
63 if (data && dataSize && *dataSize ==
sizeof(OniImageRegistrationMode))
71 #ifdef RS2_EMULATE_PRIMESENSE_HARDWARE 72 case XN_MODULE_PROPERTY_AHB:
74 if (data && dataSize && *dataSize == 12)
76 unsigned char hack[] = {0x40, 0x0, 0x0, 0x28, 0x6A, 0x26, 0x54, 0x4F, 0xFF, 0xFF, 0xFF, 0xFF};
77 memcpy(data, hack,
sizeof(hack));
86 #if defined(RS2_TRACE_NOT_SUPPORTED_PROPS) 87 rsTraceError(
"Not supported: propertyId=%d", propertyId);
89 return ONI_STATUS_NOT_SUPPORTED;
93 rsTraceError(
"propertyId=%d dataSize=%d", propertyId, *dataSize);
94 return ONI_STATUS_ERROR;
101 case ONI_DEVICE_PROPERTY_SERIAL_NUMBER:
102 case ONI_DEVICE_PROPERTY_IMAGE_REGISTRATION:
virtual OniStatus getProperty(int propertyId, void *data, int *dataSize)
virtual OniBool isPropertySupported(int propertyId)
#define rsTraceError(format,...)
def info(name, value, persistent=False)
#define rsLogDebug(format,...)
#define rsTraceFunc(format,...)
OniImageRegistrationMode m_registrationMode
virtual OniStatus setProperty(int propertyId, const void *data, int dataSize)
const char * rs2_get_device_info(const rs2_device *device, rs2_camera_info info, rs2_error **error)