tof3d_manager.cpp 716 B

1234567891011121314151617181920212223
  1. //
  2. // Created by zx on 2023/10/7.
  3. //
  4. #include "tof3d_manager.h"
  5. Error_manager tof3dManager::init() {
  6. if (loadProtobufFile(ETC_PATH PROJECT_NAME "/tof3d_manager.json", m_tof_etc) == SUCCESS) {
  7. LOG(INFO) << m_tof_etc.DebugString();
  8. } else {
  9. return {FAILED, NEGLIGIBLE_ERROR, "tof3dManager read param form %s error.", ETC_PATH PROJECT_NAME "/tof3d_manager.json"};
  10. }
  11. auto list = m_tof_etc.vzense_tof3d_devices();
  12. std::map<std::string, tof3dVzenseEtc> device_mp;
  13. for (auto &device: m_tof_etc.vzense_tof3d_devices()) {
  14. device_mp.insert(std::pair<std::string, tof3dVzenseEtc>(device.ip(), device));
  15. }
  16. DeviceTof3D::iter()->Init(device_mp, true);
  17. return {};
  18. }