21 struct DeviceInfoImpl;
22 struct DeviceListImpl;
23 struct CameraParamListImpl;
30 class CameraParamList;
31 class OBDepthWorkModeList;
35 std::unique_ptr<DeviceImpl> impl_;
45 Device(std::unique_ptr<DeviceImpl> impl);
46 virtual ~
Device() noexcept;
58 std::shared_ptr<DeviceInfo> getDeviceInfo();
71 std::shared_ptr<SensorList> getSensorList();
100 void setIntProperty(
OBPropertyID propertyId, int32_t property);
115 void setFloatProperty(
OBPropertyID propertyId,
float property);
130 void setBoolProperty(
OBPropertyID propertyId,
bool property);
237 void writeAHB(uint32_t reg, uint32_t mask, uint32_t value);
254 void readAHB(uint32_t reg, uint32_t mask, uint32_t *value);
273 void writeI2C(uint32_t moduleId, uint32_t reg, uint32_t mask, uint32_t value);
292 void readI2C(uint32_t moduleId, uint32_t reg, uint32_t mask, uint32_t *value);
313 void writeFlash(uint32_t offset,
const void *data, uint32_t dataSize,
SetDataCallback callback,
bool async =
false);
334 void readFlash(uint32_t offset, uint32_t dataSize,
GetDataCallback callback,
bool async =
false);
393 void setStructuredData(
OBPropertyID propertyId,
const void *data, uint32_t dataSize);
410 void getStructuredData(
OBPropertyID propertyId,
void *data, uint32_t *dataSize);
442 std::shared_ptr<OBDataBundle> getStructuredDataExt(
OBPropertyID propertyId);
483 uint32_t getSupportedPropertyCount();
526 uint64_t syncDeviceTime();
562 void sendFile(
const char *filePath,
const char *dstPath,
SendFileCallback callback,
bool async =
true);
599 bool activateAuthorization(
const char *authCode);
610 void writeAuthorizationCode(
const char *authCodeStr);
626 std::shared_ptr<CameraParamList> getCalibrationCameraParamList();
669 OBStatus switchDepthWorkMode(
const char *modeName);
681 std::shared_ptr<OBDepthWorkModeList> getDepthWorkModeList();
728 std::unique_ptr<DeviceInfoImpl> impl_;
731 DeviceInfo(std::unique_ptr<DeviceInfoImpl> impl);
796 const char *serialNumber();
809 const char *firmwareVersion();
835 const char *connectionType();
848 const char *hardwareVersion();
861 const char *supportedMinSdkVersion();
874 const char *asicName();
896 std::unique_ptr<DeviceListImpl> impl_;
899 DeviceList(std::unique_ptr<DeviceListImpl> impl);
913 uint32_t deviceCount();
943 int pid(uint32_t index);
958 int vid(uint32_t index);
973 const char *uid(uint32_t index);
988 const char *serialNumber(uint32_t index);
1003 std::shared_ptr<Device> getDevice(uint32_t index);
1018 std::shared_ptr<Device> getDeviceBySN(
const char *serialNumber);
1033 std::shared_ptr<Device> getDeviceByUid(
const char *uid);
1038 std::unique_ptr<CameraParamListImpl> impl_;
1082 std::unique_ptr<OBDepthWorkModeListImpl> impl_;
1128 std::string getName(uint32_t index);
Control command property list maintenance.
Type contain list of OBDepthWorkMode.
Command version of device property.
std::function< void(OBDataTranState state, uint8_t percent)> SetDataCallback
set the raw data property when the progress callback is made
std::function< void(OBFileTranState state, const char *message, uint8_t percent)> SendFileCallback
file transfer callbacks
std::function< void(OBUpgradeState state, const char *message, uint8_t percent)> DeviceUpgradeCallback
device upgrade callback
OBPropertyID
Enumeration value describing all attribute control commands of the device.
enum OB_CMD_VERSION OBCmdVersion
OBPermissionType
the permission type of api or property
OBSensorType
Enumeration value describing the sensor type.
Provide SDK structure and enumeration constant definition (depending on libobsensor/h/ObTypes.h)
std::function< void(OBDeviceState state, const char *message)> DeviceStateChangedCallback
device status callback
OBDeviceType
device type enumeration
std::function< void(OBDataTranState state, OBDataChunk *dataChunk)> GetDataCallback
get raw data property data when data and progress callbacks
A class describing device information, representing the name, id, serial number and other basic infor...
Used to describe the characteristics of each property.
Boolean-scoped structure.
uint64_t OBDeviceState
Device state.
Device synchronization configuration.