13 struct DeviceInfoImpl;
14 struct DeviceListImpl;
24 std::unique_ptr< DeviceImpl > impl_;
30 Device( std::unique_ptr< DeviceImpl > impl );
37 std::shared_ptr< DeviceInfo > getDeviceInfo();
44 std::shared_ptr< SensorList > getSensorList();
52 std::shared_ptr< Sensor > getSensor( OBSensorType type );
132 void writeAHB( uint32_t reg, uint32_t mask, uint32_t value );
141 void readAHB( uint32_t reg, uint32_t mask, uint32_t* value );
151 void writeI2C( uint32_t moduleId, uint32_t reg, uint32_t mask, uint32_t value );
161 void readI2C( uint32_t moduleId, uint32_t reg, uint32_t mask, uint32_t* value );
173 bool writeFlash( uint32_t offset,
const void* data, uint32_t dataSize,
SetDataCallback callback,
bool async =
false );
185 bool readFlash( uint32_t offset, uint32_t dataSize,
GetDataCallback callback,
bool async =
false );
243 uint64_t syncDeviceTime();
253 bool deviceUpgrade(
const char* filePath, DeviceUpgradeCallback callback,
bool async =
true );
264 bool sendFile(
const char* filePath,
const char* dstPath, SendFileCallback callback,
bool async =
true );
277 void setDeviceStateChangedCallback( DeviceStateChangedCallback callback );
284 bool activateAuthorization(
const char* authCode );
290 void writeAuthorizationCode(
const char* authCodeStr );
325 std::unique_ptr< DeviceInfoImpl > impl_;
328 DeviceInfo( std::unique_ptr< DeviceInfoImpl > impl );
359 const char* serialNumber();
365 const char* firmwareVersion();
372 const char* usbType();
380 std::unique_ptr< DeviceListImpl > impl_;
383 DeviceList( std::unique_ptr< DeviceListImpl > impl );
391 uint32_t deviceCount();
399 const char* name( uint32_t index );
406 int pid( uint32_t index );
413 int vid( uint32_t index );
420 const char* uid( uint32_t index );
428 std::shared_ptr< Device > getDevice( uint32_t index );
std::function< void(OBDataTranState state, uint8_t percent) > SetDataCallback
设置raw data属性数据时进度回调
OBGlobalUnifiedProperty
描述设备所有的属性的枚举值
std::function< void(OBDataTranState state, OBDataChunk *dataChunk) > GetDataCallback
获取raw data属性数据时数据及进度回调
提供SDK的结构体、枚举常量定义(依赖libobsensor/h/ObTypes.h)
描述设备信息的类,代表一个RGBD相机的名称,id,序列号等其他设备自身基本信息。